Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 2SLS using xtivreg2 present first stage and Endogeneity test

    Hi

    please im using xtivreg2 to run 2SLS , I'm not sure how can i present the first stage , endogeneity test and other tests that confirm that using 2SLS is appropriate method


    this is the commend i use


    xtset id year
    ssc install xtivreg2, replace
    tab year , generate(yr)
    xtivreg2 EQUITY CSO FSIZE OP_CF SD_OCF TAX BM LEV MA DPP RPP PSIZE DR Gov_score Sustain_Perf Sust_Commit yr2-yr19 (CSO = Instrumental), fe robust

  • #2
    Hussein: I answered this on one of the other threads you started. You do the first stage by hand, and the endogeneity test must be done "by hand," too.

    Comment


    • #3
      Thaks Jeff ,please i asked you before how i can identify singleton observations i have 7 singleton observations . could you help me on identify theses observations i think you suggest me to use

      you suggested to me to use

      gen used = e(sample) egen tobs = sum(used), by(id) list id if tobs == 1 unfortunately
      HTML Code:
       . gen used = e(sample)  .  . egen tobs = sum(used), by(id)  .  . list id if tobs == 1  . order tobs  . drop if  tobs == 1 (0 observations deleted)
      it did not work

      Comment


      • #4
        This is my main regression
        HTML Code:
          ivreghdfe EQUITY FSIZE OP_CF SD_OCF TAX  BM LEV MA DPP RPP PSIZE DR Gov_score Sustain_Perf Sust_Commit (CSO = Instrumental), first absorb(id year)  endog(CSO)
        (dropped 7 singleton observations)
        (MWFE estimator converged in 7 iterations)
        
        First-stage regressions
        -----------------------
        
        
        First-stage regression of CSO:
        
        Statistics consistent for homoskedasticity only
        Number of obs =                   4044
        ------------------------------------------------------------------------------
                 CSO | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
        -------------+----------------------------------------------------------------
        Instrumental |   .0156519   .0021667     7.22   0.000     .0114038       .0199
               FSIZE |    .008078    .019266     0.42   0.675     -.029695     .045851
               OP_CF |  -.0828493   .1432023    -0.58   0.563    -.3636117    .1979131
              SD_OCF |   1.446089   .3042328     4.75   0.000     .8496098    2.042568
                 TAX |   .0273629    .020511     1.33   0.182    -.0128509    .0675768
                  BM |  -.0247828   .0315148    -0.79   0.432    -.0865706     .037005
                 LEV |   .1534906   .0724174     2.12   0.034     .0115091    .2954722
                  MA |  -.0171832   .0409884    -0.42   0.675    -.0975451    .0631786
                 DPP |  -.0248049   .0572065    -0.43   0.665     -.136964    .0873542
                 RPP |  -.1013338   .0796471    -1.27   0.203    -.2574898    .0548223
               PSIZE |   .0500369   .0164135     3.05   0.002     .0178566    .0822171
                  DR |  -.0142629   .0156087    -0.91   0.361    -.0448653    .0163396
           Gov_score |   .0003102   .0003263     0.95   0.342    -.0003296    .0009499
        Sustain_Perf |   .0011279   .0004889     2.31   0.021     .0001693    .0020865
         Sust_Commit |   .0079999   .0162239     0.49   0.622    -.0238086    .0398084
        ------------------------------------------------------------------------------
        F test of excluded instruments:
          F(  1,  3730) =    52.18
          Prob > F      =   0.0000
        Sanderson-Windmeijer multivariate F test of excluded instruments:
          F(  1,  3730) =    52.18
          Prob > F      =   0.0000
        
        
        
        Summary results for first-stage regressions
        -------------------------------------------
        
                                                   (Underid)            (Weak id)
        Variable     | F(  1,  3730)  P-val | SW Chi-sq(  1) P-val | SW F(  1,  3730)
        CSO          |      52.18    0.0000 |       56.57   0.0000 |       52.18
        
        Stock-Yogo weak ID F test critical values for single endogenous regressor:
                                           10% maximal IV size             16.38
                                           15% maximal IV size              8.96
                                           20% maximal IV size              6.66
                                           25% maximal IV size              5.53
        Source: Stock-Yogo (2005).  Reproduced by permission.
        NB: Critical values are for Sanderson-Windmeijer F statistic.
        
        Underidentification test
        Ho: matrix of reduced form coefficients has rank=K1-1 (underidentified)
        Ha: matrix has rank=K1 (identified)
        Anderson canon. corr. LM statistic       Chi-sq(1)=55.79    P-val=0.0000
        
        Weak identification test
        Ho: equation is weakly identified
        Cragg-Donald Wald F statistic                                      52.18
        
        Stock-Yogo weak ID test critical values for K1=1 and L1=1:
                                           10% maximal IV size             16.38
                                           15% maximal IV size              8.96
                                           20% maximal IV size              6.66
                                           25% maximal IV size              5.53
        Source: Stock-Yogo (2005).  Reproduced by permission.
        
        Weak-instrument-robust inference
        Tests of joint significance of endogenous regressors B1 in main equation
        Ho: B1=0 and orthogonality conditions are valid
        Anderson-Rubin Wald test           F(1,3730)=     11.25     P-val=0.0008
        Anderson-Rubin Wald test           Chi-sq(1)=     12.20     P-val=0.0005
        Stock-Wright LM S statistic        Chi-sq(1)=     12.16     P-val=0.0005
        
        Number of observations               N  =       4044
        Number of regressors                 K  =         15
        Number of endogenous regressors      K1 =          1
        Number of instruments                L  =         15
        Number of excluded instruments       L1 =          1
        
        IV (2SLS) estimation
        --------------------
        
        Estimates efficient for homoskedasticity only
        Statistics consistent for homoskedasticity only
        
                                                              Number of obs =     4044
                                                              F( 15,  3730) =    10.13
                                                              Prob > F      =   0.0000
        Total (centered) SS     =  46.32975885                Centered R2   =  -0.1074
        Total (uncentered) SS   =  46.32975885                Uncentered R2 =  -0.1074
        Residual SS             =  51.30371339                Root MSE      =    .1173
        
        ------------------------------------------------------------------------------
              EQUITY | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
        -------------+----------------------------------------------------------------
                 CSO |  -.1729897   .0555421    -3.11   0.002    -.2818856   -.0640939
               FSIZE |   .0123795   .0077931     1.59   0.112    -.0028997    .0276586
               OP_CF |     -.0683    .057869    -1.18   0.238    -.1817579     .045158
              SD_OCF |  -.1461356   .1421566    -1.03   0.304    -.4248477    .1325766
                 TAX |  -.0058738   .0083983    -0.70   0.484    -.0223396    .0105919
                  BM |  -.0258302   .0128145    -2.02   0.044    -.0509542   -.0007062
                 LEV |   -.020226   .0296631    -0.68   0.495    -.0783833    .0379314
                  MA |   .0038532   .0164687     0.23   0.815    -.0284353    .0361417
                 DPP |   .1396388   .0229292     6.09   0.000     .0946838    .1845938
                 RPP |   .0998273   .0324568     3.08   0.002     .0361924    .1634622
               PSIZE |   .0209352   .0070038     2.99   0.003     .0072035     .034667
                  DR |   .0404173    .006344     6.37   0.000     .0279792    .0528555
           Gov_score |  -.0000358   .0001322    -0.27   0.786     -.000295    .0002233
        Sustain_Perf |   -.000039   .0002106    -0.19   0.853    -.0004519    .0003739
         Sust_Commit |  -.0079053   .0065018    -1.22   0.224    -.0206528    .0048421
        ------------------------------------------------------------------------------
        Underidentification test (Anderson canon. corr. LM statistic):          55.794
                                                           Chi-sq(1) P-val =    0.0000
        ------------------------------------------------------------------------------
        Weak identification test (Cragg-Donald Wald F statistic):               52.182
        Stock-Yogo weak ID test critical values: 10% maximal IV size             16.38
                                                 15% maximal IV size              8.96
                                                 20% maximal IV size              6.66
                                                 25% maximal IV size              5.53
        Source: Stock-Yogo (2005).  Reproduced by permission.
        ------------------------------------------------------------------------------
        Sargan statistic (overidentification test of all instruments):           0.000
                                                         (equation exactly identified)
        -endog- option:
        Endogeneity test of endogenous regressors:                               9.125
                                                           Chi-sq(1) P-val =    0.0025
        Regressors tested:    CSO
        ------------------------------------------------------------------------------
        Instrumented:         CSO
        Included instruments: FSIZE OP_CF SD_OCF TAX BM LEV MA DPP RPP PSIZE DR
                              Gov_score Sustain_Perf Sust_Commit
        Excluded instruments: Instrumental
        Partialled-out:       _cons
                              nb: total SS, model F and R2s are after partialling-out;
                                  any small-sample adjustments include partialled-out
                                  variables in regressor count K
        ------------------------------------------------------------------------------
        
        Absorbed degrees of freedom:
        -----------------------------------------------------+
         Absorbed FE | Categories  - Redundant  = Num. Coefs |
        -------------+---------------------------------------|
                  id |       281           0         281     |
                year |        19           1          18     |
        -----------------------------------------------------+
        
        . 
        end of do-file

        Comment


        • #5
          You are to use the e(sample) command after estimating the equation. Did you do that?

          Comment


          • #6

            Thanks professor for your guidance and support

            Please professor

            when i try to see the residual for ivreghdfe i used this commend

            qui: ivreghdfe EQUITY FSIZE OP_CF SD_OCF TAX BM LEV MA DPP RPP PSIZE DR Gov_score Sustain_Perf Sust_Commit (CSO = CSO_Percentage), first absorb(id year) endog(CSO) resid
            predict resid1, residuals

            But when i try to identify the residual for xtivreg2 using mostly the same code it does not work

            xtset id year
            ssc install xtivreg2, replace
            tab year , generate(yr)

            qui: xtivreg2 EQUITY FSIZE OP_CF SD_OCF TAX BM LEV MA DPP RPP PSIZE DR Gov_score Sustain_Perf Sust_Commit yr2-yr19 (CSO = Instrumental), fe first endog(CSO) resid
            predict resid1, residuals

            Could you help me on how identify the residual for xtivreg2

            HTML Code:
             . qui: xtivreg2 EQUITY   FSIZE OP_CF SD_OCF TAX   BM LEV MA DPP RPP PSIZE   DR  Gov_score Sustain_Perf Sust_Commit   yr2-yr19 (CSO = Inst
            > rumental),  fe first  endog(CSO) resid
            option resid not allowed
            r(198);
            
            end of do-file
            
            r(198);

            Comment

            Working...
            X