Adjusting survey weights in melogit in Stata [message #23634] |
Sat, 23 October 2021 11:25 |
Asantie
Messages: 3 Registered: October 2021
|
Member |
|
|
Hi DHSers,
I am currently using Ethiopian DHS 2016 data to examine predictors of institutional delivery
Based on IR data, I have created necessary dependent (outcome) and independent variables (varlist). In the analysis I would like to consider the complex survey design nature of DHS survey and used the following STATA code:
gen female_wgt= v005 /1000000
svyset v021 [pw=female_wgt], strata(v023)
svy: melogit outcome varlist if ANC_use==1 || v001:
But I received the following error message:
survey final weights not allowed with multilevel models;
a final weight variable was svyset using the [pw=exp] syntax, but multilevel models require
that each stage-level weight variable is svyset using the stage's corresponding weight()
option an error occurred when svy executed melogit"
I think the problem is with the code I used to specify "pw" or "weight" Could you please help me how I need to write the command for svyset and svy with proper weight code????
Many thanks in advance
Asantie
[Updated on: Sat, 23 October 2021 11:27] Report message to a moderator
|
|
|
|
|
Re: Adjusting survey weights in melogit in Stata [message #23649 is a reply to message #23648] |
Tue, 26 October 2021 10:07 |
Shireen-DHS
Messages: 140 Registered: August 2020 Location: USA
|
Senior Member |
|
|
Hello,
The Stata code is provided in the report in Appendix B using Zimbabwe as an example. The report gives detailed instructions. You will need to use the Final report for the survey you are working on and fill in the required numbers from Appendix A. We cannot provide complete the exercise for your specific survey. Please read the instruction and example code to adapt to your survey.
Best,
Shireen Assaf
The DHS Program
|
|
|