Statalist The Stata Listserver


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

Re: st: Re: Adjusted R2 using IVREG2


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   Re: st: Re: Adjusted R2 using IVREG2
Date   Fri, 18 Aug 2006 18:57:01 +0100 (BST)

Heather Milkiewicz wrote:

[...]

> Using IVREG, after running the regression I can use the following
> command, outreg using table4b.xls, nolabel replace bdec(2) se adjr2, to
> get the results with adjusted R2 in a table, but I cannot figure out how
> to do it for the IVREG2, GMM command.
>
> If you could let me know how to view the adjusted R2 results, and
> possibly a command to transfer them into a table, that would be great.

[...]

Allow me to be blunt, Heather, but frankly, stuff -outreg-! Use Ben Jann's
far superior -estout- (downloadable from -ssc-) and you'll obtain exactly
what you need (and more, if needed).

Adapting from the example given along the bottom of -whelp ivreg2-:

. clear

. use http://fmwww.bc.edu/ec-p/data/macro/abdata.dta

. ivreg2 n (w k ys = d.w d.k d.ys d2.w d2.k d2.ys), gmm cluster(id)

GMM estimation
--------------

Number of clusters (id) = 140                       Number of obs =      751
                                                    F(  3,   139) =    61.06
                                                    Prob > F      =   0.0000
Total (centered) SS     =  1350.891752              Centered R2   =   0.8255
Total (uncentered) SS   =  2122.555626              Uncentered R2 =   0.8890
Residual SS             =  235.6866628              Root MSE      =    .5602
----------------------------------------------------------------------------
           |               Robust
         n |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------+----------------------------------------------------------------
         w |  -.3349211   .2904668    -1.15   0.249    -.9042255    .2343834
         k |   .7156264   .0863561     8.29   0.000     .5463715    .8848813
        ys |  -.0538032   .4875811    -0.11   0.912    -1.009445    .9018382
     _cons |    2.69377   3.041579     0.89   0.376    -3.267615    8.655155
----------------------------------------------------------------------------
Anderson canon. corr. LR statistic (identification/IV relevance test): 9.839
                                                   Chi-sq(4) P-val =  0.0432
----------------------------------------------------------------------------
Hansen J statistic (overidentification test of all instruments):       7.540
                                                   Chi-sq(3) P-val =  0.0565
----------------------------------------------------------------------------
Instrumented:         w k ys
Excluded instruments: D.w D.k D.ys D2.w D2.k D2.ys
----------------------------------------------------------------------------

. est store model

. estout model, stats(F r2_a N) cells(b(star fmt(%9.2f)) t(par))
varwidth(50) modelwidth(10)

                                                             model
                                                               b/t
w                                                            -0.33
                                                           (-1.15)
k                                                             0.72***
                                                            (8.29)
ys                                                           -0.05
                                                           (-0.11)
_cons                                                         2.69
                                                            (0.89)
F                                                            61.06
r2_a                                                          0.82

Hope this helps.

CLIVE NICHOLAS        |t: 0(044)7903 397793
Politics              |e: [email protected]
Newcastle University  |http://www.ncl.ac.uk/geps

Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather
conditions.

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index