Thank you very much for your help!]]>

Sample weights are generally divided by 1000000, but Complex Samples expects integer weights, so when you define your Complex Samples Analysis Plan, don't divide by 1000000, and remember that your population size will be 1000000 times too big.

There is a user forum post that already describes the Complex Samples Analysis Plan settings that are generally needed.

See https://userforum.dhsprogram.com/index.php?t=msg&goto=17 4&#msg_174

]]>

* 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.

]]>

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.

Awesome. thanks Trevor for the example, this will give me something to work off.

]]>

But after using the correct weight variable, I still have a challenge: I am running a logistic regression model (CSLOGISTIC) to study the stunting risk factors, using the KR file of the Rwanda DHS 2014-2015.

The challenge is that the sample design information table in the output says that for the unweighted cases, only 859 are valid and 2679 are invalid, which makes the sample size used for logistic regression only 857 instead of 3538!

Could you help me and clarify where I am getting it wrong?

I am running the model in SPSS and I have attached here the output table.

Thank you for your help!

Hope]]>