using SPSS Complex Samples [message #1365] |
Tue, 18 February 2014 08:27 |
fldekoning
Messages: 5 Registered: February 2014 Location: Netherlands
|
Member |
|
|
I have been trying to replicate data from the Mozambique 2011 DHS using SPSS Complex Samples, but failed to do so. I want to use Complex Samples because I need confidence intervals. Whatever I do, I get a warning that the weight variable is ignored. I scrutinized the User Forum as well as the MeasureDHS website, but could not find the right information. On the contrary, some info was conflicting, e.g. whether or not to divide the sample weight by 1000000. Could someone help me out by providing detailed info on how to complete the CS Analysis Plan? As far as I know, the design of the Mozambique DHS is quite typical for DHS (stratification by provinces and urban/rural; pps for clusters; fixed cluster sizes, 20 for urban and 25 for rural).
Thank you very much for your help!
|
|
|
Re: using SPSS Complex Samples [message #1375 is a reply to message #1365] |
Wed, 19 February 2014 15:28 |
Trevor-DHS
Messages: 805 Registered: January 2013
|
Senior Member |
|
|
The message about the weight variable being ignored is not a problem. This message appears because you have set the weight in a Weight By command, and then you have defined a weight in the complex samples analysis plan. The message about weight being ignored is just telling you that the weight set in the Weight By command is being ignored, and instead it is using the weight defined in the complex samples analysis plan.
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
[Updated on: Mon, 11 December 2017 18:57] Report message to a moderator
|
|
|
|
|
|
Re: using SPSS Complex Samples [message #9326 is a reply to message #2767] |
Fri, 11 March 2016 04:08 |
Sahara
Messages: 2 Registered: March 2016
|
Member |
|
|
Trevor-DHS wrote on Thu, 21 August 2014 11:15Here 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.
[Updated on: Mon, 11 December 2017 18:48] by Moderator Report message to a moderator
|
|
|
Re: using SPSS Complex Samples [message #17721 is a reply to message #9326] |
Tue, 14 May 2019 08:34 |
Hope
Messages: 9 Registered: April 2018
|
Member |
|
|
The post here about not dividing the weight variable for complex sample analysis really solved a big heartache for me, as I had set the CSplan with a weight I had divided with 10000000.
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
[Updated on: Tue, 14 May 2019 08:35] Report message to a moderator
|
|
|