P.Mean: So you're thinking about a complex survey analysis (created 2016-05-10).

News: I'm blogging now. Go to http://blog.pmean.com.

I'm helping someone who is looking at a secondary data analysis that involves a complex sampling schemes. This means that the survey used cluster sampling, and/or stratified sampling, and/or survey weights. You need to learn specialized software if you want to analyze complex surveys data properly. Here's how you would do it in SPSS.

I'm using as an example the 2012 emergency department data from NHAMCS. I first downloaded the raw data, but then I found an SPSS file with value and variable labels and some (but not all) missing value codes) at

--> ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/dataset_documentation/nhamcs/spss/

You also need to read the documentation, available in PDF format at

--> ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Dataset_Documentation/NHAMCS/doc12_ed.pdf

and especially Appendix I (A). In particular, the appendix tells you

To obtain variance estimates which take the sample design into account, IBM SPSS Inc.'s Complex Samples module can be used. This description applies to version 21.0. From the main menu, first click on 'Analyze', then 'Complex Samples', then 'Prepare for Analysis'. The 'Analysis Preparation Wizard' can be used to set CSTRATM as the stratum variable, CPSUM as the cluster variable, and PATWT as the weighting variable.

I'm using version 22, but things haven't really changed. Here's the first dialog box.

First dialog box

I choose a boring name (ed2012plan) and clicked on the NEXT button.

Second dialog box

Then I put the CSTRATM, CPSUM, and PATWT variables in the appropriate spots and clicked on the FINISH button (actually I peeked at what happens if you click NEXT and decided that I wanted the default options all the way through). I decided to run frequencies

Third dialog box

The system gave me a warning message

Fourth dialog box

I'll investigate this later and report back to you.

SPSS dialog box

Here's the output.

SPSS dialog box

Here's the output

SPSS output

SPSS dialog box

SPSS dialog box

SPSS output

SPSS dialog box

SPSS output

SPSS dialog box

SPSS dialog box

SPSS output

SPSS output

SPSS output

SPSS output

SPSS output

SPSS output

Creative Commons License This page was written by Steve Simon and is licensed under the Creative Commons Attribution 3.0 United States License. Need more information? I have a page with general help resources. You can also browse for pages similar to this one at Category: Observational studies.