Good evening, Listserv,
I am running a large custom table in which three of variables (INCOME) has 1,2 as assigned values. In this particular case, INCOME 3 has are 45 respondents, which breaks down as 45 respondents chose '1' and only 1 respondent chose '2'. In my custom table only '1' is populating in the output. Here is a simplified copy of the code I am using. Even though the '2' value has data associated-it doesn't pull into the custom table. CODE: CTABLES /VLABELS VARIABLES=SEX AGE RACEGROUP1 RACEGROUP2 RACEGROUP3 RACEGROUP4 RACEGROUP5 GOAL01 GOAL03 GOAL05 GOAL06 GOAL08 GOAL13 GOAL21 INCOME1 INCOME2 INCOME3 DISPLAY=LABEL /TABLE SEX [C][COLPCT.VALIDN PCT40.1, TOTALS[MEAN F40.2]] + AGE [C][COLPCT.VALIDN PCT40.1, TOTALS[MEAN F40.2]] + RACEGROUP1 [C][COLPCT.VALIDN PCT40.1, TOTALS[MEAN F40.2]] + RACEGROUP2 [C][COLPCT.VALIDN PCT40.1, TOTALS[MEAN F40.2]] + RACEGROUP3 [C][COLPCT.VALIDN PCT40.1, TOTALS[MEAN F40.2]] + RACEGROUP4 [C][COLPCT.VALIDN PCT40.1, TOTALS[MEAN F40.2]] + INCOME1 [C][COLPCT.VALIDN PCT40.1, TOTALS[MEAN F40.2]] + INCOME2 [C][COLPCT.VALIDN PCT40.1, TOTALS[MEAN F40.2]] + INCOME3 [C][COLPCT.VALIDN PCT40.1, TOTALS[MEAN F40.2]] + GOAL01 [C][COLPCT.VALIDN PCT40.1, TOTALS[MEAN F40.2]] + GOAL03 [C][COLPCT.VALIDN PCT40.1, TOTALS[MEAN F40.2]] + GOAL05 [C][COLPCT.VALIDN PCT40.1, TOTALS[MEAN F40.2]] + GOAL06 [C][COLPCT.VALIDN PCT40.1, TOTALS[MEAN F40.2]] + GOAL08 [C][COLPCT.VALIDN PCT40.1, TOTALS[MEAN F40.2]] + GOAL13 [C][COLPCT.VALIDN PCT40.1, TOTALS[MEAN F40.2]] + GOAL21 [C][COLPCT.VALIDN PCT40.1, TOTALS[MEAN F40.2]] /SLABLES POSITION=ROW VISIBLE=NO /TITLES TITLE='OMS' /CATEGORIES VARIABLES=SEX RACEGROUP1 RACEGROUP2 RACEGROUP3 RACEGROUP4 INCOME1 INCOME2 INCOME3 [1,2] GOAL01 GOAL03 GOAL05 GOAL06 GOAL08 GOAL13 GOAL21 ORDER=D KEY=VALUE EMPTY=INCLUDE TOTAL=YES LABEL='Mean' POSITION=AFTER /CATEGORIES VARIABLES=AGE ORDER=A KEY=VALUE EMPTY=INCLUDE TOTAL=YES LABEL='Mean' POSITION=AFTER. In my research I found I can list the values included in the output for the INCOME variables. For example I have tried INCOME3 [1,2] EMPTY=INCLUDE in a couple of different ways. If I write it as income 3 [1,2] (as above) I get an error on variable GOAL01. If I write the code with a different categorical variables line as: /categorical variables= income1 income2 income3 [1,2] empty=include. I get an error that says, "empty" is an invalid subcommand. I am clearly missing something. Any advice would be appreciated. Thank you. Maria |
I haven't understood you problem very clearly but reading between the lines...
Try separating out the INCOME variables in the CATEGORIES sub-command: /CATEGORIES VARIABLES=INCOME1 INCOME2 INCOME3 [1,2,3] ORDER=D KEY=VALUE EMPTY=INCLUDE TOTAL=YES LABEL='Mean' POSITION=AFTER /CATEGORIES VARIABLES=SEX RACEGROUP1 RACEGROUP2 RACEGROUP3 RACEGROUP4 GOAL01 GOAL03 GOAL05 GOAL06 GOAL08 GOAL13 GOAL21 ORDER=D KEY=VALUE EMPTY=INCLUDE TOTAL=YES LABEL='Mean' POSITION=AFTER Are all the variables you are tabulating in that CTABLE dichotomous? I would assume so else TOTALS[MEAN] wouldn't make much intuitive sense (if they are of categorical nature). And if they are all of dichotomous nature then perhaps the CTABLES could be constructed more efficiently. If you were to describe the nature of the variables and what you are aiming to extract a 'better' approach could be suggested that you might find more effective to work with than what you have currently... |
..are you sure Income3 takes values 1,2 and not 0,1?
|
In reply to this post by Jignesh Sutar
Thank you for your response. There are 178 variables in the data set which goes into a distributed report. The INCOME variables are dichotomous and they are coded as 1,2 not 0,1- in addition there are several variables coded as dichotomous. However, majority of the variables in this dataset have multiple category responses.
I tried the code you suggested of separating out the INCOME variables in the CATEGORIES sub-command- and I got this warning: "CATEGORIES: ORDER, KEY and MISSING cannot be used when a list of categories is specified. Execution of this command stops". However, I did try separating the INCOME variables in then CATEGORIES sub-command-only using /CATEGORIES VARIABLES=INCOME1 INCOME2 INCOME3 [1,2] EMPTY=INCLUDE. This statement worked. However, I still need the response options in descending order. Any advice or am I out of luck? Thanks again. |
What do the variables Income1, Income2, Income3 represent?
Could you share a print screen of the table (making sure the variable and value labels are switch on and visible)? Something does not feel right, in that you would be using TOTALS[MEAN F40.2] on a 1,2 scale for Income1 to Income3? Where I suppose 1,2 are categorical representation of the data so there is no intuition in the interpretation of the mean score? |
The INCOME1,2,3 variables represent household income. We recode INCOME to collapse household income into 3 categories <30K, 30K to 149K, 150K or more. The response option coding 1=no, 2=yes if you will, meaning if coded as 2 for INCOME1, then household income is <30K. And they are categorical variables.
The only thing that MEAN is useful for is calculating MEAN SAT/ACT scores, which we do provide in our report. The MEAN scores generated for most variables are not utilized. |
Free forum by Nabble | Edit this page |