Dear Stata users,
I am quite new to Stata, so my question can sound basic.
I am running a GEE model for binary outcomes in Stata, and would like to extract marginal probabilities, to then estiamte marginal risk ratios.
To demonstrate the problem, I will use a toenail example, available for Stata users.
So, after running the GEE, I calculate marginal probabilties of toenail infection at months 1,2,3. Then, I would like to estiamte risk ratios (ratio of probabilities) of infection at month 1 versus month 2.
I tried to do that with nlcom, but Stata does not recognize _b[2.month]. I tried to modify the reference to month using "_at", but nothing seems to work.
Can somebody let me know what's wrong? Is there a way to check how exactly Stata stores the risk estimates for each month?
Thank you in advance!
Marina
I am quite new to Stata, so my question can sound basic.
I am running a GEE model for binary outcomes in Stata, and would like to extract marginal probabilities, to then estiamte marginal risk ratios.
To demonstrate the problem, I will use a toenail example, available for Stata users.
use http://www.stata-press.com/data/mlmus3/toenail, clear
quietly xtset patient
xtgee outcome i.treatment##c.month, link(logit) family(binomial) corr(exchangeable) vce(robust) eform
margins, at(month=(1 2 3)) predict(mu) post
nlcom (_b[2.month] / _b[1.month])
quietly xtset patient
xtgee outcome i.treatment##c.month, link(logit) family(binomial) corr(exchangeable) vce(robust) eform
margins, at(month=(1 2 3)) predict(mu) post
nlcom (_b[2.month] / _b[1.month])
I tried to do that with nlcom, but Stata does not recognize _b[2.month]. I tried to modify the reference to month using "_at", but nothing seems to work.
Can somebody let me know what's wrong? Is there a way to check how exactly Stata stores the risk estimates for each month?
Thank you in advance!
Marina

Comment