The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » using SPSS Complex Samples
Re: using SPSS Complex Samples [message #2767 is a reply to message #2764] Thu, 21 August 2014 11:15 Go to previous messageGo to previous message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 787
Registered: January 2013
Senior Member
Here is a simple example of creating a complex sampling plan using a women's recode (IR) data file (open the data file before running the commands):

* Create weight variable.
compute wt = V005/1000000.
* Define strata variable, sometimes V022, V023, or combination of V024 and V025.
compute strata = V022.
* or urban/rural within region..
compute strata = V024*2 + V025.

CSPLAN ANALYSIS
 /PLAN FILE='C:\Temp\DHS_IR.csplan'
 /PLANVARS ANALYSISWEIGHT=wt
 /DESIGN  STRATA= strata  CLUSTER= V021
 /ESTIMATOR TYPE=WR.

* Define variable to use in analysis.
* Secondary education or higher.
compute sec = (V106 = 2 or V106 = 3).

* Complex Samples Descriptives.
CSDESCRIPTIVES
 /PLAN FILE = 'C:\Temp\DHS_IR.csplan'
 /SUMMARY VARIABLES = sec
 /MEAN
 /STATISTICS SE CV COUNT POPSIZE DEFF DEFFSQRT CIN
 /MISSING SCOPE = ANALYSIS CLASSMISSING = EXCLUDE.


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Using sample weights
Next Topic: Weighted data and population size
Goto Forum:
  


Current Time: Thu Mar 28 18:42:14 Coordinated Universal Time 2024