Pooled Survey MeLogit Syntax Query [message #10405] |
Tue, 26 July 2016 05:16 |
cmergenthaler
Messages: 7 Registered: July 2016 Location: Netherlands
|
Member |
|
|
Dear DHS experts,
I would be grateful to have your insight as to whether my Stata version 14 syntax is logical for the following analysis:
I am attempting to run an melogit model on pooled data from 13 surveys (4 of which are repeated surveys from two countries), in which a number of individual and household variables (ie age category, religion, wealth index, and child health) are used to predict a binary outcome variable of care being provided for a sick child. All data used are collected from moms only.
Based mostly on Tom Pullman's very helpful advice from the thread: "sampling stratification of the Cameroon DHS 2011, 2004, 1998 and 1991 data", I have borrowed some of the following syntax:
generate weight = v005/10000000
egen clusters=group(survey v021)
egen strata = group(survey v024 v025)
svyset clusters [pweight=weight], strata(strata) singleunit(centered)
*Then my survey melogit command is:
svy: melogit child_cough_care v476_1 i.v013 i.religion i.v106 i.v190 HIV_accept
Can someone kindly clarify whether I have weighted this correctly, and whether it properly accounts for fixed and random effects?
Thank you in advance!
Kind regards,
Christina
|
|
|
|
|
Re: Pooled Survey MeLogit Syntax Query [message #10477 is a reply to message #10473] |
Wed, 27 July 2016 15:09 |
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
|
|
|
|
Re: Pooled Survey MeLogit Syntax Query [message #10482 is a reply to message #10479] |
Thu, 28 July 2016 04:41 |
cmergenthaler
Messages: 7 Registered: July 2016 Location: Netherlands
|
Member |
|
|
Thank you very much - by excluding the pweight and using the v005/10000000 as the weight for the cluster, the model converges! Much appreciated.
For others if it's helpful, that's:
generate weight = v005/10000000
egen clusters=group(survey v021)
svyset survey, weight(surveyweight) || clusters, weight(weight)
svy: melogit child_cough_care v476_1 i.v013 i.religion i.v106 i.v190 HIV_accept || survey: || clusters:
This has helped me to move forward with my analysis.
|
|
|