The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Pooled Survey MeLogit Syntax Query
Re: Pooled Survey MeLogit Syntax Query [message #10477 is a reply to message #10473] Wed, 27 July 2016 15:09 Go to previous messageGo to previous message
cmergenthaler is currently offline  cmergenthaler
Messages: 7
Registered: July 2016
Location: Netherlands
Member
Thank you for this very informative response. I was able to make the first suggestion work, using i.survey as a dummy variable. However, I ran into a few new problems when attempting to correct the svy:melogit model, which I understand is the best practice.

I hope I understood your suggestion well to create weights for both the survey and cluster level in order to be able to add in random effects. Clearly I am doing one or several things wrong still, so I'll continue to be grateful for your advice.

From myy original syntax I kept:

generate weight = v005/10000000
egen clusters=group(survey v021)

Then I created a variable called surveyweight for each survey: (female population ages 15-49 of country survey year) / (# females 15-49 in survey)

Then attempted to redo the svyset command correctly:
svyset survey, weight(surveyweight) || clusters, weight(v005)

Then ran the svy: melogit command once again as per your advice and the stata manual to which referred (thank you!):
svy: melogit child_cough_care v476_1 i.v013 i.religion i.v106 i.v190 HIV_accept [pweight=weight] || survey: || clusters:
Then received error message: weights not allowed

So I removed [pweight=weight], although I don't know that this is correct to do, and then ran the model without it:
svy: melogit child_cough_care v476_1 i.v013 i.religion i.v106 i.v190 HIV_accept || survey: || clusters:
And as you rightly predicted, it never converged...

I cannot understand why the weight [pweight=weight] was not allowed, but I suppose that since it still does not converge even after removal of the weight, I should go for the metaan step. Can you kindly clarify?

Thank you in advance for any further assistance!

Christina

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: family planning demand satisfying (Bangladesh DHS 2004, 1999-00, 1996-97, 1993-93)
Next Topic: weighting for Services Provision Assessment data
Goto Forum:
  


Current Time: Mon Sep 2 13:24:54 Coordinated Universal Time 2024