Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: mfx for stata 12

From   Richard Williams <>
Subject   Re: st: mfx for stata 12
Date   Fri, 24 Aug 2012 10:11:40 -0400

At 02:50 AM 8/24/2012, Chiara Mussida wrote:
Dear all,
i estimated a mlogit with 8 outcomes, which reject the IIA assumtion
tested with a hsiao test:
mlogtest, sm
i would be pleased to get the marginal effects of my model. If i run
the command to obtain, for instance, the marginal effects for outcome
mfx compute, predict(outcome(1))
i obtain very suspects results, namely mfx with signs and sign
completely different from the ones of the  coefs estimates.
I use Stata 12, and from the manuals mfx might compute the marginal
effect like in the previous stata versions. Do you know if something

A few side points first:

* -mlogtest- is part of Long & Freese's -spost9- package (or at least it should be, as that is the most current version of the program; older versions are also floating around). The file is on Long's own site and can be found with -findit-. * If you are going to use -mfx- rather than the newer -margins- command, you should probably use the user-written routines -margeff- or -mfx2-. They are easier to use and/or quicker after multiple outcome commands like -mlogit-. Both are available from SSC.

Now, getting to your question -- such sign flips have to happen with multiple-outcome commands like mlogit. If, say, increases in X2 make it more likely to be in category 2 than in category 1, then increases in X2 make it less likely to be in category 1 than category 2. That is, as you look at all outcomes (not just the first) you are going to see changes in sign and coefficients. To illustrate, try this after installing mfx2:

use "";, clear
mlogit warm yr89 male white age ed prst, base(1)
mfx2, nolog

Finally, assuming you are using Stata 11 or higher, consider using the new -margins- command. It has many advantages (e.g. you can use factor variables, it will handle interactions and squared terms more easily). Its main drawback is that, as far as I know, there are no commands like -margeff- or -mfx2- that make it easier to handle multiple outcome commands. If I ever got wildly ambitious, I might try writing a -margins2- command, but I keep hoping StataCorp will write it for me.

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

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index