|
Dear List Members,
I am reposting this item because I have not had any
responses to my previous posting. I need some help in revising my pasted
syntax (see below) for CTABLES.
I am trying to get several statistics normally
produced by CTABLES to appear in a single table. I have two variables: Typol#7
which is a row variable and Barak_therm which is a column variable having six
values. I want the following statistics to be reported in my table: column
percentages in each column, the sum of the column percentages (100%) in
each column, the weighted total count in each column, and the mean of typol#7 in
each column. I should note that typol#7 has only three values which are -1,
0, +1. Using the syntax noted below, I do indeed get the correct column
sum, the correct weighted count, and the correct mean for typol#7 in each
column. Nevertheless, I am discovering that my syntax (see below) is
failing to provide the column percentages for each response option in
typol#7. I think that the reason for my failure is that I have
declared typol#7 as a scale variable in order to get the mean of typol#7 for
each column of the categorical variable called Barak_therm. Although I suspect
that there is a way to get all of my desired statistics in a single
table, I am unaware of the necessary trick. Thus, I welcome your help
on this matter.
CTABLES /VLABELS VARIABLES=typol#7 Barak_therm DISPLAY=DEFAULT /TABLE typol#7 [S][COLPCT.SUM PCT40.1, COUNT F40.0, MEAN F40.3] BY Barak_therm [C] /SLABELS POSITION=ROW /CATEGORIES VARIABLES=Barak_therm ORDER=A KEY=VALUE EMPTY=INCLUDE. Thank you for your help. David |
|
I have a hard time picturing the table you want. I expect that others have the same problem. If the following tip doesn't lead you to a solution, I suggest that you post a small mockup of what you want. Tip: you can include the same variable in a table with different measurement levels. Using the dialog, drag the variable to the canvas; then right click, change the measurement level, and drag again. HTH, Jon Peck SPSS, an IBM Company [hidden email] 312-651-3435
Dear List Members, I am reposting this item because I have not had any responses to my previous posting. I need some help in revising my pasted syntax (see below) for CTABLES. I am trying to get several statistics normally produced by CTABLES to appear in a single table. I have two variables: Typol#7 which is a row variable and Barak_therm which is a column variable having six values. I want the following statistics to be reported in my table: column percentages in each column, the sum of the column percentages (100%) in each column, the weighted total count in each column, and the mean of typol#7 in each column. I should note that typol#7 has only three values which are -1, 0, +1. Using the syntax noted below, I do indeed get the correct column sum, the correct weighted count, and the correct mean for typol#7 in each column. Nevertheless, I am discovering that my syntax (see below) is failing to provide the column percentages for each response option in typol#7. I think that the reason for my failure is that I have declared typol#7 as a scale variable in order to get the mean of typol#7 for each column of the categorical variable called Barak_therm. Although I suspect that there is a way to get all of my desired statistics in a single table, I am unaware of the necessary trick. Thus, I welcome your help on this matter. CTABLES /VLABELS VARIABLES=typol#7 Barak_therm DISPLAY=DEFAULT /TABLE typol#7 [S][COLPCT.SUM PCT40.1, COUNT F40.0, MEAN F40.3] BY Barak_therm [C] /SLABELS POSITION=ROW /CATEGORIES VARIABLES=Barak_therm ORDER=A KEY=VALUE EMPTY=INCLUDE. Thank you for your help. David
|
|
Hi Jon,
Using two fake variables, I have created a
small mockup of the type of table that I desire. Note that the table resembles a
regular crosstab but there is a mean at the bottom of each column.
I should note that invoking multiple
definitions (scale and nominal) for the row variable (B) does not seem to do the
trick.
Thanks,
David
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
|
In reply to this post by Jon K Peck
Jon,
That's really a clever idea. Can that be done in
syntax? How? I'm frightened to ask if this is documented but is
it?
Gene Maguin
From: SPSSX(r)
Discussion [mailto:[hidden email]] On Behalf Of Jon K
Peck
Sent: Sunday, June 27, 2010 10:31 PM To: [hidden email] Subject: Re: Syntax for CTABLES I have a hard time picturing the table you want. I expect that others have the same problem. If the following tip doesn't lead you to a solution, I suggest that you post a small mockup of what you want. Tip: you can include the same variable in a table with different measurement levels. Using the dialog, drag the variable to the canvas; then right click, change the measurement level, and drag again. HTH, Jon Peck SPSS, an IBM Company [hidden email] 312-651-3435
Dear List Members, I am reposting this item because I have not had any responses to my previous posting. I need some help in revising my pasted syntax (see below) for CTABLES. I am trying to get several statistics normally produced by CTABLES to appear in a single table. I have two variables: Typol#7 which is a row variable and Barak_therm which is a column variable having six values. I want the following statistics to be reported in my table: column percentages in each column, the sum of the column percentages (100%) in each column, the weighted total count in each column, and the mean of typol#7 in each column. I should note that typol#7 has only three values which are -1, 0, +1. Using the syntax noted below, I do indeed get the correct column sum, the correct weighted count, and the correct mean for typol#7 in each column. Nevertheless, I am discovering that my syntax (see below) is failing to provide the column percentages for each response option in typol#7. I think that the reason for my failure is that I have declared typol#7 as a scale variable in order to get the mean of typol#7 for each column of the categorical variable called Barak_therm. Although I suspect that there is a way to get all of my desired statistics in a single table, I am unaware of the necessary trick. Thus, I welcome your help on this matter. CTABLES /VLABELS VARIABLES=typol#7 Barak_therm DISPLAY=DEFAULT /TABLE typol#7 [S][COLPCT.SUM PCT40.1, COUNT F40.0, MEAN F40.3] BY Barak_therm [C] /SLABELS POSITION=ROW /CATEGORIES VARIABLES=Barak_therm ORDER=A KEY=VALUE EMPTY=INCLUDE. Thank you for your help. David
|
|
See below Jon Peck SPSS, an IBM Company [hidden email] 312-651-3435
Jon, That's really a clever idea. Can that be done in syntax? How? I'm frightened to ask if this is documented but is it? >>>Yes, it is done in syntax. the [S] and [C] modifiers in the table expression dictate the measurement level and, hence, the interpretation of the table request. I don't know whether this is explicitly stated in the CTABLES documentation, but it is implied by the syntax. Here's what I sent offline for this problem (using employee data.sav). I'm not 100% sure that this is the table the poster requested, but it illustrates the multi-measurement level approach. CTABLES /VLABELS VARIABLES=minority jobcat DISPLAY=DEFAULT /TABLE minority [C][COLPCT.COUNT PCT40.1] + minority [S][COUNT F40.0, MEAN F40.2] BY jobcat [C] /SLABELS POSITION=ROW /CATEGORIES VARIABLES=minority jobcat ORDER=A KEY=VALUE EMPTY=INCLUDE TOTAL=YES POSITION=AFTER MISSING=EXCLUDE. Gene Maguin From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Jon K Peck Sent: Sunday, June 27, 2010 10:31 PM To: [hidden email] Subject: Re: Syntax for CTABLES I have a hard time picturing the table you want. I expect that others have the same problem. If the following tip doesn't lead you to a solution, I suggest that you post a small mockup of what you want. Tip: you can include the same variable in a table with different measurement levels. Using the dialog, drag the variable to the canvas; then right click, change the measurement level, and drag again. HTH, Jon Peck SPSS, an IBM Company [hidden email] 312-651-3435
Dear List Members, I am reposting this item because I have not had any responses to my previous posting. I need some help in revising my pasted syntax (see below) for CTABLES. I am trying to get several statistics normally produced by CTABLES to appear in a single table. I have two variables: Typol#7 which is a row variable and Barak_therm which is a column variable having six values. I want the following statistics to be reported in my table: column percentages in each column, the sum of the column percentages (100%) in each column, the weighted total count in each column, and the mean of typol#7 in each column. I should note that typol#7 has only three values which are -1, 0, +1. Using the syntax noted below, I do indeed get the correct column sum, the correct weighted count, and the correct mean for typol#7 in each column. Nevertheless, I am discovering that my syntax (see below) is failing to provide the column percentages for each response option in typol#7. I think that the reason for my failure is that I have declared typol#7 as a scale variable in order to get the mean of typol#7 for each column of the categorical variable called Barak_therm. Although I suspect that there is a way to get all of my desired statistics in a single table, I am unaware of the necessary trick. Thus, I welcome your help on this matter. CTABLES /VLABELS VARIABLES=typol#7 Barak_therm DISPLAY=DEFAULT /TABLE typol#7 [S][COLPCT.SUM PCT40.1, COUNT F40.0, MEAN F40.3] BY Barak_therm [C] /SLABELS POSITION=ROW /CATEGORIES VARIABLES=Barak_therm ORDER=A KEY=VALUE EMPTY=INCLUDE. Thank you for your help. David
|
|
In reply to this post by David B. Nolle
Hi Jon,
Yes! Thank you! Your syntax did exactly what I
needed.
David
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Free forum by Nabble | Edit this page |
