Generating new variables in dataset with weighting [message #4043] |
Fri, 20 March 2015 10:44 ![Go to next message Go to next message](/theme/default/images/down.png) |
Lizzynaija
Messages: 12 Registered: February 2015 Location: United States
|
Member |
|
|
Hello,
I have been working with the 2013 Nigeria DHS births recode dataset, using Stata for my analysis.
I have applied svyset to enable weighting in the analysis. After reading the Stata manual, I became confused as to how to generate new variables now that I have applied svyset command. In particular, I am not sure about when to apply the svy subpop command.
Can I still use the regular "generate" command to create new variables, and when and how should I apply the "svy subpop" command?
Thank you very much,
Lizzynaija
|
|
|
Re: Generating new variables in dataset with weighting [message #4119 is a reply to message #4043] |
Thu, 02 April 2015 08:17 ![Go to previous message Go to previous message](/theme/default/images/up.png) |
Bridgette-DHS
Messages: 3151 Registered: February 2013
|
Senior Member |
|
|
Following is a response from Senior DHS Stata Specialist, Tom Pullum:
If you redefine any of the variables that are used in an svyset command, after specifying svyset, I would recommend that you re-set svyset, even if the command would be exactly the same. However, I don't know for sure that it's necessary. You could easily check by doing two runs, one with a repeat of svyset and one without, to see whether the results are affected. In general, I prefer to put svyset after any recoding and as close to the estimation commands as possible, just to make it easier to read what the model is.
|
|
|