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: -gmm- and -outreg2-

From   Richard Williams <>
To, statalist <>
Subject   Re: st: -gmm- and -outreg2-
Date   Tue, 14 Aug 2012 16:22:23 -0500

At 02:55 PM 8/14/2012, Joseph Monte wrote:
Hi Statalisters,

I am trying to export the results of the -gmm- estimation in the link
below to Microsoft Excel using -outreg2-.

The following command does not seem to work

outreg2 using myfile, replace excel

Would appreciate any help on the issue. I am using Stata 12.


What do you mean by "does not seem to work?" Are you getting errors, or is the output wrong? The following worked for me (or at least i got output, I don't know if it is right).

use, clear
loc x "exper* smsa* south mar black reg662-reg669"
ivpois wage `x', endog(educ) exog(nearc2 nearc4)
gmm (wage*exp(-{xb:`x' educ}-{b0})-1), inst(`x' nearc2 nearc4)
estat overid
ivreg2 lw `x' (educ=nearc2 nearc4)
outreg2 using myfile, replace excel
seeout using "myfile.txt"

Note that ivpois and outreg2 are user-written commands and need to be installed.

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