Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: margins after xtnbreg, does it works?
From
Maarten Buis <[email protected]>
To
[email protected]
Subject
Re: st: margins after xtnbreg, does it works?
Date
Wed, 10 Jul 2013 10:51:19 +0200
You did not tell what kind of prediction -margins- should be looking
at, so -margins- looked at the default prediction of -xtnbreg-. You
can find out what the default is by typing in Stata -help xtnbreg
postestimation-. In this case the default is the linear predictor, so
it makes sense the the output of -margins- corresponds exactly with
the output of -xtnbreg-. If you wish to change that you will need to
specify the -predict- option of -margins-
Hope this helps,
Maarten
On Wed, Jul 10, 2013 at 8:50 AM, JUAN CRESPO CEPAS
<[email protected]> wrote:
> Dear all,
>
> I have some problems when using and interpreting the results of the
> -margins- command after a negative binomial regression with fixed effects
> (-xtnbreg, fe-). I run the following model in Stata 11 (windows):
>
> .xtnbreg y er ir dd c.dd#c.dd, i(nb) fe
>
> Then, I calculate the marginal effect of the variable dd when all the other
> (continuous) variables are at their mean value:
>
> .margins, dydx(dd) atmeans
>
> However, the value of the marginal effect is the same than the coefficient
> dd of the regression. I find this puzzling, and when I try to do the same
> with non panel data (-nbreg- and -margins-) the coefficient and the marginal
> effect are not the same. Moreover, if I give a particular value (different
> to the mean) to the other variables, for instance -er=1-:
>
> .margins, dydx(dd) at(er=(1)) atmeans
>
> I get the same result again. I find this puzzling too. This is not what I
> would expect since I am using a non linear model. Any insights about what I
> am doing wrong?
>
> Thanks for your consideration,
> Joan
>
> *
> * 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/
--
---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany
http://www.maartenbuis.nl
---------------------------------
*
* 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/