Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: mfx after xtmelogit


From   [email protected] (Roberto G. Gutierrez, StataCorp)
To   [email protected]
Subject   Re: st: mfx after xtmelogit
Date   Sun, 01 Mar 2009 15:44:06 -0600

Federico Belotti <[email protected]> writes:

> I've a problem with mfx after xtmelogit. The error I get is the following:

> data have changed since estimation r(459);

> You can try using the following commands and observe the error alone:

> webuse bangladesh
> xtmelogit c_use urban age child* || district: urban
> mfx, eyex predict(mu)

Federico has encountered a bug in -mfx- after -xtmelogit-, and we will fix
this bug in a future ado update.  Unforunately, the resolution of this bug is
merely trading one error message for another one.  

The error message arises because the -mu- prediction includes estimated random
effects, which are not estimated as part of the model but obtained
postestimation.  Estimated random effects are stochastic quantities similar to
residuals.  Since they are not estimated as model coefficients, their
inclusion in -mfx- calculations is dubious since any error in estimation is
not reflected in the standard errors for the marginal effects.

As such, after the bug is fixed Federico will instead encounter

. mfx, eyex predict(mu)
predict() expression mu unsuitable for marginal-effect calculation
r(119);

but, more importantly, he will then have the option of specifying -force- to
force the calculation to go through.  -force- comes at a price however;
standard errors will not be valid.  See -help mfx- for more details about the
-force- option.

Finally, Martin Weiss <[email protected]> points out that this does not
occur with -xtmixed-.  That is because the default prediction for -xtmixed-
does not include any random effects.

--Bobby
[email protected]
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index