Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: Assistance with margins after svy logistic

From   "Chang, Eva" <>
To   "" <>
Subject   st: Assistance with margins after svy logistic
Date   Wed, 26 Sep 2012 18:42:15 -0400


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

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

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 Chang
PhD Candidate
Department of Health Policy and Management
Johns Hopkins Bloomberg School of Public Health
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index