CONTENTS DELETED
The author has deleted this message.
|
Administrator
|
Please define what you mean by "count percentage of break variables" preferably demonstrating with a simple numeric example of inputs and desired output!! ---
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
CONTENTS DELETED
The author has deleted this message.
|
Administrator
|
In reply to this post by David Marso
DATA LIST FREE / Gender (F1) Age (A10).
BEGIN DATA. 1 20-24 1 25-29 2 25-29 2 29-34 1 29-34 2 34-above 1 20-24 1 20-24 2 20-24 1 20-24 END DATA. AGGREGATE OUTFILE * / BREAK Age Gender / N=N. WEIGHT BY N. AGGREGATE OUTFILE * / BREAK AGE / P1=PIN(GENDER,1,1)/P2=PIN(GENDER,2,2). LIST. AGE P1 P2 20-24 80.0 20.0 25-29 50.0 50.0 29-34 50.0 50.0 34-above .0 100.0 Number of cases read: 4 Number of cases listed: 4
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Administrator
|
In reply to this post by Deepanshu Bhalla
* Use OP's data to illustrate. data list list / Gender(f1) AgeString(a8). begin data 1 20-24 1 25-29 2 25-29 2 29-34 1 29-34 2 34-above 1 20-24 1 20-24 2 20-24 1 20-24 end data. * Numeric variable will be easier to work with, so AUTORECODE. AUTORECODE VARIABLES=AgeString /INTO AgeCat . * Confirm recode worked. crosstabs agestring by agecat. AGGREGATE /OUTFILE=* MODE=ADDVARIABLES /BREAK=Gender /p1=PLT(AgeCat 2) /p2=PIN(AgeCat 2 2) /p3=PIN(AgeCat 2 2) /p4=PGT(AgeCat 3) . sort cases by gender agecat. list. * Check result against row percentages from CROSSTABS. crosstabs gender by agecat / cells = row. HTH.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
Administrator
|
In reply to this post by David Marso
OOPS I misread the question ;-(
-- DATA LIST FREE / Gender (F1) Age (A8). BEGIN DATA. 1 20-24 1 25-29 2 25-29 2 29-34 1 29-34 2 34-above 1 20-24 1 20-24 2 20-24 1 20-24 END DATA. RECODE AGE ("20-24"=1)(ELSE=0) INTO AGE1 /AGE ("25-29"=1)(ELSE=0) INTO AGE2 /AGE ("29-34"=1)(ELSE=0) INTO AGE3 /AGE ("34-above"=1)(ELSE=0) INTO AGE4. AGGREGATE OUTFILE * / BREAK Gender / AGE1 TO AGE4=MEAN(AGE1 TO AGE4). LIST. Alternatively you could use the following for the AGGREGATE if you want the form ni/N*100. AGGREGATE OUTFILE * / BREAK Gender / AGE1 TO AGE4=PIN(AGE1 TO AGE4,1,1).
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Free forum by Nabble | Edit this page |