Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Assistance with margins after svy logistic


From   "Chang, Eva" <echang@jhsph.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Assistance with margins after svy logistic
Date   Wed, 26 Sep 2012 18:42:15 -0400

Hi,

I was wondering if I could get some help getting predicted probabilities using margins after svy: logistic using Stata 12. I tried a number of methods suggested online and recommended on statalist but can't seem to resolve the problem.

After running quietly xi: svy, subpop (pop1): logistic y x1 i.x2 i.x3 i.x4 i.x5...x13 where x1 is binary.
I tried a number of combinations using the margins command. Also, I did remove the xi in front of svy, but that did not change the errors.

The following commands gave me the error
vce(jackknife) is not supported
something that should be true of your data is not
r(459);

margins x1, subpop(pop1) vce(unconditional)
margins x1, subpop(pop1) vce(svy)

margins, over(x1) subpop(pop1) vce(unconditional)
margins, over(x1) subpop(if pop1==1) vce(unconditional)

The following gave me the different error
margins x1
'x1' not found in list of covariates
r(322);

The only variations I used that could make margins run was
margins, over(x1) subpop(pop1)
margins, over(x1)
However, I don't think this is correctly computing my standard error since it calculates a delta-method standard error.

Also, if this is helpful, I'm using the California Health Interview Survey public use file that uses replicate weights. I'm especially confused by the errors because when I svyset,  Stata tells me that the vce is jackknife.

Any help would be greatly appreciated!

Thank you for your consideration,
Eva

Eva Chang
PhD Candidate
Department of Health Policy and Management
Johns Hopkins Bloomberg School of Public Health
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index