Announcement

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

  • xtabond2 with forward value of dependent variable

    Hello,

    I'm estimating a model with the independent variables lagged one year with respect to the dependent variable. In Stata, it can be done with the forward operator, f.y, instead of using lag operators for all independent variables.
    xtreg f.y i.year x1 x2 x3, fe robust
    That is identical to
    xtreg y i.year l.(x1 x2 x3), fe robust

    I was wondering if using the forward operator would work for xtabond2. For example, would this syntax
    xtabond2 f.y y i.year x1 x2 x3, gmm(y x1 x2 x3, lag(1 .) collapse) iv(i.year) robust twostep
    be equated to this one
    xtabond2 y l.y i.year l.(x1 x2 x3), gmm(l.y l.(x1 x2 x3), lag(1 .) collapse) iv(i.year) robust twostep

    I have checked on my dataset and the results slightly differ. The same size is the same, but not the effect sizes and their standard errors.

    Would be grateful for any help with this.

  • #2
    xtabond2 is from SSC, as you are asked to explain in FAQ Advice #12. You are not lagging the year dummies, so the specifications are not equivalent. Factor variables and time-series operators cannot be combined, implying that you'd need to revert to the xi: prefix to replicate the regression with a lead dependent variable.

    Code:
    webuse abdata, clear
    xtabond2 F.wage wage emp cap i.year, gmm(wage emp cap, lag(1 .)) iv(i.year) robust twostep
    xi: xtabond2 wage L.(wage emp cap i.year), gmm(L.(wage emp cap), lag(1 .)) iv(L.(i.year)) robust twostep
    Res.:

    Code:
    . xtabond2 F.wage wage emp cap i.year, gmm(wage emp cap, lag(1 .)) iv(i.year) robust twostep
    Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
    1976b.year dropped due to collinearity
    1984.year dropped due to collinearity
    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.
    
    Dynamic panel-data estimation, two-step system GMM
    ------------------------------------------------------------------------------
    Group variable: id                              Number of obs      =       891
    Time variable : year                            Number of groups   =       140
    Number of instruments = 113                     Obs per group: min =         6
    Wald chi2(10) =  48978.15                                      avg =      6.36
    Prob > chi2   =     0.000                                      max =         8
    ------------------------------------------------------------------------------
                 |              Corrected
          F.wage | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
            wage |    .730943   .0761746     9.60   0.000     .5816435    .8802424
             emp |  -.0303798   .0130557    -2.33   0.020    -.0559686   -.0047911
             cap |    .076475   .0237867     3.22   0.001     .0298541     .123096
                 |
            year |
           1977  |   .9595188   .2715415     3.53   0.000     .4273072     1.49173
           1978  |   1.510568   .3094509     4.88   0.000     .9040551     2.11708
           1979  |   1.417334   .2842273     4.99   0.000     .8602588    1.974409
           1980  |   2.129389   .3125112     6.81   0.000     1.516878    2.741899
           1981  |   2.582254   .3037354     8.50   0.000     1.986944    3.177565
           1982  |   2.385963   .3188669     7.48   0.000     1.760995    3.010931
           1983  |   1.673695   .4314453     3.88   0.000     .8280777    2.519312
                 |
           _cons |   4.879062   2.003949     2.43   0.015     .9513932     8.80673
    ------------------------------------------------------------------------------
    Instruments for first differences equation
      Standard
        D.(1976b.year 1977.year 1978.year 1979.year 1980.year 1981.year 1982.year
        1983.year 1984.year)
      GMM-type (missing=0, separate instruments for each period unless collapsed)
        L(1/8).(wage emp cap)
    Instruments for levels equation
      Standard
        1976b.year 1977.year 1978.year 1979.year 1980.year 1981.year 1982.year
        1983.year 1984.year
        _cons
      GMM-type (missing=0, separate instruments for each period unless collapsed)
        D.(wage emp cap)
    ------------------------------------------------------------------------------
    Arellano-Bond test for AR(1) in first differences: z =  -4.00  Pr > z =  0.000
    Arellano-Bond test for AR(2) in first differences: z =   0.82  Pr > z =  0.413
    ------------------------------------------------------------------------------
    Sargan test of overid. restrictions: chi2(102)  = 268.32  Prob > chi2 =  0.000
      (Not robust, but not weakened by many instruments.)
    Hansen test of overid. restrictions: chi2(102)  = 113.03  Prob > chi2 =  0.214
      (Robust, but weakened by many instruments.)
    
    Difference-in-Hansen tests of exogeneity of instrument subsets:
      GMM instruments for levels
        Hansen test excluding group:     chi2(81)   = 101.52  Prob > chi2 =  0.061
        Difference (null H = exogenous): chi2(21)   =  11.51  Prob > chi2 =  0.952
      iv(1976b.year 1977.year 1978.year 1979.year 1980.year 1981.year 1982.year 1983.year 1984.year)
        Hansen test excluding group:     chi2(95)   = 104.46  Prob > chi2 =  0.238
        Difference (null H = exogenous): chi2(7)    =   8.57  Prob > chi2 =  0.285
    
    
    .
    . xi: xtabond2 wage L.(wage emp cap i.year), gmm(L.(wage emp cap), lag(1 .)) iv(L.(i.year)) robust twostep
    i.year            _Iyear_1976-1984    (naturally coded; _Iyear_1976 omitted)
    Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
    L._Iyear_1984 dropped due to collinearity
    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.
    
    Dynamic panel-data estimation, two-step system GMM
    ------------------------------------------------------------------------------
    Group variable: id                              Number of obs      =       891
    Time variable : year                            Number of groups   =       140
    Number of instruments = 113                     Obs per group: min =         6
    Wald chi2(10) =  48978.15                                      avg =      6.36
    Prob > chi2   =     0.000                                      max =         8
    ------------------------------------------------------------------------------
                 |              Corrected
            wage | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
            wage |
             L1. |    .730943   .0761746     9.60   0.000     .5816435    .8802424
                 |
             emp |
             L1. |  -.0303798   .0130557    -2.33   0.020    -.0559686   -.0047911
                 |
             cap |
             L1. |    .076475   .0237866     3.22   0.001     .0298541     .123096
                 |
     _Iyear_1977 |
             L1. |   .9595188   .2715415     3.53   0.000     .4273072     1.49173
                 |
     _Iyear_1978 |
             L1. |   1.510568   .3094509     4.88   0.000     .9040551     2.11708
                 |
     _Iyear_1979 |
             L1. |   1.417334   .2842273     4.99   0.000     .8602588    1.974409
                 |
     _Iyear_1980 |
             L1. |   2.129389   .3125112     6.81   0.000     1.516878    2.741899
                 |
     _Iyear_1981 |
             L1. |   2.582254   .3037354     8.50   0.000     1.986944    3.177565
                 |
     _Iyear_1982 |
             L1. |   2.385963   .3188669     7.48   0.000     1.760995    3.010931
                 |
     _Iyear_1983 |
             L1. |   1.673695   .4314453     3.88   0.000     .8280777    2.519312
                 |
           _cons |   4.879062   2.003949     2.43   0.015     .9513932     8.80673
    ------------------------------------------------------------------------------
    Instruments for first differences equation
      Standard
        D.(L._Iyear_1977 L._Iyear_1978 L._Iyear_1979 L._Iyear_1980 L._Iyear_1981
        L._Iyear_1982 L._Iyear_1983 L._Iyear_1984)
      GMM-type (missing=0, separate instruments for each period unless collapsed)
        L(1/8).(L.wage L.emp L.cap)
    Instruments for levels equation
      Standard
        L._Iyear_1977 L._Iyear_1978 L._Iyear_1979 L._Iyear_1980 L._Iyear_1981
        L._Iyear_1982 L._Iyear_1983 L._Iyear_1984
        _cons
      GMM-type (missing=0, separate instruments for each period unless collapsed)
        D.(L.wage L.emp L.cap)
    ------------------------------------------------------------------------------
    Arellano-Bond test for AR(1) in first differences: z =  -4.00  Pr > z =  0.000
    Arellano-Bond test for AR(2) in first differences: z =   0.82  Pr > z =  0.413
    ------------------------------------------------------------------------------
    Sargan test of overid. restrictions: chi2(102)  = 268.32  Prob > chi2 =  0.000
      (Not robust, but not weakened by many instruments.)
    Hansen test of overid. restrictions: chi2(102)  = 113.03  Prob > chi2 =  0.214
      (Robust, but weakened by many instruments.)
    
    Difference-in-Hansen tests of exogeneity of instrument subsets:
      GMM instruments for levels
        Hansen test excluding group:     chi2(81)   = 101.52  Prob > chi2 =  0.061
        Difference (null H = exogenous): chi2(21)   =  11.51  Prob > chi2 =  0.952
      iv(L._Iyear_1977 L._Iyear_1978 L._Iyear_1979 L._Iyear_1980 L._Iyear_1981 L._Iyear_1982 L._Iyear_1983 L._Iyear_1984)
        Hansen test excluding group:     chi2(95)   = 104.46  Prob > chi2 =  0.238
        Difference (null H = exogenous): chi2(7)    =   8.57  Prob > chi2 =  0.285
    
    
    .

    Comment


    • #3
      Thank you, Andrew! Understood and much appreciated.

      Comment

      Working...
      X