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

RE: st: exporting ereturn matrices with outreg2

From   Roy Wada <>
To   <>
Subject   RE: st: exporting ereturn matrices with outreg2
Date   Mon, 28 Jul 2008 12:00:03 -0700

>I would like to use -outreg2- to report some results from IV
>regressions which are saved into a matrix. Specifically, I am using
>-ivreg2- and the results I'm interested in are the F-statistics on
>excluded instruments (I have multiple endogenous regressors). These
>F-statistics are reported in the matrix e(first), in row 3 (columns
>correspond to the endougenos regressors).
>Davide Cantoni

The following code works for me. Also see this posting by Maarten 
to get at the p-values of F-statistics.

* set-up
cd d:
sysuse auto, clear
ivreg2 price (mpg head=rep trunk) weight length, first
mat first=e(first)
local F1=first[3,1]
local F2=first[3,2]

* visual
mat list e(first)
di "`F1' `F2'"

outreg2 using mystuff, addstat(F-stat mpg,`F1',F-stat headroom,`F2') see replace

Keep your kids safer online with Windows Live Family Safety.
*   For searches and help try:

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