|
I recently purchased CTABLES for v18 SPSS Statistics, only to find that it does not allow the use of
the standard "SPLIT FILES BY variable#". My survey data contains several thousand observations across 300+ groups. I want to produce a Table for Each Group that lists the Variables down the left-side and has the category labels across the top (all variables have the same set of response categories). For most procedures, this is run by: SORT CASES BY VAR#1. SPLIT FILE BY VAR#1. CTABLES /VLABELS VARIABLES=R1_1 R2_1 R3_1 R4_1 DISPLAY=LABEL /TABLE (R1_1 [COUNT F40.0, ROWPCT.COUNT PCT40.0] + R2_1 [COUNT F40.0, ROWPCT.COUNT PCT40.0] + R3_1 [COUNT F40.0, ROWPCT.COUNT PCT40.0] + R4_1 [COUNT F40.0, ROWPCT.COUNT PCT40.0] BY VAR#1 /SLABELS POSITION=ROW VISIBLE=YES /CLABELS ROWLABELS=OPPOSITE /CATEGORIES VARIABLES=YEAR R1_1 R2_1 R3_1 R4_1 ORDER=A KEY=LABEL MISSING=EXCLUDE EMPTY=EXCLUDE. â¢â¢â¢ But SPLIT FILES BY VAR#1. is not supported. I have received a suggestion that this be set up as a Python program â but, unfortunately that is not feasible on the machine I am using at present. Suggestions please. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Peter,
I just now made up a tiny dataset and I ran the following sequence and got separate tables for each value of Sub. The key is the use of the Separate keyword rather than the default value of Layered on the Split files command. As I understand your data, my dataset corresponds because you administered the same survey to students in different classes and you want to see summary data for each question by class. I think this gives you what you want but I'm not sure. Gene Maguin data list list / stu sub q1 q2 q3. begin data 101 11 1 2 3 102 11 2 3 1 103 11 3 1 2 104 12 1 2 3 105 12 2 3 1 106 12 3 1 2 107 13 1 2 3 108 13 2 3 1 109 13 3 1 2 110 14 1 2 3 111 14 2 3 1 112 14 3 1 2 113 15 1 2 3 114 15 2 3 1 115 15 3 1 2 end data. variable labels q1 'item 1'/q2 'item 2'/q3 'item 3'. value labels q1 q2 q3 1 'one' 2 'two' 3 'three'. split file separate by sub. ctables /tables (q1+q2+q3)[COUNT ROWPCT]/CLABELS ROWLABELS=OPPOSITE. >>I recently purchased CTABLES for v18 SPSS Statistics, only to find that it does not allow the use of the standard "SPLIT FILES BY variable#". My survey data contains several thousand observations across 300+ groups. I want to produce a Table for Each Group that lists the Variables down the left-side and has the category labels across the top (all variables have the same set of response categories). For most procedures, this is run by: SORT CASES BY VAR#1. SPLIT FILE BY VAR#1. CTABLES /VLABELS VARIABLES=R1_1 R2_1 R3_1 R4_1 DISPLAY=LABEL /TABLE (R1_1 [COUNT F40.0, ROWPCT.COUNT PCT40.0] + R2_1 [COUNT F40.0, ROWPCT.COUNT PCT40.0] + R3_1 [COUNT F40.0, ROWPCT.COUNT PCT40.0] + R4_1 [COUNT F40.0, ROWPCT.COUNT PCT40.0] BY VAR#1 /SLABELS POSITION=ROW VISIBLE=YES /CLABELS ROWLABELS=OPPOSITE /CATEGORIES VARIABLES=YEAR R1_1 R2_1 R3_1 R4_1 ORDER=A KEY=LABEL MISSING=EXCLUDE EMPTY=EXCLUDE. ••• But SPLIT FILES BY VAR#1. is not supported. I have received a suggestion that this be set up as a Python program — but, unfortunately that is not feasible on the machine I am using at present. Suggestions please. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Administrator
|
Well spotted, Gene. From the Help files:
• CTABLES ignores SPLIT FILE requests if layered splits (compare groups in the graphical user interface) are requested. You can compare groups by using the split variables at the highest nesting level for row variables. See the TABLE subcommand for nesting variables.
--
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/). |
| Free forum by Nabble | Edit this page |
