The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » Using weights in regression analysis
Re: Using weights in regression analysis [message #240 is a reply to message #229] Sat, 30 March 2013 19:14
 Reduced-For(u)m Messages: 292Registered: March 2013 Senior Member

From the DHS FAQs (under "using data files": http://www.measuredhs.com/faq.cfm):

***First, use the svyset command to tell Stata how your data is set up:

*generate weight
generate weight = v005/1000000

*make unique strata values by region/urban-rural (label option automatically labels the results)
egen strata = group(v024 v025), label
*check results
tab strata

*tell Stata the weight (using pweights for robust standard errors), cluster (psu), and strata:
svyset [pweight=weight], psu(v021) strata(strata)

****Now for a regression - if you prefix regress with "svy:" Stata will now know how to weight your data and compute the right standard errors

svy: reg Y X

***Quick note: computing standard errors in this way is probably not OK for a lot of regressions. Without getting off track or all statsy, a good way to think of this is that this standard error calculation is alright IF the error terms and covariates are independently and identically distributed across observations, other than as operating through the sampling procedure (the stratification and clustering prior to randomization that produces the particular sample you have). I tend to think of these standard errors as the smallest the "true" standard errors could possibly be, but I'm kind of on the conservative/stickler end of this debate, and others would surely disagree.

 Using weights in regression analysis By: DHS user on Wed, 20 February 2013 11:48 Re: Using weights in regression analysis By: Bridgette-DHS on Wed, 20 February 2013 11:50 Re: Using weights in regression analysis By: enuanand on Tue, 19 March 2013 23:32 Re: Using weights in regression analysis By: Fabrice LOTY on Wed, 20 March 2013 05:34 Re: Using weights in regression analysis By: Traore on Wed, 20 March 2013 03:54 Re: Using weights in regression analysis By: Trevor-DHS on Wed, 20 March 2013 20:17 Re: Using weights in regression analysis By: idas on Fri, 29 March 2013 13:59 Re: Using weights in regression analysis By: Reduced-For(u)m on Sat, 30 March 2013 19:14 Re: Using weights in regression analysis By: idas on Tue, 02 April 2013 13:15 Re: Using weights in regression analysis By: Bridgette-DHS on Thu, 11 April 2013 17:31 Re: Using weights in regression analysis By: mnicolson on Fri, 14 June 2013 16:18 Re: Using weights in regression analysis By: Reduced-For(u)m on Fri, 14 June 2013 17:24 Re: Using weights in regression analysis By: smgwu on Thu, 17 October 2013 20:19 Re: Using weights in regression analysis By: Reduced-For(u)m on Sun, 20 October 2013 19:09 Re: Using weights in regression analysis By: myigzaw on Tue, 16 April 2013 08:25 Re: Using weights in regression analysis By: Reduced-For(u)m on Fri, 19 April 2013 01:04 Re: Using weights in regression analysis By: Bridgette-DHS on Fri, 26 April 2013 10:48 Re: Using weights in regression analysis By: Khaing Zar on Sat, 22 September 2018 02:31 Re: Using weights in regression analysis By: Bridgette-DHS on Mon, 24 September 2018 09:16 Re: Using weights in regression analysis By: kindu on Sat, 25 January 2020 12:09 Re: Using weights in regression analysis By: soumava on Wed, 07 February 2018 16:49 Re: Using weights in regression analysis By: Bridgette-DHS on Thu, 08 February 2018 09:40 Re: Using weights in regression analysis By: Khaing Zar on Thu, 20 September 2018 21:14
 Previous Topic: Deriving district population size from DHS weights? Next Topic: Interpretation of Rescaled household level weights for India-NFHS4
Goto Forum:

Current Time: Mon Jun 17 03:47:50 Coordinated Universal Time 2024