I have 3 sets of MRSETS, each with identical response options. The 1st set is
for the past, 2nd set is current, and 3rd set (yup) future. I would like to use CTABLES to show the Past Current Future in columns and the identical response options as the rows. I intended to change the Category Position from Default to Column Labels in Rows, however, this only seems to be allowed if I use only one of the MRSETS and is disabled when using 2 or more MRSETS. Is this doable some other way? FYI, I tried to force the issue by including this parameter "/CLABELS COLLABELS=OPPOSITE" in the syntax, however I receive this error... TABLE: Category labels cannot be repositioned because the category variables do not have identical category specifications. ...not sure exactly what is meant by "category specifications" however in when looking via the Variable View, they all have the same values for each of the columns (Name, Type, Width, etc). Thanks, Chris -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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 |
One tweak to my post. I should not have included "Name" in the list below.
Obviously the variable names are different... ...not sure exactly what is meant by "category specifications" however in when looking via the Variable View, they all have the same values for each of the columns (Name, Type, Width, etc). -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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 |
In reply to this post by ChrisKeran
Hi, do you have example data? Mario Munich, Germany
Am Donnerstag, 13. August 2020, 21:06:33 MESZ hat ChrisKeran <[hidden email]> Folgendes geschrieben:
I have 3 sets of MRSETS, each with identical response options. The 1st set is for the past, 2nd set is current, and 3rd set (yup) future. I would like to use CTABLES to show the Past Current Future in columns and the identical response options as the rows. I intended to change the Category Position from Default to Column Labels in Rows, however, this only seems to be allowed if I use only one of the MRSETS and is disabled when using 2 or more MRSETS. Is this doable some other way? FYI, I tried to force the issue by including this parameter "/CLABELS COLLABELS=OPPOSITE" in the syntax, however I receive this error... TABLE: Category labels cannot be repositioned because the category variables do not have identical category specifications. ...not sure exactly what is meant by "category specifications" however in when looking via the Variable View, they all have the same values for each of the columns (Name, Type, Width, etc). Thanks, Chris -- ===================== 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 |
Hi Mario,
Here is a small test file (.sav) and syntax file (.sps)... Test_file.sav <http://spssx-discussion.1045642.n5.nabble.com/file/t340635/Test_file.sav> Test_syntax.sps <http://spssx-discussion.1045642.n5.nabble.com/file/t340635/Test_syntax.sps> Thanks, Chris -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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 |
/* Restructuring to long format*/ VARSTOCASES /MAKE Q7_1 FROM Q7.8_1 Q7.9_1 Q7.10_1 /MAKE Q7_2 FROM Q7.8_2 Q7.9_2 Q7.10_2 /MAKE Q7_3 FROM Q7.8_3 Q7.9_3 Q7.10_3 /MAKE Q7_4 FROM Q7.8_4 Q7.9_4 Q7.10_4 /MAKE Q7_5 FROM Q7.8_5 Q7.9_5 Q7.10_5 /MAKE Q7_6 FROM Q7.8_6 Q7.9_6 Q7.10_6 /INDEX = Position. VALUE LABELS POSITION 1 'Past' 2 'Current' 3 'Future'. SAVE OUTFILE = "longformat.sav". CTABLES /VLABELS VARIABLES=ALL DISPLAY=NONE /TABLE POSITION [COUNT "N" COMMA40.0, COLPCT.COUNT "Col%" PCT40.0] BY (Q7_1 + Q7_2 + Q7_3 + Q7_4 + Q7_5 + Q7_6) [C] /CATEGORIES VARIABLES = POSITION TOTAL = YES. Mario Giesel Munich, Germany
Am Freitag, 14. August 2020, 16:20:07 MESZ hat ChrisKeran <[hidden email]> Folgendes geschrieben:
Hi Mario, Here is a small test file (.sav) and syntax file (.sps)... Test_file.sav <http://spssx-discussion.1045642.n5.nabble.com/file/t340635/Test_file.sav> Test_syntax.sps <http://spssx-discussion.1045642.n5.nabble.com/file/t340635/Test_syntax.sps> Thanks, Chris -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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 |
Thank you, Mario, however I would like the Past, Current, Future to be across
the top and the Q7 items to be down the side. FYI, when I switched your CTABLES command to do this (see syntax below), the placement is now correct, however, the percents were all 100%. *Mario's version... CTABLES /VLABELS VARIABLES= Position Q7_1 Q7_2 Q7_3 Q7_4 Q7_5 Q7_6 DISPLAY=NONE /TABLE POSITION [COUNT "N" COMMA40.0, COLPCT.COUNT "Col%" PCT40.0] BY (Q7_1 + Q7_2 + Q7_3 + Q7_4 + Q7_5 + Q7_6) [C] /CATEGORIES VARIABLES = POSITION TOTAL = YES. *Swapped rows and columns version... CTABLES /VLABELS VARIABLES= Position Q7_1 Q7_2 Q7_3 Q7_4 Q7_5 Q7_6 DISPLAY=NONE /TABLE (Q7_1 + Q7_2 + Q7_3 + Q7_4 + Q7_5 + Q7_6) [C] BY POSITION [COUNT "N" COMMA40.0, COLPCT.COUNT "Col%" PCT40.0] /CATEGORIES VARIABLES = POSITION TOTAL = YES. -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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 |
In that case you can use row percentages: *Swapped rows and columns version... CTABLES /VLABELS VARIABLES= Position Q7_1 Q7_2 Q7_3 Q7_4 Q7_5 Q7_6 DISPLAY=NONE /TABLE (Q7_1 + Q7_2 + Q7_3 + Q7_4 + Q7_5 + Q7_6) [C] BY POSITION [COUNT "N" COMMA40.0, ROWPCT.COUNT "Row%" PCT40.0] /CATEGORIES VARIABLES = POSITION TOTAL = YES.
Am Montag, 17. August 2020, 15:46:19 MESZ hat ChrisKeran <[hidden email]> Folgendes geschrieben:
Thank you, Mario, however I would like the Past, Current, Future to be across the top and the Q7 items to be down the side. FYI, when I switched your CTABLES command to do this (see syntax below), the placement is now correct, however, the percents were all 100%. *Mario's version... CTABLES /VLABELS VARIABLES= Position Q7_1 Q7_2 Q7_3 Q7_4 Q7_5 Q7_6 DISPLAY=NONE /TABLE POSITION [COUNT "N" COMMA40.0, COLPCT.COUNT "Col%" PCT40.0] BY (Q7_1 + Q7_2 + Q7_3 + Q7_4 + Q7_5 + Q7_6) [C] /CATEGORIES VARIABLES = POSITION TOTAL = YES. *Swapped rows and columns version... CTABLES /VLABELS VARIABLES= Position Q7_1 Q7_2 Q7_3 Q7_4 Q7_5 Q7_6 DISPLAY=NONE /TABLE (Q7_1 + Q7_2 + Q7_3 + Q7_4 + Q7_5 + Q7_6) [C] BY POSITION [COUNT "N" COMMA40.0, COLPCT.COUNT "Col%" PCT40.0] /CATEGORIES VARIABLES = POSITION TOTAL = YES. -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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 |
In reply to this post by ChrisKeran
Hello!!!! It would work better for you if you used the encoding of variables as categories where you define a value to each category eg. VARIABLE LABELS Q7.8_1 "Question no. 7" VALUE LABELS Q7.8_1 1 Staff furloughs 2 Staff layoffs 3 Hiring freezes 4 Pay cuts 5 Benefit cuts 6 None of these. and then you form your MRSETS. the disadvantage of this is that it assigns the values of each category in all. I hope it serves you and that it has contributed a little to this great community of SPSS experts. Happy start to the week. El lun., 17 ago. 2020 a las 7:46, ChrisKeran (<[hidden email]>) escribió: Thank you, Mario, however I would like the Past, Current, Future to be across Javier Figueroa Procesamiento y Análisis de bases de datos Cel: 5927-4748 / 4970-1940 Casa: 2289-0184 |
In reply to this post by spss.giesel@yahoo.de
Thank you, Mario, however I DO want column percentages.
The screenshot is basically what I'd like to create, EXCEPT... 1) The percents should reflect the count divided by the number of respondents in that column and 2) The Total count should reflect number of respondents in each column. Does this help? <http://spssx-discussion.1045642.n5.nabble.com/file/t340635/Table.jpg> -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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 |
Then you can restructure once again to get only one variable with values (Q7) and two classifiers (Position and Item) like this: VARSTOCASES /MAKE Q7 FROM Q7_1 Q7_2 Q7_3 Q7_4 Q7_5 Q7_6 /INDEX = Item. VALUE LABELS Item 1 "Staff furloughs" 2 "Staff layoffs" 3 "Hiring freezes" 4 "Pay cuts" 5 "Benefit cuts" 6 "None of these". VAR LAB item "Item".. CTABLES /VLABELS VARIABLES= Position Q7 DISPLAY=NONE /TABLE Item [COUNT "N" COMMA40.0, COLPCT.COUNT "Col%" PCT40.0] BY Position [C] /CATEGORIES VARIABLES = Item TOTAL = YES POSITION = AFTER.
Am Montag, 17. August 2020, 18:43:46 MESZ hat ChrisKeran <[hidden email]> Folgendes geschrieben:
Thank you, Mario, however I DO want column percentages. The screenshot is basically what I'd like to create, EXCEPT... 1) The percents should reflect the count divided by the number of respondents in that column and 2) The Total count should reflect number of respondents in each column. Does this help? <http://spssx-discussion.1045642.n5.nabble.com/file/t340635/Table.jpg> -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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 |
In reply to this post by ChrisKeran
Ok, got it resolved. Thank you Mario, Javier, and Jon!!!
Here is the completed table: <http://spssx-discussion.1045642.n5.nabble.com/file/t340635/Table_completed.jpg> Here is the syntax which creates the table... VARSTOCASES /MAKE Q7_1 FROM Q7.8_1 Q7.9_1 Q7.10_1 /MAKE Q7_2 FROM Q7.8_2 Q7.9_2 Q7.10_2 /MAKE Q7_3 FROM Q7.8_3 Q7.9_3 Q7.10_3 /MAKE Q7_4 FROM Q7.8_4 Q7.9_4 Q7.10_4 /MAKE Q7_5 FROM Q7.8_5 Q7.9_5 Q7.10_5 /MAKE Q7_6 FROM Q7.8_6 Q7.9_6 Q7.10_6 /INDEX = Position /KEEP= /NULL=KEEP. VALUE LABELS Position 1 'Past' 2 'Current' 3 'Future'. * Define Multiple Response Sets. MRSETS /MDGROUP NAME=$Q7All CATEGORYLABELS=VARLABELS VARIABLES=Q7_1 Q7_2 Q7_3 Q7_4 Q7_5 Q7_6 VALUE=1 /DISPLAY NAME=[$Q7All]. * Custom Tables. CTABLES /VLABELS VARIABLES=$Q7All Position DISPLAY=NONE /TABLE $Q7All [C][COUNT COMMA40.0, COLPCT.COUNT PCT40.0] BY Position [C] /CATEGORIES VARIABLES=$Q7All EMPTY=INCLUDE TOTAL=YES POSITION=AFTER /CATEGORIES VARIABLES=Position ORDER=A KEY=VALUE EMPTY=INCLUDE TOTAL=YES POSITION=AFTER /CRITERIA CILEVEL=95. -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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 |
Free forum by Nabble | Edit this page |