Statalist


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

st: RE: ivreg2 again (with aplogies)


From   "Rodrigo Alfaro A." <[email protected]>
To   <[email protected]>
Subject   st: RE: ivreg2 again (with aplogies)
Date   Wed, 23 Apr 2008 10:53:30 -0400

Check the webpage http://www.stata.com/statalist/archive/2008-04/. 
Kit (http://www.stata.com/statalist/archive/2008-04/msg00956.html), 
Nick (http://www.stata.com/statalist/archive/2008-04/msg00971.html),
and Mark (http://www.stata.com/statalist/archive/2008-04/msg00987.html) 
gave you answers to your post.

Rodrigo.


 

-----Mensaje original-----
De: [email protected] [mailto:[email protected]] En nombre de [email protected]
Enviado el: Mi�rcoles, 23 de Abril de 2008 10:40 a.m.
Para: [email protected]
Asunto: st: ivreg2 again (with aplogies)

Apologies for resending but I have not been receiving any Stata mail for two days--have no idea why-- (so I might have missed some possible answers).



I noticed that my ivreg2.ado for Stata8 which I use at home produces different results (in the first regression: F test of excluded instruments etc.) than my ivreg2.ado which I use in my office with Stata9. The results are shown below.

The second equation is exactly the same, but in the first  t values and the F statistic are very different.  The whole thing is run with cluster and robust controls which I thought were identical in both cases. But they obviously are not. So am I doing something wrong?
(The more recent version of ivreg2 seems to use degrees of freedom based on clusters, not on the number of observations which seems to be the reason why F critical values in the first regression differ between the two versions.)

Any ideas why this is the case and which one of the version is "correct"?

Thanks a lot. Branko



USING IVREG2 FOR STATA 8
---------------------------------------------------------

. ivreg2 rlaw lngdppc90 war_cum fuel96  comyears polity2 (alt = cpdemocracy
urban_90) if year>1995, gmm first robu
> st cluster(contcod)

First-stage regressions
-----------------------

First-stage regression of alt:

      Source |       SS       df       MS              Number of obs =     191
-------------+------------------------------           F(  7,   183) =   52.38
       Model |  182.967522     7  26.1382175           Prob > F      =  0.0000
    Residual |  91.3256713   183  .499047384           R-squared     =  0.6671
-------------+------------------------------           Adj R-squared =  0.6543
       Total |  274.293194   190  1.44364839           Root MSE      =  .70643

------------------------------------------------------------------------------
         alt |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------
-------------+------
   lngdppc90 |  -.4497775   .1950786    -2.31   0.022    -.8346698   -.0648852
     war_cum |  -.1374908   .0387878    -3.54   0.000    -.2140196   -.0609621
      fuel96 |   .2283111   .6113502     0.37   0.709    -.9778901    1.434512
    comyears |  -.0585286   .0103033    -5.68   0.000    -.0788571   -.0382001
     polity2 |   .0468558   .0153691     3.05   0.003     .0165323    .0771792
 cpdemocracy |   .6989806   .1595599     4.38   0.000      .384167    1.013794
    urban_90 |   .0111668   .0062011     1.80   0.073    -.0010681    .0234017
       _cons |   7.950307   1.705855     4.66   0.000     4.584635    11.31598
------------------------------------------------------------------------------
Partial R-squared of excluded instruments:   0.1002
Test of excluded instruments:
  F(  2,   183) =    10.19
  Prob > F      =   0.0001

Summary results for first-stage regressions:

                Shea
Variable      Partial R2      Partial R2       F(  2,   183)    P-value
alt             0.1002          0.1002             10.19         0.0001


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

Number of clusters (contcod) = 24                     Number of obs =      191
Total (centered) SS     =  87.75379385                Centered R2   =   0.7018
Total (uncentered) SS   =  105.2330001                Uncentered R2 =   0.7513
Residual SS             =  26.16757786                Root MSE      =      .37

------------------------------------------------------------------------------
             |               Robust
        rlaw |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------
-------------+------
         alt |   .3499127   .2774387     1.26   0.207    -.1938572    .8936826
   lngdppc90 |   .9954777   .1508931     6.60   0.000     .6997326    1.291223
     war_cum |  -.0844177   .0573268    -1.47   0.141    -.1967762    .0279407
      fuel96 |  -.2100487   .3116242    -0.67   0.500    -.8208209    .4007235
    comyears |  -.0163427   .0232756    -0.70   0.483    -.0619621    .0292767
     polity2 |  -.0243998   .0210711    -1.16   0.247    -.0656984    .0168989
       _cons |  -8.358753    2.63221    -3.18   0.001    -13.51779   -3.199716
------------------------------------------------------------------------------
Hansen J statistic (overidentification test of all instruments):         1.459
                                                   Chi-sq(1) P-val =   0.22717
------------------------------------------------------------------------------
Instrumented:  alt
Instruments:   lngdppc90 war_cum fuel96 comyears polity2 cpdemocracy urban_90
------------------------------------------------------------------------------


-------------------------------------------------------------------------------------------------------------------------------


USING IVREG2 FOR STATA9
----------------------------------------------------------

. ivreg2 rlaw lngdppc90 war_cum fuel96  comyears polity2 (alt = cpdemocracy
urban_90) if
> year>1995, gmm2s robust cluster(contcod) first

First-stage regressions
-----------------------

First-stage regression of alt:

OLS estimation
--------------

Estimates efficient for homoskedasticity only Statistics robust to heteroskedasticity and clustering on contcod

Number of clusters (contcod) = 24                     Number of obs =      191
                                                      F(  7,    23) =    13.08
                                                      Prob > F      =   0.0000
Total (centered) SS     =  274.2931937                Centered R2   =   0.6671
Total (uncentered) SS   =          841                Uncentered R2 =   0.8914
Residual SS             =  91.32567134                Root MSE      =    .7064

------------------------------------------------------------------------------
             |               Robust
         alt |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------
-------------+------
   lngdppc90 |  -.4497775   .3415128    -1.32   0.201    -1.156251    .2566955
     war_cum |  -.1374908    .079412    -1.73   0.097     -.301767    .0267854
      fuel96 |   .2283111   .9041596     0.25   0.803    -1.642086    2.098708
    comyears |  -.0585286   .0190362    -3.07   0.005    -.0979081   -.0191492
     polity2 |   .0468558   .0253491     1.85   0.077    -.0055828    .0992943
 cpdemocracy |   .6989806   .3894204     1.79   0.086    -.1065968    1.504558
    urban_90 |   .0111668   .0114127     0.98   0.338    -.0124422    .0347759
       _cons |   7.950307   3.012348     2.64   0.015      1.71879    14.18182
------------------------------------------------------------------------------
Included instruments: lngdppc90 war_cum fuel96 comyears polity2 cpdemocracy
                      urban_90
------------------------------------------------------------------------------
Partial R-squared of excluded instruments:   0.1002
Test of excluded instruments:
  F(  2,    23) =     2.17
  Prob > F      =   0.1370



Summary results for first-stage regressions
-------------------------------------------

Variable    | Shea Partial R2 |   Partial R2    |  F(  2,    23)    P-value
alt         |     0.1002      |     0.1002      |        2.17       0.1370

NB: first-stage F-stat cluster-robust

Underidentification tests
Ho: matrix of reduced form coefficients has rank=K1-1 (underidentified)
Ha: matrix has rank=K1 (identified)
Kleibergen-Paap rk LM statistic             Chi-sq(2)=.        P-val=     .
Kleibergen-Paap rk Wald statistic           Chi-sq(2)=.        P-val=     .

Weak identification test
Ho: equation is weakly identified
Kleibergen-Paap Wald rk F statistic                    .
See main output for Cragg-Donald weak id test critical values

Weak-instrument-robust inference
Tests of joint significance of endogenous regressors B1 in main equation
Ho: B1=0 and overidentifying restrictions are valid
Anderson-Rubin Wald test     F(2,23)=  1.39      P-val=0.2694
Anderson-Rubin Wald test     Chi-sq(2)=3.01      P-val=0.2220
Stock-Wright LM S statistic  Chi-sq(2)=2.52      P-val=0.2830

NB: Underidentification, weak identification and weak-identification-robust
    test statistics cluster-robust

Number of clusters             N_clust  =         24
Number of observations               N  =        191
Number of regressors                 K  =          7
Number of instruments                L  =          8
Number of excluded instruments       L1 =          2

2-Step GMM estimation
---------------------

Estimates efficient for arbitrary heteroskedasticity and clustering on contcod Statistics robust to heteroskedasticity and clustering on contcod

Number of clusters (contcod) = 24                     Number of obs =      191
                                                      F(  6,    23) =    59.99
                                                      Prob > F      =   0.0000
Total (centered) SS     =  87.75379385                Centered R2   =   0.7018
Total (uncentered) SS   =  105.2330001                Uncentered R2 =   0.7513
Residual SS             =  26.16757785                Root MSE      =    .3701

------------------------------------------------------------------------------
             |               Robust
        rlaw |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------
-------------+------
         alt |   .3499127   .2774387     1.26   0.207    -.1938572    .8936826
   lngdppc90 |   .9954777   .1508931     6.60   0.000     .6997326    1.291223
     war_cum |  -.0844177   .0573268    -1.47   0.141    -.1967762    .0279407
      fuel96 |  -.2100487   .3116242    -0.67   0.500    -.8208209    .4007235
    comyears |  -.0163427   .0232756    -0.70   0.483    -.0619621    .0292767
     polity2 |  -.0243998   .0210711    -1.16   0.247    -.0656984    .0168989
       _cons |  -8.358753    2.63221    -3.18   0.001    -13.51779   -3.199716
------------------------------------------------------------------------------
Underidentification test (Kleibergen-Paap rk LM statistic):                  .
                                                   Chi-sq(2) P-val =         .
------------------------------------------------------------------------------
Weak identification test (Kleibergen-Paap rk Wald F statistic):              .
Stock-Yogo weak ID test critical values: 10% maximal IV size             19.93
                                         15% maximal IV size             11.59
                                         20% maximal IV size              8.75
                                         25% maximal IV size              7.25
Source: Stock-Yogo (2005).  Reproduced by permission.
NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
------------------------------------------------------------------------------
Hansen J statistic (overidentification test of all instruments):         1.459
                                                   Chi-sq(1) P-val =    0.2272
------------------------------------------------------------------------------
Instrumented:         alt
Included instruments: lngdppc90 war_cum fuel96 comyears polity2 Excluded instruments: cpdemocracy urban_90
------------------------------------------------------------------------------





Development Research, World Bank
Email: [email protected] or branko_mi@yahoo.
tel: 202-473-6968
World Bank, Room MC 3-559
1818 H Street NW
Washington D.C. 20433

For "Worlds Apart" see
http://www.pupress.princeton.edu/titles/7946.html

Website:
http://econ.worldbank.org/projects/inequality

For papers see also:
http://econpapers.hhs.se/
http://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=149002


*
*   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/

********************************************************************************
ADVERTENCIA: La  informaci�n  contenida  en  esta  transmisi�n, y  en  cualquier archivo  adjunto, est�  sujeta a reserva legal conforme a la normativa aplicable  al  Banco  Central  de  Chile, y  no  puede  ser usada o difundida  por personas distintas  de  su o sus destinatarios. Si usted ha recibido esta transmisi�n por error,  por  favor  notifique  inmediatamente al remitente respondiendo por este mismo medio y elim�nela de su sistema.
El  Banco Central de Chile no se har� responsable de la exactitud y veracidad de la informaci�n contenida en este mensaje, as�  como  de su  modificaci�n, copia, divulgaci�n  o  reenv�o,  total  o  parcial.   Su  uso  no  autorizado puede ser sancionado de conformidad con las leyes chilenas. 
El  Banco  Central  de  Chile  transmite  sus decisiones a trav�s de comunicados oficiales, los  que  pone  a  disposici�n  del p�blico en su p�gina de Internet: www.bcentral.cl 

DISCLAIMER: The information  contained  in  this  email or any attached file, is subject to legal  privilege  pursuant  to the laws and regulations applicable to the Central  Bank  of  Chile , and may not be used or disseminated by any person other  than  its  intended recipients. If you have received this transmission in error, please  notify  the sender immediately by reply to this email address and delete it from your system.
The Central Bank  of  Chile shall not be liable for the accuracy or authenticity of the contents of this message, whether amended, copied, forwarded or disclosed in  any  form, in  whole  or  in part.  Please note that unauthorized use may be penalized  in  conformity  with  the  Chilean law.    
The Central  Bank of Chile communicates its decisions by  official releases, and 
makes them available to the public in its WebPages: www.bcentral.cl

*
*   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