The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » using sample weight
Re: using sample weight [message #17845 is a reply to message #17673] Mon, 24 June 2019 12:38 Go to previous message
boyle014 is currently offline  boyle014
Messages: 78
Registered: December 2015
Location: Minneapolis
Senior Member
Yes, you do have to use sample weights. You might be able to find the numbers you're looking for in StatCompiler.

If you want confidence intervals to see if the data points are statistically significantly different, I would recommend using IPUMS DHS. Begin by selecting all the Nepal samples. Then select the variables that interest you.

Here is an example of code that is comparing a continuous variable (age at first marriage across time). I imagine you would use something similar for your analysis, depending on your specific variable.

replace agefrstmar=. if agefrstmar==99.

svyset, clear

svyset [pw=perweight], psu(idhspsu) strata(idhsstrata) 

* Create a dummy age variable to use to limit analysis to younger women.

generate age20_35=0
replace age20_35=1 if age >= 20 & age <= 35

* Run a regression predicting age at first marriage by survey year (sample) for
* younger women.  

svy: regress agefrstmar i.sample if age20_35==1
margins sample
marginsplot

This will produce a figure with data points and confidence intervals over time.


Professor Elizabeth Boyle
Sociology & Law, University of Minnesota, USA
Principal Investigator, IPUMS-DHS
 
Read Message
Read Message
Previous Topic: Re-Numbering Survey_Year and Survey_Rounds
Next Topic: Pooling data & DV weights
Goto Forum:
  


Current Time: Wed Dec 18 12:37:53 Coordinated Universal Time 2024