Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Dimitriy V. Masterov" <dvmaster@gmail.com> |
To | Statalist <statalist@hsphsun2.harvard.edu> |
Subject | st: margins with logarithmic offsets |
Date | Fri, 9 Aug 2013 15:19:56 -0700 |
I have two questions about evaluating marginal effects at a specific value of the logarithmic offset variable. Adding the at option to the margins command gives offset not found in list of covariates error. I did not find anything on this issue in the documentation, but there was an old Stata FAQ about the mfx (an ancestor of margins) that suggested merely replacing like this: webuse dollhill3, clear poisson deaths i.smokes i.agecat, exposure(pyears) margins, dydx(smokes) replace pyears =20000 margins, dydx(smokes) 1) Is there a less clunky way to do this? 2) Does this correspond to -margins, dydx(smokes) at(pyears ==20000)-? Stata mfx FAQ link: http://www.stata.com/support/faqs/statistics/marginal-effects-after-offset/ * * 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/