Hi there,
I want to make a custom table based on a variable measured like this: totally disagree 25% disagree 15% agree 10% totally agree 50% I want to report it like this (using ct syntax) totally agree 50% In other words, all the other values must be hidden, but taken into account when calculating the percentages. When I exclude values, they are not taken into account. For instance, deleting the first three results in totally agree 100% Is there a way to overcome this problem? thanks Nico |
One way to do this would be to pivot
the table (double click in Viewer, open pivot trays, move rows to layer)
and select the one row to display from the dropdown. Another way
would be to use the SPSSINC MODIFY TABLES extension command after generating
the table and specify as the action to hide the unwanted rows. This
requires the Python Essentials available via the SPSS Community website
or installed with Statistics (depending on the version). This avoids
the need for manual editing. You could also write a Python or Basic
script to do this action.
Here is an example using MODIFY TABLES (built from the dialogs) that hides the first two rows of a table that has three rows. CTABLES /TABLE jobcat [C][COUNT F40.0] BY educ [C]. SPSSINC MODIFY TABLES subtype="customtable" SELECT=0 1 DIMENSION= ROWS LEVEL = -1 PROCESS = PRECEDING HIDE=TRUE /STYLES APPLYTO=BOTH. Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: NicoDW <[hidden email]> To: [hidden email], Date: 10/24/2013 06:08 AM Subject: [SPSSX-L] Hide categories in custom tables Sent by: "SPSSX(r) Discussion" <[hidden email]> Hi there, I want to make a custom table based on a variable measured like this: totally disagree 25% disagree 15% agree 10% totally agree 50% I want to report it like this (using ct syntax) totally agree 50% In other words, all the other values must be hidden, but taken into account when calculating the percentages. When I exclude values, they are not taken into account. For instance, deleting the first three results in totally agree 100% Is there a way to overcome this problem? thanks Nico -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Hide-categories-in-custom-tables-tp5722693.html Sent from the SPSSX Discussion mailing list archive at 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 your response you mentioned using SPSSINC MODIFY TABLES. My license for SPSS does not include Custom Tables, can I still download the Python extension and run the modify tables script on a regular frequency table or are custom tables required?
|
MODIFY TABLES is included in the Python
Essentials (up to but not including V22, which has a native command, OUTPUT
MODIFY, that includes many of the features of MODIFY TABLES). It
is a completely general command. You can use it with any pivot table.
The Python Essentials are licensed with the Base product, so anyone
can use them.
Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: cgriffin7 <[hidden email]> To: [hidden email], Date: 11/11/2013 07:46 AM Subject: Re: [SPSSX-L] Hide categories in custom tables Sent by: "SPSSX(r) Discussion" <[hidden email]> In your response you mentioned using SPSSINC MODIFY TABLES. My license for SPSS does not include Custom Tables, can I still download the Python extension and run the modify tables script on a regular frequency table or are custom tables required? Jon K Peck wrote > One way to do this would be to pivot the table (double click in Viewer, > open pivot trays, move rows to layer) and select the one row to display > from the dropdown. Another way would be to use the SPSSINC MODIFY TABLES > extension command after generating the table and specify as the action to > hide the unwanted rows. This requires the Python Essentials available via > the SPSS Community website or installed with Statistics (depending on the > version). This avoids the need for manual editing. You could also write > a Python or Basic script to do this action. > > Here is an example using MODIFY TABLES (built from the dialogs) that hides > the first two rows of a table that has three rows. > > CTABLES > /TABLE jobcat [C][COUNT F40.0] BY educ [C]. > > SPSSINC MODIFY TABLES subtype="customtable" > SELECT=0 1 DIMENSION= ROWS > LEVEL = -1 PROCESS = PRECEDING HIDE=TRUE > /STYLES APPLYTO=BOTH. > > > > > Jon Peck (no "h") aka Kim > Senior Software Engineer, IBM > peck@.ibm > phone: 720-342-5621 > > > > > From: NicoDW < > nico.dewitte@ > > > To: > SPSSX-L@.uga > , > Date: 10/24/2013 06:08 AM > Subject: [SPSSX-L] Hide categories in custom tables > Sent by: "SPSSX(r) Discussion" < > SPSSX-L@.uga > > > > > > Hi there, > > I want to make a custom table based on a variable measured like this: > > totally disagree 25% > disagree 15% > agree 10% > totally agree 50% > > I want to report it like this (using ct syntax) > > totally agree 50% > > In other words, all the other values must be hidden, but taken into > account > when calculating the percentages. > When I exclude values, they are not taken into account. For instance, > deleting the first three > results in > > totally agree 100% > > Is there a way to overcome this problem? > > thanks > > Nico > > > > > -- > View this message in context: > http://spssx-discussion.1045642.n5.nabble.com/Hide-categories-in-custom-tables-tp5722693.html > > Sent from the SPSSX Discussion mailing list archive at Nabble.com. > > ===================== > To manage your subscription to SPSSX-L, send a message to > LISTSERV@.UGA > (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 -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Hide-categories-in-custom-tables-tp5722693p5722879.html Sent from the SPSSX Discussion mailing list archive at 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 |