The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » Weights for survey-specific tabulations with pooled data
Re: Weights for survey-specific tabulations with pooled data [message #13400 is a reply to message #13376] Tue, 31 October 2017 17:25 Go to previous message
Reduced-For(u)m
Messages: 292
Registered: March 2013
Senior Member

1. Re: weights - if you are only tabulating one survey at a time, just use the weights as given. That is what they are for.

2. Re: svyset - it depends, I guess, on "when" in the code you set the svyset command. But in general, again using only one survey at a time (and setting up svyset each time) you don't need to do anything different. But this depends a little bit on the way you run your code.

3. Re: bysort - instead of doing a "by" and even-type command, I would just run a loop. So if you take a list of the names of all your survey files, and put them in a global macro like:

global Datasets "Data1.dta Data2.data ... "

foreach data of global Datasets {
use `data', clear
[data cleaning here]
[svyset command here]
svy: tab Y
}

That will loop through each of your datasets and tabulate the outcomes of interest. You could also export that info straight to TeX or Excel or whatever using the "estout" suite, and then when the loop was done you'd have all your tables already built for you, exactly the same way for each survey.

Hope that helps.

 
Read Message
Read Message
Previous Topic: Weighting data for descriptive analysis of background characteristics
Next Topic: Rwanda 2014 HIV weights
Goto Forum:
  


Current Time: Wed Dec 4 22:56:39 Coordinated Universal Time 2024