Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: mfx2 1.0.0 now available

From   Richard Williams <>
Subject   st: mfx2 1.0.0 now available
Date   Thu, 04 May 2006 19:32:38 -0500

Thanks to Kit Baum, a new program called mfx2 is now available from SSC. Type -ssc install mfx2-. It requires Stata 8.2 or higher.

mfx2 obtains marginal effects or elasticities after estimation. It is probably most useful after multiple-outcome commands like ologit, oprobit, gologit2, slogit, mlogit, oglm, and mprobit but it works with other commands as well.

mfx2 offers two key enhancements to Stata's mfx compute command: (a) after multiple-outcome estimation commands mfx2 automates the calling of mfx and saves the marginal effects for all outcomes in a single matrix; and (b) marginal effects are stored in a way that makes them easy to use with post-estimation table formatting commands like outreg2 and estout.

It is important to realize that, if mfx does not work for your problem, then mfx2 isn't going to work either. mfx2 simplifies the use of mfx and restructures mfx's output for easier use with table formatting programs. But, when it comes to actually estimating the marginal effects mfx2 has the same limitations that mfx does. Other marginal effects commands (e.g. margeff, inteff) may be more appropriate for your specific purpose.

The following example illustrates mfx2's utility. The same data and variables are analyzed using 4 different categorical data analysis models/commands. By comparing the marginal effects side by side in an outreg2 table, you can get a feel for the practical differences between the models. If you tried the same thing using mfx, you would have to give 4 times as many mfx commands (one for each category of the outcome variable) and it would also be much more tedious to get the results into a table. The -nose- (no standard error) and -nolog- options can be used to greatly speed up the calculations and unclutter the display (mfx is no speed demon, and neither is mfx2). The most current versions of mfx2, oglm, gologit2, and outreg2 need to be installed for this example.

use "";, clear
ologit warm yr89 male white age ed prst
oglm warm yr89 male white age ed prst, het( yr89 male)
gologit2 warm yr89 male white age ed prst, npl( yr89 male)
mlogit warm yr89 male white age ed prst
outreg2 [ologit_mfx oglm_mfx gologit2_mfx mlogit_mfx] using mymfx, long onecol nor2 replace seeout

Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: Richard.A.Williams.5@ND.Edu
WWW (personal):
WWW (department):
* For searches and help try:

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