Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | <Seyi.Soremekun@lshtm.ac.uk> |
To | <statalist@hsphsun2.harvard.edu> |
Subject | st: estout margins and nlcom after xtgee |
Date | Sat, 26 Mar 2011 06:11:23 +0000 |
Dear Statalisters, Apologies if this posted multiple times. I would like to save the post-estimation results from a xtgee model into a table. I looked at previous posts regarding estout and margins, but they do not appear to cover my query. 1. This is my model: xtgee net i.location, i(zone) family(binomial) corr(ind) link(logit) robust eform // logistic regression with ORs and confidence interval margins location, post // risks/p in the groups location==0 and location==1 nlcom (log_risk_ratio: log(_b[1.location] / _b[0.location])) // risk ratio from margins with risk confidence interval, and z/p-values closest to xtgee estimates store model estout model using estout_table2.txt, cells("b(fmt(%9.2f)) ci(par( ( - ) )) p(fmt(%9.4f))") /// collab(RR "95% CI" p) append 2. The text file only has the individual group risks (i.e. risk in location=0 and risk in location=1) from the margins, not the risk ratio from the nlcom 3. According to the help for nlcom, the nlcom calculation of the ratio and 95% CI is saved in matrices e() and r(), so I'm not sure why the original marginal results are displayed and not the nlcom results. Is it a problem with estimates store? 4. I tried estadd scalar log_rr = _b[1.location] / _b[0.location]: model, but of course this just adds the ratio without the CI, etc.... thanks, Seyi Dr Seyi Soremekun Faculty of Epidemiology and Public Health London School of Hygiene and Tropical Medicine London WC1E 7HT +442079272464 * * 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/