Weights for survey-specific tabulations with pooled data [message #13376] |
Mon, 30 October 2017 10:56 |
cgreenba
Messages: 18 Registered: October 2017
|
Member |
|
|
Hello,
I have pooled DHS surveys from over 30 countries, looking at 2 or 3 surveys per/country. I am interested in looking at family planning and unmet need indicators by wealth quintile for each survey. I am not planning on running any regressions or analysis that would look at the pooled data, but am instead just interested in looking at tabulations for each survey. Given this analysis, can I use the normalized weights (v005/1000000) or do I need to de-normalize the weights based on each survey? Also, if I am just looking at the data for each survey separately, do I still need to change the PSU and strata variables when I use svyset? And finally, does anyone have tips on using bysort or by options with the svy command? I want to repeat the same tabulation for each survey, but have having trouble doing this efficiently with the svy command. Any help would be greatly appreciated! Thank you so much!
Best,
Charlotte G
|
|
|
Re: Weights for survey-specific tabulations with pooled data [message #13400 is a reply to message #13376] |
Tue, 31 October 2017 17:25 |
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.
|
|
|