Weird loss of values in crosstabs

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Weird loss of values in crosstabs

John F Hall
I'm replicating an exercise from MacInnes, Secondary Data Anlysis (Sage 2017) using an 8-item depression inventory from the 2012 European Social Survey.   A software error in CAPI meant that the 8th item was not asked in Albania.  He does imputes a score for Albanians by multiplying their score across 7 items by a factor of 8/7.  I'm running checks to see if this is legitmate.  I've a feeling that this is not comparing like with like.

Exercise 1 is to count the number of missing values across the 8 items.

COUNT depmiss2=fltdpr flteeff slprl wrhpp fltlnl enjlf fltsd cldgng (7 8 9).

FREQ depmiss2 .

depmiss2
Frequency Percent Valid Percent Cumulative Percent
Valid      .00  53542 94.2 94.2 94.2
1.00         2136 3.8 3.8 98.0
2.00           641 1.1 1.1 99.1
3.00           201 .4 .4 99.4
4.00             88 .2 .2 99.6
5.00             76 .1 .1 99.7
6.00             26 .0 .0 99.8
7.00             41 .1 .1 99.9
8.00             84 .1 .1 100.0
Total      56835   100.0100.0



Exercise 2 is to use SUM.7 to take account of the missing item in Alabania..

COMPUTE depress7from8 = sum.7 (fltdpr, flteeff, slprl, wrhpp2, fltlnl, enjlf2, fltsd, cldgng) .
FREQ depress7from8 .

depress7from8
Frequency Percent Valid Percent Cumulative Percent
Valid 7.00                24     .0 .0 .0
8.00         2530 4.5 4.5 4.6
9.00         3092 5.4 5.6 10.1
10.00 5103 9.0 9.2 19.3
11.00 5716 10.1 10.3 29.6
12.00 5773 10.2 10.4 39.9
13.00 5388 9.5 9.7 49.6
14.00 5176 9.1 9.3 58.9
15.00 4622 8.1 8.3 67.2
16.00 3881 6.8 7.0 74.2
17.00 3214 5.7 5.8 80.0
18.00 2716 4.8 4.9 84.8
19.00 1829 3.2 3.3 88.1
20.00 1481 2.6 2.7 90.8
21.00 1204 2.1 2.2 93.0
22.00 1073 1.9 1.9 94.9
23.00 721 1.3 1.3 96.2
24.00 699 1.2 1.3 97.4
25.00 418 .7 .8 98.2
26.00 324 .6 .6 98.8
27.00 198 .3 .4 99.1
28.00 113 .2 .2 99.3
29.00 154 .3 .3 99.6
30.00 92 .2 .2 99.8
31.00 48 .1 .1 99.9
32.00 82 .1 .1 100.0
Total 55671 98.0 100.0
Missing System 1164 2.0
Total 56835 100.0

When I ask for a contingency table values 2 thru 8 for depmiss2 disappear

CRO depress7from8 by depmiss2 .

depress7from8 * depmiss2 Crosstabulation
Count 
depmiss2 Total
00 1.00
depress7from8      7.00          2         22 24
8.00         2427 102 2529
9.00         2977 114 3091
10.00 4899 204 5103
11.00 5460 256 5716
12.00 5610 163 5773
13.00 5167 221 5388
14.00 4968 207 5175
15.00 4453 169 4622
16.00 3734 148 3882
17.00 3090 123 3213
18.00 2610 106 2716
19.00 1749 80 1829
20.00 1426 56 1482
21.00 1130 74 1204
22.00 1053 20 1073
23.00   705 17 722
24.00   681 18 699
25.00   400 18 418
26.00   319 5 324
27.00   196 2 198
28.00   108 5 113
29.00   154 0 154
30.00     92 0 92
31.00     48 0 48
32.00     82 0 82
Total 53540 2130 55670

Any idea why?  Sorry about the table formats: they won't copy to gmail..  Hope to get Outlook back soon.

If anyone wants to check for themselves, the video and syntax for Chapter 5 video 6 are on the companion website:  

John F Hall

[Retired academic survey researcher]

IBM-SPSS Academic author 9900074

 

Email:        johnfhall@... 

Website:   http://surveyresearch.weebly.com/

Course:     http://surveyresearch.weebly.com/1-survey-analysis-workshop-spss.html

Research: http://surveyresearch.weebly.com/3-subjective-social-indicators-quality-of-life.html


===================== 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
Reply | Threaded
Open this post in threaded view
|

Re: Weird loss of values in crosstabs

John F Hall
I've managed to get the desired output by creating a new data set with only the variables of interest.
cntry "Country of survey" is a string: country is produced with AUTORECODE

use all.
count depmiss2=fltdpr flteeff slprl wrhpp fltlnl enjlf fltsd cldgng(7 8 9).
formats depmiss2 (f2.0).
frequencies  depmiss2.


recode enjlf wrhpp (1=4)(2=3)(3=2)(4=1)(else = copy) into enjlf2 wrhpp2 .
missing values enjlf2 wrhpp2 (7,8,9) .
compute depress_7 = sum.7(fltdpr, flteeff, slprl, fltlnl, fltsd, enjlf2, wrhpp2)-7.
formats depress_7 (f2.0).
variable labels depress_7 "Depression score without cldgng" .
frequencies depress_7 /format notable  /histogram normal .

Almost by instinct I went back to the source data set and tried:
filter off .

​Bingo!​  Both tables specified with:
crosstabs cntry by depmiss2.
crosstabs country by depmiss2.
​now display all values of depmiss2.​

John F Hall

[Retired academic survey researcher]

IBM-SPSS Academic author 9900074

 

Email:        johnfhall@...  

Website:   http://surveyresearch.weebly.com/

Course:     http://surveyresearch.weebly.com/1-survey-analysis-workshop-spss.html

Research: http://surveyresearch.weebly.com/3-subjective-social-indicators-quality-of-life.html








===================== 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