Announcement

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

  • Applying Wooldridge's Control Function approach with lagged values as instruments

    Dear Statalist, I am using a panel data of firms to study how some sectoral characteristics affect the performance of the firm, and how a firm characteristic may moderate this effect. I am using a FE model “reghdfe” in which x1 is the firm-level moderator and z1 and z2 are the main sectoral variables. The rest (x2, x3 and z3) are firm and sectoral controls, with FEs for year and firm, and standard errors clustered at sectoral level (30 groups).
    Code:
    reghdfe y L.c.x2 L.c.x3 L.c.x1##(L.c.z1 L.c.z2) L.c.z3 if sample==1, absorb(year id) cluster(sec)
    However, the moderator (x1) is likely to be endogenous. And I would like to check if lagged values of the moderator may be used as instruments.

    I am wondering if you could point me towards the good direction with this issue, maybe professor Jeff Wooldridge may give me an advice. After reading Lin and Wooldridge, 2019 “Testing and Correcting for Endogeneity in Nonlinear Unobserved Effects Models”, I realized about the control function approach for correcting endogeneity. Since in my panel (firm-year) setup the endogenous variable is a firm-level variable (L.c.x1) and I plan to use its lagged values (L2.c.x1 and L3.c.x1) as instruments, I wonder about the possibility of addressing this through the control function approach.

    If I am not wrong, the two rules for IV to be effective are:
    1. The instruments must be correlated with the endogenous variable.
    2. The instruments must NOT be correlated with the main dependent variable
    My idea is first, use a panel gmm estimation for the first stage (gmm because in this setting, my endogenous variable – that is the dependent variable in this first stage – would be instrumented by its lags, a kind a dynamic panel data). Second, predict the residuals and implement them into my main panel model. Third, to prove that lagged x1s are not correlated with my main dep. variable (which would be the second rule of IV procedure) I plan to regress the main panel regression, but this time including the lagged instruments (L2.c.x1 and L3.c.x1) without the correction, to check if second IV rule applies.

    This is, I believe, a similar approach from the one in the Lin and Wooldridge’s paper, even though I believe they recommend to estimate the first stage as a FE regression (not gmm) for the linear case. I am wondering if you could help me understand if this procedure can be applied. If not, which could be an option then? See below the commands.

    Thanks!
    Code:
    * First Stage
    . xtset id year
           panel variable:  id (unbalanced)
            time variable:  year, 2004 to 2016, but with gaps
                    delta:  1 unit
    
    . xtabond2 x1 L.c.x1 L2.c.x1 L.x2 L.x3 L.z1 L.z2 L.z3 if sample==1, gmm(L.c.x1 L2.c.x1) iv(L.x2 L.x3 L.z1 L.z2 L.z3) twostep robust
    Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
    Warning: Two-step estimated covariance matrix of moments is singular.
      Using a generalized inverse to calculate optimal weighting matrix for two-step estimation.
      Difference-in-Sargan/Hansen statistics may be negative.
      DFm
      7
    
    Dynamic panel-data estimation, two-step system GMM
    ------------------------------------------------------------------------------
    Group variable: id                              Number of obs      =     48148
    Time variable : year                            Number of groups   =      7756
    Number of instruments = 94                      Obs per group: min =         1
    Wald chi2(7)  =    111.58                                      avg =      6.21
    Prob > chi2   =     0.000                                      max =        10
    ------------------------------------------------------------------------------
                 |              Corrected
              x1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
              x1 |
             L1. |   .1343917   .0154153     8.72   0.000     .1041782    .1646052
             L2. |   .0059877   .0074001     0.81   0.418    -.0085161    .0204916
                 |
              x2 |
             L1. |  -.0105319   .0137286    -0.77   0.443    -.0374394    .0163756
                 |
              x3 |
             L1. |  -.0001653    .000155    -1.07   0.286    -.0004692    .0001386
                 |
              z1 |
             L1. |  -.0005157   .0060638    -0.09   0.932    -.0124005    .0113691
                 |
              z2 |
             L1. |  -.0147577   .0058943    -2.50   0.012    -.0263103    -.003205
                 |
              z3 |
             L1. |   .0008048   .0053182     0.15   0.880    -.0096186    .0112283
                 |
           _cons |   .0130476   .0103695     1.26   0.208    -.0072764    .0333715
    ------------------------------------------------------------------------------
    Instruments for first differences equation
      Standard
        D.(L.x2 L.x3 L.z1 L.z2 L.z3)
      GMM-type (missing=0, separate instruments for each period unless collapsed)
        L(1/12).(L.x1 L2.x1)
    Instruments for levels equation
      Standard
        L.x2 L.x3 L.z1 L.z2 L.z3
        _cons
      GMM-type (missing=0, separate instruments for each period unless collapsed)
        D.(L.x1 L2.x1)
    ------------------------------------------------------------------------------
    Arellano-Bond test for AR(1) in first differences: z = -13.47  Pr > z =  0.000
    Arellano-Bond test for AR(2) in first differences: z =   0.06  Pr > z =  0.949
    ------------------------------------------------------------------------------
    Sargan test of overid. restrictions: chi2(86)   = 687.97  Prob > chi2 =  0.000
      (Not robust, but not weakened by many instruments.)
    Hansen test of overid. restrictions: chi2(86)   = 113.76  Prob > chi2 =  0.024
      (Robust, but weakened by many instruments.)
    
    Difference-in-Hansen tests of exogeneity of instrument subsets:
      GMM instruments for levels
        Hansen test excluding group:     chi2(67)   =  75.34  Prob > chi2 =  0.227
        Difference (null H = exogenous): chi2(19)   =  38.42  Prob > chi2 =  0.005
      iv(L.x2 L.x3 L.z1 L.z2 L.z3)
        Hansen test excluding group:     chi2(81)   = 101.15  Prob > chi2 =  0.064
        Difference (null H = exogenous): chi2(5)    =  12.61  Prob > chi2 =  0.027
    
    
    . predict e_x1, residuals
    (87,582 missing values generated)
    
    . 
    . foreach x in x1 e_x1 x2 x3 z1 z2 z3 {
      2. gen L`x' = L.`x'
      3. gen L2`x' = L2.`x'
      4. }
    (48,902 missing values generated)
    (55,345 missing values generated)
    (94,488 missing values generated)
    (98,782 missing values generated)
    (70,108 missing values generated)
    (74,486 missing values generated)
    (39,652 missing values generated)
    (46,095 missing values generated)
    (15,349 missing values generated)
    (26,927 missing values generated)
    (24,466 missing values generated)
    (36,044 missing values generated)
    (12,301 missing values generated)
    (24,146 missing values generated)
    
    . 
    . * Second Stage (using boothstrap becuase of the generated residuals before)
    . xtset id year
           panel variable:  id (unbalanced)
            time variable:  year, 2004 to 2016, but with gaps
                    delta:  1 unit
    
    . bootstrap, reps(200) seed(12345) cluster(sec) idcluster(new_id) group(id): reghdfe y c.Le_x1 c.Lx1##(c.Lz1 c.Lz2) Lz3 Lx2 Lx3 if sample==1, absorb(year id)
    (running reghdfe on estimation sample)
    
    Bootstrap replications (200)
    ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
    ..................................................    50
    ..................................................   100
    ..................................................   150
    ..................................................   200
    
    HDFE Linear regression                            Number of obs   =     38,859
    Absorbing 2 HDFE groups                           Wald chi2(9)    =     229.46
                                                      Prob > chi2     =     0.0000
                                                      R-squared       =     0.5848
                                                      Adj R-squared   =     0.5011
                                                      Within R-sq.    =     0.0098
                                                      Root MSE        =     4.7168
    
                                        (Replications based on 30 clusters in sec)
    ------------------------------------------------------------------------------
                 |   Observed   Bootstrap                         Normal-based
               y |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
           Le_x1 |    .132053   .1288464     1.02   0.305    -.1204812    .3845873
             Lx1 |  -.1303763   .1272809    -1.02   0.306    -.3798423    .1190897
             Lz1 |   .5175391   .3034185     1.71   0.088    -.0771502    1.112228
             Lz2 |   .4737847    .285459     1.66   0.097    -.0857047    1.033274
                 |
     c.Lx1#c.Lz1 |   .1022605   .0498364     2.05   0.040     .0045829    .1999382
                 |
     c.Lx1#c.Lz2 |  -.0885264   .0773222    -1.14   0.252    -.2400751    .0630223
                 |
             Lz3 |  -.1046715   .4019864    -0.26   0.795    -.8925503    .6832074
             Lx2 |    .898409   .1043804     8.61   0.000     .6938271    1.102991
             Lx3 |   .0109577   .0010842    10.11   0.000     .0088326    .0130828
           _cons |   3.717599   .2234197    16.64   0.000     3.279705    4.155494
    ------------------------------------------------------------------------------
    
    Absorbed degrees of freedom:
    -----------------------------------------------------+
     Absorbed FE | Categories  - Redundant  = Num. Coefs |
    -------------+---------------------------------------|
            year |         9           0           9     |
              id |      6501           1        6500     |
    -----------------------------------------------------+
    Code:
    . * Looking if lags are correlated with y (without the correction)
    . xtset id year
           panel variable:  id (unbalanced)
            time variable:  year, 2004 to 2016, but with gaps
                    delta:  1 unit
    
    . reghdfe y c.L2.x1 c.L3.x1 c.L.x1##(c.L.z1 c.L.z2) L.z3 L.x2 L.x3 if sample==1, absorb(year id)
    (dropped 578 singleton observations)
    (MWFE estimator converged in 6 iterations)
    
    HDFE Linear regression                            Number of obs   =     40,398
    Absorbing 2 HDFE groups                           F(  10,  33749) =      32.94
                                                      Prob > F        =     0.0000
                                                      R-squared       =     0.5839
                                                      Adj R-squared   =     0.5020
                                                      Within R-sq.    =     0.0097
                                                      Root MSE        =     4.6859
    
    ------------------------------------------------------------------------------
               y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
              x1 |
             L2. |   -.011996   .0209289    -0.57   0.567    -.0530173    .0290253
             L3. |  -.0080883    .023283    -0.35   0.728    -.0537237    .0375472
             L1. |   .0024909   .0220422     0.11   0.910    -.0407126    .0456943
                 |
              z1 |
             L1. |   .4306778   .1623386     2.65   0.008     .1124886    .7488671
                 |
              z2 |
             L1. |    .480526   .1679825     2.86   0.004     .1512746    .8097774
                 |
     cL.x1#cL.z1 |   .0998922   .0451363     2.21   0.027     .0114235     .188361
                 |
     cL.x1#cL.z2 |  -.0888344   .0474547    -1.87   0.061    -.1818473    .0041785
                 |
              z3 |
             L1. |   .0824461   .2935659     0.28   0.779    -.4929531    .6578452
                 |
              x2 |
             L1. |   .8748987   .0775557    11.28   0.000     .7228869     1.02691
                 |
              x3 |
             L1. |   .0110253   .0008895    12.39   0.000     .0092818    .0127688
                 |
           _cons |   3.619166   .0664242    54.49   0.000     3.488972     3.74936
    ------------------------------------------------------------------------------
    
    Absorbed degrees of freedom:
    -----------------------------------------------------+
     Absorbed FE | Categories  - Redundant  = Num. Coefs |
    -------------+---------------------------------------|
            year |         9           0           9     |
              id |      6631           1        6630     |
    -----------------------------------------------------+

  • #2
    Hi again, could someone give me some hints about the reliability of the procedure in #1? Notice my main model is
    Code:
     
     reghdfe y L.c.x2 L.c.x3 L.c.x1##(L.c.z1 L.c.z2) L.c.z3 if sample==1, absorb(year id) cluster(sec)
    Notice the main problem here would be the use of lagged values of the endogenous moderator (x1) as instruments. Becuase that would mean that in the first stage, the model would be a dynamic one. That is, x1 as function of its lagged values
    Code:
    reghdfe x1 L.x1 L2.x1 L.c.x2 L.c.x3 L.c.z1 L.c.z2 L.c.z3 if sample==1, absorb(year id) cluster(sec)
    Therefore, this is why I propose to use a GMM in the first stage as in #1.

    Because of that dynamic process, I am not confident that the command using "ivreghdfe" would control for this dynamic first stage process. Notice that these are two different models because the first one would be the first stage for x1 (the only endogenous variable) trying to control for the endogeneity through a control function approach, While the second one (see below), is not a control function approach, but a direct IV solution to the very first model.

    Is it normal that sign for "cL.x1#cL.z1" change from porisitve in "reghdfe" to negative in "ivreghdfe"?

    Any help is much appreciated!
    Code:
    . ivreghdfe y L.c.x2 L.c.x3 (L.c.x1 L.c.x1#(L.c.z1 L.c.z2) = L2.c.x1 L3.c.x1 (L2.c.x1 L3.c.x1)#(L.c.z
    > 1 L.c.z2)) L.c.z1 L.c.z2 L.c.z3 if sample==1, absorb(year id) cluster(sec)
    (dropped 578 singleton observations)
    Warning: time variable year has 641 gap(s) in relevant range
    (MWFE estimator converged in 6 iterations)
    
    IV (2SLS) estimation
    --------------------
    
    Estimates efficient for homoskedasticity only
    Statistics robust to heteroskedasticity and clustering on sec
    
    Number of clusters (sec) =          30                Number of obs =    40398
                                                          F(  8,    29) =    27.78
                                                          Prob > F      =   0.0000
    Total (centered) SS     =  748272.3688                Centered R2   =   0.0027
    Total (uncentered) SS   =  748272.3688                Uncentered R2 =   0.0027
    Residual SS             =  746232.7684                Root MSE      =    4.299
    
    ------------------------------------------------------------------------------
                 |               Robust
               y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
              x1 |
             L1. |  -.0216467   .1713581    -0.13   0.900    -.3721134    .3288199
                 |
     cL.x1#cL.z1 |   -.356301    .729516    -0.49   0.629    -1.848329    1.135727
                 |
     cL.x1#cL.z2 |  -.0477929    .568897    -0.08   0.934    -1.211318    1.115732
                 |
              x2 |
             L1. |   .8823606   .1044544     8.45   0.000     .6687274    1.095994
                 |
              x3 |
             L1. |   .0109814   .0014367     7.64   0.000     .0080431    .0139197
                 |
              z1 |
             L1. |   .4685298   .2351614     1.99   0.056    -.0124293    .9494888
                 |
              z2 |
             L1. |   .4660634   .1637189     2.85   0.008     .1312206    .8009061
                 |
              z3 |
             L1. |   .0647144   .4046623     0.16   0.874    -.7629129    .8923417
    ------------------------------------------------------------------------------
    Underidentification test (Kleibergen-Paap rk LM statistic):              4.962
                                                       Chi-sq(4) P-val =    0.2912
    ------------------------------------------------------------------------------
    Weak identification test (Cragg-Donald Wald F statistic):               44.350
                             (Kleibergen-Paap rk Wald F statistic):          1.473
    Stock-Yogo weak ID test critical values:  5% maximal IV relative bias    12.20
                                             10% maximal IV relative bias     7.77
                                             20% maximal IV relative bias     5.35
                                             30% maximal IV relative bias     4.40
    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):         2.467
                                                       Chi-sq(3) P-val =    0.4813
    ------------------------------------------------------------------------------
    Instrumented:         L.x1 cL.x1#cL.z1 cL.x1#cL.z2
    Included instruments: L.x2 L.x3 L.z1 L.z2 L.z3
    Excluded instruments: L2.x1 L3.x1 cL2.x1#cL.z1 cL2.x1#cL.z2 cL3.x1#cL.z1
                          cL3.x1#cL.z2
    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 |
    -------------+---------------------------------------|
            year |         9           1           8     |
              id |      6631        6631           0    *|
    -----------------------------------------------------+

    Comment


    • #3
      https://www.statalist.org/forums/for...eraction-terms

      One question is how persistent is x1. If very persistent, and y = f(x1), then using lag of x1 might violate the exclusion restriction since it is also strongly related to y.

      Comment


      • #4
        Dear George Ford , thank you for your reply and the post. After reading Wooldridge’s 2015 paper from the suggested post “Control Function Methods in Applied Econometrics”, I see the flexibility of CF approach. However, I am not sure if that solves my concern about using lagged values of the endogenous (L.y2) as instruments, due to the possible endogeneity in the first stage for the use of the lagged y2 as regressor. Notice that in the structural (main eq) model the endogenous is lagged (L.y2). This is becuase y1 is sales from innovations, and some time is needed from the research to generate profits. If I understood what you say, if y2 is persistent, then L2.y2 would not be a good instrument for L.y2.

        This is a transition matrix (below) for the dichotomization of the variable y2 (cannot be done on y2 because y2 is firm’s training expenditures), in which we see that is moderately persistent. So, it could be as you pointed in #2. Instead, I believe I could use further lags, like L3.y2 and L4.y2 as instruments for L.y2. Maybe that would break the dynamic process in the first stage I am worried about? And the first stage could be estimated without GMM?

        So, if I get the Jeff Wooldridge paper idea correctly, I should estimate the first stage with FE, take the residuals and put them into the second stage FE (see below)

        However, when comparing this approach’s results (see below) with respect to the 2SLS from “ivreghdfe”, results (last eq below), they are totally different. How could I decide which procedure is giving me the correct estimations?

        Could it be that these differences are becuase in the first stage from the CF, instead of regressing y2 = f(L2.y2, L3.y2,…), I should regress like in the “ivreghdfe” command: L.y2 = f(L3.y2, L4.y2,…L.2.z, L2.x,...)?

        The reliability of using lagged values from the endogenous as instruments is a fascinating issue, and I believe is not much covered, since I did not find much information about it.

        Code:
        . xttrans y2_dich
        
                   |        y2_dich
           y2_dich |         0          1 |     Total
        -----------+----------------------+----------
                 0 |     94.68       5.32 |    100.00 
                 1 |     51.62      48.38 |    100.00 
        -----------+----------------------+----------
             Total |     88.58      11.42 |    100.00
        Code:
        * Main (structural eq) model (WITHOUT CORRECTION)
        reghdfe y1 L.c.y2##(L.c.z1 L.c.z2) L.c.x2 L.c.x3 L.c.z3 if sample==1, absorb(year id) cluster(sec)
        
        * Fist stage (should the interactions from the main eq be here? like (L2.c.y2 L3.c.y2)##(L.c.z1 L.c.z2))
        reghdfe y2 L2.c.y2 L3.c.y2 L.c.z1 L.c.z2 L.c.x2 L.c.x3 L.c.z3 if sample==1, absorb(year id) cluster(sec) resid
        predict y2_hat, residuals
        Code:
        . * Main (structural eq) model with correction for endoggeneity (CF)
        xtset id year
               panel variable:  id (unbalanced)
                time variable:  year, 2004 to 2016, but with gaps
                        delta:  1 unit
        
        . bootstrap, reps(200) seed(12345) cluster(sec) idcluster(new_id) group(id):reghdfe y1 L.c.y2##(L.c.z
        > 1 L.c.z2) y2_hat L.c.x2 L.c.x3 L.c.z3 if sample==1, absorb(year id) cluster(sec)
        (running reghdfe on estimation sample)
        
        Bootstrap replications (200)
        ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
        ..................................................    50
        ..................................................   100
        ..................................................   150
        ..................................................   200
        
        HDFE Linear regression                            Number of obs   =     40,398
        Absorbing 2 HDFE groups                           Wald chi2(9)    =     241.33
        Statistics robust to heteroskedasticity           Prob > chi2     =     0.0000
                                                          R-squared       =     0.5839
                                                          Adj R-squared   =     0.5020
                                                          Within R-sq.    =     0.0097
        Number of clusters (sec)     =         30         Root MSE        =     4.6858
        
                                            (Replications based on 30 clusters in sec)
        ------------------------------------------------------------------------------
                     |   Observed   Bootstrap                         Normal-based
                  y1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
                  y2 |
                 L1. |   .0035839   .0237988     0.15   0.880     -.043061    .0502288
                     |
                  z1 |
                 L1. |   .4312304   .3417363     1.26   0.207    -.2385606    1.101021
                     |
                  z2 |
                 L1. |    .481588   .2709398     1.78   0.075    -.0494441     1.01262
                     |
         cL.y2#cL.z1 |   .0994758   .0451134     2.21   0.027     .0110551    .1878964
                     |
         cL.y2#cL.z2 |  -.0886563    .069396    -1.28   0.201    -.2246699    .0473573
                     |
              y2_hat |  -.0098559   .0224207    -0.44   0.660    -.0537996    .0340878
                     |
                  x2 |
                 L1. |   .8753402   .1032095     8.48   0.000     .6730534    1.077627
                     |
                  x3 |
                 L1. |   .0110446   .0010541    10.48   0.000     .0089786    .0131106
                     |
                  z3 |
                 L1. |   .0795121   .4074728     0.20   0.845    -.7191199    .8781441
                     |
               _cons |   3.616713   .2183995    16.56   0.000     3.188657    4.044768
        ------------------------------------------------------------------------------
        
        Absorbed degrees of freedom:
        -----------------------------------------------------+
         Absorbed FE | Categories  - Redundant  = Num. Coefs |
        -------------+---------------------------------------|
                year |         9           1           8     |
                  id |      6631        6631           0    *|
        -----------------------------------------------------+
        Code:
        . ivreghdfe y1 L.c.x2 L.c.x3 (L.c.y2 L.c.y2#(L.c.z1 L.c.z2) = L3.c.y2 L4.c.y2 (L3.c.y2 L4.c.y2)#(L.c.
        > z1 L.c.z2)) L.c.z1 L.c.z2 L.c.z3 if sample==1, absorb(year id) cluster(sec)
        (dropped 553 singleton observations)
        Warning: time variable year has 655 gap(s) in relevant range
        (MWFE estimator converged in 7 iterations)
        
        IV (2SLS) estimation
        --------------------
        
        Estimates efficient for homoskedasticity only
        Statistics robust to heteroskedasticity and clustering on sec
        
        Number of clusters (sec) =          30                Number of obs =    34086
                                                              F(  8,    29) =    29.78
                                                              Prob > F      =   0.0000
        Total (centered) SS     =  611232.4503                Centered R2   =   0.0066
        Total (uncentered) SS   =  611232.4503                Uncentered R2 =   0.0066
        Residual SS             =  607194.7303                Root MSE      =    4.222
        
        ------------------------------------------------------------------------------
                     |               Robust
                  y1 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
                  y2 |
                 L1. |  -.0200808   .0920035    -0.22   0.829    -.2082491    .1680875
                     |
         cL.y2#cL.z1 |  -.3221452    .193352    -1.67   0.106    -.7175944     .073304
                     |
         cL.y2#cL.z2 |   .2621879   .2456065     1.07   0.295    -.2401338    .7645097
                     |
                  x2 |
                 L1. |   .8960333   .1015901     8.82   0.000     .6882582    1.103808
                     |
                  x3 |
                 L1. |   .0106168   .0012795     8.30   0.000         .008    .0132335
                     |
                  z1 |
                 L1. |   .5111229   .3016279     1.69   0.101    -.1057753    1.128021
                     |
                  z2 |
                 L1. |   .3516757   .2007728     1.75   0.090    -.0589507    .7623021
                     |
                  z3 |
                 L1. |    .020626   .5291921     0.04   0.969    -1.061693    1.102945
        ------------------------------------------------------------------------------
        Underidentification test (Kleibergen-Paap rk LM statistic):              5.008
                                                           Chi-sq(4) P-val =    0.2865
        ------------------------------------------------------------------------------
        Weak identification test (Cragg-Donald Wald F statistic):              129.235
                                 (Kleibergen-Paap rk Wald F statistic):        156.198
        Stock-Yogo weak ID test critical values:  5% maximal IV relative bias    12.20
                                                 10% maximal IV relative bias     7.77
                                                 20% maximal IV relative bias     5.35
                                                 30% maximal IV relative bias     4.40
        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):         5.769
                                                           Chi-sq(3) P-val =    0.1234
        ------------------------------------------------------------------------------
        Instrumented:         L.y2 cL.y2#cL.z1 cL.y2#cL.z2
        Included instruments: L.x2 L.x3 L.z1 L.z2 L.z3
        Excluded instruments: L3.y2 L4.y2 cL3.y2#cL.z1 cL3.y2#cL.z2 cL4.y2#cL.z1
                              cL4.y2#cL.z2
        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 |
        -------------+---------------------------------------|
                year |         8           1           7     |
                  id |      6187        6187           0    *|
        -----------------------------------------------------+

        Comment

        Working...
        X