The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » using SPSS Complex Samples
using SPSS Complex Samples [message #1365] Tue, 18 February 2014 08:27 Go to next message
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 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 787
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 #1392 is a reply to message #1375] Thu, 20 February 2014 16:01 Go to previous messageGo to next message
fldekoning
Messages: 5
Registered: February 2014
Location: Netherlands
Member
Thank you Trevor, using WR instead of WOR did the trick. Strange though, because the actual procedure was WOR!
Re: using SPSS Complex Samples [message #2764 is a reply to message #1392] Thu, 21 August 2014 09:11 Go to previous messageGo to next message
Javeria Basharat is currently offline  Javeria Basharat
Messages: 4
Registered: August 2014
Location: house#14, street#5, block...
Member
I want to know, how to make a complex sapling plan using IBM SPSS Statistics 20. I have read a lot of formats but they are not in detail because of which i cannot access my sampling plan and because of this i cannot carry out my further research. I have been using DHS data, please give suggestions regarding this.
Re: using SPSS Complex Samples [message #2767 is a reply to message #2764] Thu, 21 August 2014 11:15 Go to previous messageGo to next 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.


Re: using SPSS Complex Samples [message #9326 is a reply to message #2767] Fri, 11 March 2016 04:08 Go to previous messageGo to next message
Sahara is currently offline  Sahara
Messages: 2
Registered: March 2016
Member
Trevor-DHS wrote on Thu, 21 August 2014 11:15
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.

[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 Go to previous message
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

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


Current Time: Thu Mar 28 05:08:53 Coordinated Universal Time 2024