Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Richard Williams <richardwilliams.ndu@gmail.com> |
To | statalist@hsphsun2.harvard.edu, statalist@hsphsun2.harvard.edu |
Subject | Re: st: Bug in margins |
Date | Fri, 30 Aug 2013 11:51:22 -0500 |
Assuming that is the case, this is no error. The i. tells Stata that the variable is categorical rather than continuous. See the help for margins. Or, for some highlights on the margins command, see
http://www3.nd.edu/~rwilliam/stats/Margins01.pdf At 10:39 AM 8/30/2013, roland andersson wrote:
I am analysing a logistic regression model, binary outcome. I want to analyse the adjusted proportion of the outcome for a binary (0/1) covariate. I run the logistic model followed by margins . logistic dod30dgr i.lapscopiintent alder aldersq........ . margins lapscopiintent I get an error 'lapscopiintent' not found in list of covariates r(322); If I put i. before the binary variable I am interested in . logistic dod30dgr i.lapscopiintent alder aldersq................ . margins lapscopiintent Predictive margins Number of obs = 166811 Model VCE : OIM Expression : Pr(dod30dgr), predict() Delta-method Margin Std. Err. z P>z [95% Conf. Interval] lapscopiin~t 0 .0015466 .0000985 15.70 0.000 .0013535 .0017397 1 .0011487 .0002518 4.56 0.000 .0006552 .0016421 I assume this is a bug? Roland Andersson * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/
------------------------------------------- Richard Williams, Notre Dame Dept of Sociology OFFICE: (574)631-6668, (574)631-6463 HOME: (574)289-5227 EMAIL: Richard.A.Williams.5@ND.Edu WWW: http://www.nd.edu/~rwilliam * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/