Re: using sample weight [message #17845 is a reply to message #17673] |
Mon, 24 June 2019 12:38 |
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
|
|
|