The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Setting the Data for Survey Analysis-Stata
Setting the Data for Survey Analysis-Stata [message #27035] Tue, 13 June 2023 07:09 Go to next message
dnameispaone is currently offline  dnameispaone
Messages: 19
Registered: February 2019
Member
Hi There,

I am trying to replicate the NFHS-5 tables related to Family Planning Indicators.

I using the following command to set my data for survey analysis

gen weight = v005/1000000
gen psu = v021
gen strata = v023

svyset psu [pw = weight], singleunit(certainty) strata(strata) vce(linearized)


svy, subpop (curr_married): tab ster, per missing ci format (%10.2f)
svy, subpop (ever_marry): tab ster, per missing ci format (%10.2f)


Are the above commands correct? Particularly the svyset command?

Because my results are not matching those given in the NFHS-5 report.
Re: Setting the Data for Survey Analysis-Stata [message #27043 is a reply to message #27035] Wed, 14 June 2023 07:50 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3185
Registered: February 2013
Senior Member

Following is a response from Senior DHS staff member, Tom Pullum:

To construct tables, you do not need a full svyset command. For frequencies, percentages, means, and rates you only need to use weights. The adjustments for clustering and stratification only affect standard errors, confidence intervals, and test statistics.

To construct a table of A vs B, where A and B are categorical variables, you can choose between two options, either "tab A B [iweight=v005/1000000]" or "svyset [pweight=v005]" and "svy: tab A B". The first option is easier but they will give the same results.

If you use the first option, with iweight, you have to divide v005 by 1000000. If you use the second option, with pweight, you do NOT need to divide by 1000000. You can if you want, but it will make no difference for your results.

You would use the full svyset command with estimation commands, such as "regress Y X". You have specified it correctly. I would not usually include a design option ("vce()") in svyset but you can certainly do that.

Re: Setting the Data for Survey Analysis-Stata [message #27044 is a reply to message #27043] Wed, 14 June 2023 10:33 Go to previous messageGo to next message
dnameispaone is currently offline  dnameispaone
Messages: 19
Registered: February 2019
Member

Thank you very much for taking out the time to clear my doubts.

आपका बहुत-बहुत धन्यवाद
नमस्ते!
Re: Setting the Data for Survey Analysis-Stata [message #27137 is a reply to message #27044] Tue, 20 June 2023 08:41 Go to previous messageGo to next message
fdsouza is currently offline  fdsouza
Messages: 7
Registered: May 2023
Member
Hi,

I am using the DHS India data to evaluate the effect of rainfall on birthweights. The variables I am using include birthweight, weight of mother, religion, caste, education and wealth. Just to confirm, do I need to survey set my data before running my regressions or not? I am not using any weighted variables.
Re: Setting the Data for Survey Analysis-Stata [message #27214 is a reply to message #27137] Fri, 30 June 2023 11:03 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3185
Registered: February 2013
Senior Member

Following is a response from DHS staff member, Tom Pullum:

Sorry for the delay in this response. All the variables you mentioned are in the standard recode files and are affected by the survey design--weights, clusters, and strata. You should use svyset and svy for any estimation commands.

The adjustments for weights, clusters, and strata apply to all cases, not to specific variables.
Previous Topic: Number of married couple
Next Topic: command for Cluster Average of Women's employment
Goto Forum:
  


Current Time: Fri Nov 1 21:30:25 Coordinated Universal Time 2024