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 <Richard.A.Williams.5@ND.edu>
To   statalist@hsphsun2.harvard.edu
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 "http://www.indiana.edu/~jslsoc/stata/spex_data/ordwarm2.dta";, clear
ologit warm yr89 male white age ed prst
mfx2
oglm warm yr89 male white age ed prst, het( yr89 male)
mfx2
gologit2 warm yr89 male white age ed prst, npl( yr89 male)
mfx2
mlogit warm yr89 male white age ed prst
mfx2
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): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




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