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

Re: st: mfx after xtmelogit

From   Federico Belotti <>
Subject   Re: st: mfx after xtmelogit
Date   Sun, 01 Mar 2009 23:04:52 +0100

Roberto, tks for your reply.

I expected what you say but I was deceived by the error type  -r(459)-



Federico Belotti
Faculty of Economics
Department of Financial and Quantitative Economics
Tor Vergata University
tel: +39 06 7259 5624

Roberto G. Gutierrez, StataCorp ha scritto:
Federico Belotti <> 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

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 <> points out that this does not
occur with -xtmixed-.  That is because the default prediction for -xtmixed-
does not include any random effects.

*   For searches and help try:

*   For searches and help try:

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