Announcement

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

  • Arkangel Cordero
    replied
    Dear Professor @Sebastian Kripfganz


    Thank you much for your guidance and thorough explanation. Following your response, I was able to reproduce the results of xtabond2 with xtdpdgmm and iverg2 for the system gmm estimator.

    I know that you have explained about the redundancy of using the time-dummies both in the level and first-difference equations. However, I understand that both xtabond2 and xtdpdgmm take care of this redundancy by dropping the colinear instruments. I am also aware that this may (or at least used to) lead xtabond2 reporting the wrong degrees of freedom and p-values for some diagnostics regarding the instruments. However, for the purposes of reproducing the results of xtabond2 (point estimates and their standard errors) with xtdpdgmm for the system gmm, I could only do so by including iv(yr1978 - yr1984) and iv(L(w k)) in both equations for xtdpdgmm? Thank you in advance for your guidance.

    Code:
    webuse abdata
    
    xtabond2 L(0/1).n L(w k) (yr1978 - yr1984), ///
    gmm(L(n), lag(2 3)) iv(yr1978 - yr1984, eq(diff)) iv(yr1978 - yr1984, eq(level)) iv(L(w k), eq(diff)) iv(L(w k), eq(level))  two cluster(id)
    estimate store m1
    
    xtdpdgmm L(0/1).n L(w k), model(level) gmm(L(n), lag(2 3) model(difference)) ///
    gmm(L(n), lag(1 1) difference model(level)) iv(L(w k)) iv(yr1978 - yr1984, difference model(difference)) iv(L(w k), difference model(difference)) two vce(cluster id) teffects 
    estimate store m2
    
    esttab m1 m2
    
    xtdpdgmm L(0/1).n L(w k) yr1978 - yr1984, model(level) gmm(L(n), lag(2 3) model(difference)) ///
    gmm(L(n), lag(1 1) difference model(level)) iv(yr1978 - yr1984) iv(L(w k)) iv(yr1978 - yr1984, difference model(difference)) iv(L(w k), difference model(difference)) two vce(cluster id) 
    estimate store m3
    
    quietly predict iv*, iv
    
    ivreg2 n  (L1.(n w k) yr1978 - yr1984 = iv*),     gmm2s  cluster(id) nocollin
    estimate store m4
    
    esttab m1 m2 m3 m4
    
    
    ----------------------------------------------------------------------------
                          (1)             (2)             (3)             (4)   
                            n               n               n               n   
    ----------------------------------------------------------------------------
    L.n                 0.968***        0.968***        0.968***        0.968***
                      (11.09)         (11.09)         (11.09)         (30.63)   
    
    L.w               -0.0610         -0.0610         -0.0610         -0.0610** 
                      (-1.56)         (-1.56)         (-1.56)         (-2.85)   
    
    L.k                0.0254          0.0254          0.0254          0.0254   
                       (0.34)          (0.34)          (0.34)          (0.98)   
    
    yr1978            -0.0139                         -0.0139         -0.0139   
                      (-0.83)                         (-0.83)         (-1.06)   
    
    yr1979            -0.0172                         -0.0172         -0.0172   
                      (-0.83)                         (-0.83)         (-1.15)   
    
    yr1980            -0.0650***                      -0.0650***      -0.0650***
                      (-3.44)                         (-3.44)         (-4.46)   
    
    yr1981             -0.155***                       -0.155***       -0.155***
                      (-6.15)                         (-6.15)         (-8.51)   
    
    yr1982             -0.131***                       -0.131***       -0.131***
                      (-5.10)                         (-5.10)         (-8.44)   
    
    yr1983            -0.0795*                        -0.0795*        -0.0795***
                      (-2.54)                         (-2.54)         (-4.54)   
    
    yr1984            -0.0579                         -0.0579         -0.0579** 
                      (-1.61)                         (-1.61)         (-3.23)   
    
    1978.year                         -0.0139                                   
                                      (-0.83)                                   
    
    1979.year                         -0.0172                                   
                                      (-0.83)                                   
    
    1980.year                         -0.0650***                                
                                      (-3.44)                                   
    
    1981.year                          -0.155***                                
                                      (-6.15)                                   
    
    1982.year                          -0.131***                                
                                      (-5.10)                                   
    
    1983.year                         -0.0795*                                  
                                      (-2.54)                                   
    
    1984.year                         -0.0579                                   
                                      (-1.61)                                   
    
    _cons               0.262           0.262           0.262           0.262*  
                       (1.09)          (1.09)          (1.09)          (2.54)   
    ----------------------------------------------------------------------------
    N                     891             891             891             891   
    ----------------------------------------------------------------------------
    t statistics in parentheses
    * p<0.05, ** p<0.01, *** p<0.001

    Leave a comment:


  • Sebastian Kripfganz
    replied
    This is a specification of xtabond2 that cannot be replicated with either xtdpdgmm or ivreg2. The iv(L(w k)) option of xtabond2 without eq() suboption is not equivalent to the joint specification of iv(L(w k), eq(diff)) iv(L(w k), eq(level)). The same applies to iv(yr1978 - yr1984). Effectively, xtabond2 uses a moment condition which is the sum of a moment condition for the model in levels and a moment condition for the model in first differences. Technically, this sum is a valid moment condition if both moment conditions are individually valid. However, intuitively it does not make much sense. It is not compatible with the way xtdpdgmm works. The latter transforms all moment conditions into moment conditions for the level model with appropriately transformed instruments; see slide 33 of my 2019 London Stata Conference presentation. This is not possible with this summed moment condition utilized by xtabond2. In doubt, always explicitly specify the eq() suboption.

    The reason why ivreg2 does not replicate xtdpdgmm lies in the choice of the weighting matrix. Replication can only be achieved with the xtdpdgmm default weighting matrix w(unadjusted).

    Actually, having said that, there is a slightly complicated way of replicating xtdpdgmm with ivreg2 when a different weighting matrix is used:
    Code:
    webuse abdata
    
    xtdpdgmm L(0/1).n L.(w k) yr1978 - yr1984, model(level) gmm(L.(n), lag(2 3) model(difference)) gmm(L.(n), lag(1 1) difference model(level)) iv(yr1978 - yr1984) iv(L.(w k)) w(ind) two vce(cluster id)
    
    predict iv*, iv
    
    matrix W = e(W)
    matrix coleq W = ""
    matrix roweq W = ""
    mat colnames W = `r(iv)' _cons
    mat rownames W = `r(iv)' _cons
    
    ivreg2 n (L1.(n w k) yr1978 - yr1984 = iv*), cluster(id) nocollin wmatrix(W)
    Notice that I have removed the gmm2s option from ivreg2 because it now already starts with the optimal weighting matrix obtained from xtdpdgmm. (Alternatively, you could run xtdpdgmm with the onestep option, feed the respective weighting matrix into ivreg2 and use the gmm2s option again.)

    Leave a comment:


  • Arkangel Cordero
    replied
    Dear Professor @Sebastian Kripfganz


    I have a follow-up question, but this time for the system gmm estimator. In what follows, I assume that L(wk) are exogenous, and therefore can instrument for themselves. I am unable to 1) reproduce the results from xtabond2 with xtdpdgmm and 2) reproduce the results of xtdpdgmm with ivreg2. I would appreciate any guidance.

    I tried to reproduce these being as careful as possible and apologize in advance for my ignorance.

    Code:
    webuse abdata
    
    xtabond2 L(0/1).n L(w k) (yr1978 - yr1984), ///
    gmm(L(n), lag(2 3)) iv(yr1978 - yr1984) iv(L(w k)) h(2) two cluster(id)
    estimate store m1
    
    xtdpdgmm L(0/1).n L(w k), model(level) gmm(L(n), lag(2 3) model(difference)) ///
    gmm(L(n), lag(1 1) difference model(level)) iv(L(w k)) w(ind) two vce(cluster id) teffects
    estimate store m2
    
    xtdpdgmm L(0/1).n L(w k) yr1978 - yr1984, model(level) gmm(L(n), lag(2 3) model(difference)) ///
    gmm(L(n), lag(1 1) difference model(level)) iv(yr1978 - yr1984) iv(L(w k)) w(ind) two vce(cluster id) 
    estimate store m3
    
    quietly predict iv*, iv
    
    ivreg2 n  (L1.(n w k) yr1978 - yr1984 = iv*),     gmm2s  cluster(id) nocollin
    estimate store m4
    
    esttab m1 m2 m3 m4
    
    ----------------------------------------------------------------------------
                          (1)             (2)             (3)             (4)   
                            n               n               n               n   
    ----------------------------------------------------------------------------
    L.n                 0.904***        0.910***        0.910***        0.896***
                      (13.29)         (12.87)         (12.87)         (23.18)   
    
    L.w               -0.0483         -0.0711*        -0.0711*        -0.0764***
                      (-0.97)         (-2.04)         (-2.04)         (-3.66)   
    
    L.k                0.0791          0.0759          0.0759          0.0885** 
                       (1.34)          (1.25)          (1.25)          (2.80)   
    
    yr1978           -0.00860                        -0.00552        -0.00437   
                      (-0.55)                         (-0.35)         (-0.33)   
    
    yr1979            -0.0187                         -0.0175         -0.0152   
                      (-1.00)                         (-0.95)         (-0.99)   
    
    yr1980            -0.0608**                       -0.0606**       -0.0566***
                      (-3.24)                         (-3.25)         (-3.66)   
    
    yr1981             -0.146***                       -0.144***       -0.140***
                      (-5.49)                         (-5.45)         (-6.44)   
    
    yr1982             -0.145***                       -0.146***       -0.143***
                      (-6.24)                         (-6.65)         (-8.44)   
    
    yr1983            -0.0832***                      -0.0848***      -0.0850***
                      (-3.56)                         (-3.55)         (-4.44)   
    
    yr1984            -0.0748*                        -0.0802*        -0.0812***
                      (-2.18)                         (-2.06)         (-3.51)   
    
    1978.year                        -0.00552                                   
                                      (-0.35)                                   
    
    1979.year                         -0.0175                                   
                                      (-0.95)                                   
    
    1980.year                         -0.0606**                                 
                                      (-3.25)                                   
    
    1981.year                          -0.144***                                
                                      (-5.45)                                   
    
    1982.year                          -0.146***                                
                                      (-6.65)                                   
    
    1983.year                         -0.0848***                                
                                      (-3.55)                                   
    
    1984.year                         -0.0802*                                  
                                      (-2.06)                                   
    
    _cons               0.313           0.377           0.377           0.411***
                       (1.30)          (1.88)          (1.88)          (3.66)   
    ----------------------------------------------------------------------------
    N                     891             891             891             891   
    ----------------------------------------------------------------------------
    t statistics in parentheses
    * p<0.05, ** p<0.01, *** p<0.001

    Leave a comment:


  • Arkangel Cordero
    replied
    Dear Professor @Sebastian Kripfganz,

    Thank you for your help! It is much appreciated.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Arkangel Cordero

    There are 3 issues here:
    1) When replicating the xtdpdgmm results with ivreg2, you need to specify the untransformed variables.
    2) You need to specify all untransformed regressors as endogenous, including time dummies.
    3) ivreg2 applies collinearity checks that drop some of the instruments, even though it should not. You need to specify the nocollin option with ivreg2.

    Code:
    webuse abdata
    xtdpdgmm L(0/1).n, model(diff) gmm(L.n, l(2 5)) nocons vce(cluster id) teffects nolevel twostep
    quietly predict iv*, iv
    ivreg2 n (L1.n i.year = iv*), noconstant gmm2s cluster(id) nocollin

    Leave a comment:


  • Arkangel Cordero
    replied
    Dear Professor @Sebastian Kripfganz,

    To provide some more context. I am interested in estimating a "conventional" difference gmm model (as in your 1.d. in your Post # 481) . I have been able to replicate the results of your xtdpdgmm command with with "teffects" and "year-dummies" and xtabond2 with year-dummies as below.

    Code:
    webuse abdata
    xtdpdgmm L(0/1).n ,                    model(diff) gmm(L.n , l(2 5))  nocons   vce(cluster id)  teffects            nolevel      twostep overid
    estimate store m_xtdpdgmm_teffects
    estat overid
    
    xtdpdgmm L(0/1).n  (yr1978 - yr1984),  model(diff) gmm(L.n , l(2 5))  nocons   vce(cluster id)  iv(yr1978 - yr1984) nolevel      twostep overid
    estimate store m_xtdpdgmm_timeDum
    estat overid
    
    xtabond2 L(0/1).n (yr1978 - yr1984), gmm(L.n , lag(2 5)) iv(yr1978 - yr1984) nocons nolevel cluster(id) twostep ar(6)
    estimate store m_xtbound2_timeDum
    
    esttab m_xtdpdgmm_teffects m_xtdpdgmm_timeDum m_xtbound2_timeDum
    Results:

    HTML Code:
    ------------------------------------------------------------
                          (1)             (2)             (3)  
                            n               n               n  
    ------------------------------------------------------------
    L.n                 0.698**         0.698**         0.698**
                       (2.99)          (2.99)          (2.99)  
    
    1978.year         -0.0103                                  
                      (-0.84)                                  
    
    1979.year         -0.0107                                  
                      (-0.71)                                  
    
    1980.year         -0.0528**                                
                      (-3.19)                                  
    
    1981.year          -0.156***                                
                      (-7.87)                                  
    
    1982.year          -0.171***                                
                      (-4.72)                                  
    
    1983.year          -0.155*                                  
                      (-2.47)                                  
    
    1984.year          -0.153*                                  
                      (-2.21)                                  
    
    yr1978                            -0.0103         -0.0103  
                                      (-0.84)         (-0.84)  
    
    yr1979                            -0.0107         -0.0107  
                                      (-0.71)         (-0.71)  
    
    yr1980                            -0.0528**       -0.0528**
                                      (-3.19)         (-3.19)  
    
    yr1981                             -0.156***       -0.156***
                                      (-7.87)         (-7.87)  
    
    yr1982                             -0.171***       -0.171***
                                      (-4.72)         (-4.72)  
    
    yr1983                             -0.155*         -0.155*  
                                      (-2.47)         (-2.47)  
    
    yr1984                             -0.153*         -0.153*  
                                      (-2.21)         (-2.21)  
    ------------------------------------------------------------
    N                     891             891             751  
    ------------------------------------------------------------
    t statistics in parentheses
    * p<0.05, ** p<0.01, *** p<0.001
    What I am trying to do is replicate these results with "ivreg2" (as per your 2019 presentation in slides 39 -42) in order to obtain the under-identification and weak-identification tests available in the latter. I have tried the following, without success.

    Code:
    xtdpdgmm L(0/1).n ,   model(diff) gmm(L.n , l(2 5))  nocons   vce(cluster id)  teffects    nolevel   twostep overid
    estimate store m_xtdpdgmm_teffects
    estat overid
    drop iv*
    quietly predict iv*, iv
    
    ivreg2 n iv19-iv25 (L1.n   = iv1 - iv18 iv19-iv25),  gmm2s noconstant  first  cluster(id) endog(L1.n)
    estimate store m_ivreg2_lev1
    
    ivreg2 n iv19-iv25 (L1.n   = iv1 - iv18), partial(iv19-iv25) gmm2s noconstant  first  cluster(id) endog(L1.n)
    estimate store m_ivreg2_lev2
    
    ivreg2 D1.n D1.(iv19-iv25) (D1.L1.n   = D1.(iv1 - iv18 iv19-iv25)),  gmm2s noconstant  first  cluster(id) endog(D1.L1.n)
    estimate store m_ivreg2_dif1
    
    ivreg2 D1.n D1.(iv19-iv25) (D1.L1.n   = D1.(iv1 - iv18)), partial(D1.(iv19-iv25)) gmm2s noconstant  first  cluster(id) endog(D1.L1.n)
    estimate store m_ivreg2_dif2
    
    
    esttab  m_ivreg2_lev1  m_ivreg2_dif1  m_ivreg2_lev2  m_ivreg2_dif2
    With the following results:

    HTML Code:
    
    --------------------------------------------------------------------------------------------
                          (1)             (2)             (3)             (4)             (5)  
                            n               n             D.n               n             D.n  
    --------------------------------------------------------------------------------------------
    L.n                 0.698**         0.953***                        0.953***                
                       (2.99)          (9.75)                          (9.75)                  
    
    LD.n                                                0.172                           0.172  
                                                       (1.88)                          (1.88)  
    
    1978.year         -0.0103                                                                  
                      (-0.84)                                                                  
    
    1979.year         -0.0107                                                                  
                      (-0.71)                                                                  
    
    1980.year         -0.0528**                                                                
                      (-3.19)                                                                  
    
    1981.year          -0.156***                                                                
                      (-7.87)                                                                  
    
    1982.year          -0.171***                                                                
                      (-4.72)                                                                  
    
    1983.year          -0.155*                                                                  
                      (-2.47)                                                                  
    
    1984.year          -0.153*                                                                  
                      (-2.21)                                                                  
    
    iv19                              -0.0488***                                                
                                      (-5.18)                                                  
    
    iv20                              -0.0847***                                                
                                      (-8.13)                                                  
    
    iv21                               -0.137***                                                
                                      (-9.34)                                                  
    
    iv22                               -0.149***                                                
                                      (-7.47)                                                  
    
    iv23                              -0.0684***                                                
                                      (-3.44)                                                  
    
    iv24                             -0.00832                                                  
                                      (-0.46)                                                  
    
    iv25                             0.000355                                                  
                                       (0.03)                                                  
    
    D.iv19                                            -0.0348***                                
                                                      (-6.05)                                  
    
    D.iv20                                            -0.0749***                                
                                                      (-7.22)                                  
    
    D.iv21                                             -0.143***                                
                                                      (-8.58)                                  
    
    D.iv22                                             -0.191***                                
                                                      (-9.15)                                  
    
    D.iv23                                             -0.143***                                
                                                      (-7.71)                                  
    
    D.iv24                                            -0.0736***                                
                                                      (-4.95)                                  
    
    D.iv25                                            -0.0311**                                
                                                      (-3.07)                                  
    --------------------------------------------------------------------------------------------
    N                     891             891             751             891             751  
    --------------------------------------------------------------------------------------------
    t statistics in parentheses
    * p<0.05, ** p<0.01, *** p<0.001
    
    
    
    I have only been able to replicate the results of an "unconventional" difference gmm model ( as in 3. in your Post # 482), i.e. one in which the time dummies are instruments for the untransformed model, as shown below.

    Code:
    xtdpdgmm L(0/1).n ,                    model(diff) gmm(L.n , l(2 5))  nocons   vce(cluster id)  teffects                  twostep overid
    estimate store m_xtdpdgmm_teffects
    estat overid
    drop iv*
    quietly predict iv*, iv 
    
    ivreg2 n iv19-iv26 (L1.n   = iv1 - iv18 iv19-iv26),  gmm2s noconstant  first  cluster(id) endog(L1.n) 
    estimate store m_ivreg2_lev1
    
    ivreg2 n iv19-iv26 (L1.n   = iv1 - iv18), partial(iv19-iv26) gmm2s noconstant  first  cluster(id) endog(L1.n) 
    estimate store m_ivreg2_lev2
    HTML Code:
    esttab m_xtdpdgmm_teffects m_ivreg2_lev1  m_ivreg2_lev2  
    
    
    ------------------------------------------------------------
                          (1)             (2)             (3)  
                            n               n               n  
    ------------------------------------------------------------
    L.n                 0.946***        0.946***        0.946***
                      (20.75)         (37.89)         (37.89)  
    
    1977.year          0.0885                                  
                       (1.63)                                  
    
    1978.year          0.0732                                  
                       (1.45)                                  
    
    1979.year          0.0674                                  
                       (1.35)                                  
    
    1980.year          0.0236                                  
                       (0.47)                                  
    
    1981.year         -0.0704                                  
                      (-1.37)                                  
    
    1982.year         -0.0563                                  
                      (-1.27)                                  
    
    1983.year         -0.0122                                  
                      (-0.33)                                  
    
    1984.year         -0.0172                                  
                      (-0.59)                                  
    
    iv19                               0.0885**                
                                       (2.70)                  
    
    iv20                               0.0732*                  
                                       (2.48)                  
    
    iv21                               0.0674*                  
                                       (2.31)                  
    
    iv22                               0.0236                  
                                       (0.81)                  
    
    iv23                              -0.0704*                  
                                      (-2.33)                  
    
    iv24                              -0.0563*                  
                                      (-2.15)                  
    
    iv25                              -0.0122                  
                                      (-0.57)                  
    
    iv26                              -0.0172                  
                                      (-0.87)                  
    ------------------------------------------------------------
    N                     891             891             891  
    ------------------------------------------------------------
    t statistics in parentheses
    * p<0.05, ** p<0.01, *** p<0.001
    
    I wonder if you could please provide some guidance in being able to replicate the results for a "conventional" (as in your 1.d. in your Post # 481, i.e., with the time-dummies as instruments in the transformed--not the level--model) difference gmm model with ivreg2?

    Thank you in advance for any help in this regard.
    Last edited by Arkangel Cordero; 19 Dec 2023, 12:49.

    Leave a comment:


  • Arkangel Cordero
    replied
    Dear professor Kripfganz,

    I am trying to replicate the results of a "conventional" (i.e., one in which the time-dummies are used as instruments in the difference, not the levels, equation) difference gmm model estimated with xtdpdgmm (as per 1.D) in Post # 481) with ivreg2 in order to access the under-identification and weak-instruments tests available through the latter (similar to what you explain in slides 39-42 of your Sept. 2019 presentation). I am able to reproduce the results with an "unconventional" difference gmm model (as 3) in Post # 482). However, I have been unable to do so with the conventional difference gmm. Can you please provide some guidance.

    I have tried:

    HTML Code:
    webuse abdata
    xtdpdgmm L(0/1).n ,                    model(diff) gmm(L.n , l(2 5))  nocons   vce(cluster id)  teffects                     nolevel      twostep overid
    estimate store model_xtdpdgmm_teffects
    estat overid
    quietly predict iv*, iv 
    
    ivreg2 n iv19-iv25 (L1.n   = iv1 - iv18), partial(iv19-iv25) gmm2s noconstant  first  cluster(id) endog(L1.n) 
    estimate store model_ivreg2_lev
    
    ivreg2 D1.n D1.(iv19-iv25) (D1.L1.n   = D1.(iv1 - iv18 iv19-iv25)), gmm2s noconstant  first  cluster(id) endog(D1.L1.n) 
    estimate store model_ivreg2_dif
    
    
    . esttab  model_xtdpdgmm_teffects model_ivreg2_lev model_ivreg2_dif
    
    ------------------------------------------------------------
                          (1)             (2)             (3)   
                            n               n             D.n   
    ------------------------------------------------------------
    L.n                 0.698**         0.953***                
                       (2.99)          (9.75)                   
    
    LD.n                                                0.172   
                                                       (1.88)   
    
    1978.year         -0.0103                                   
                      (-0.84)                                   
    
    1979.year         -0.0107                                   
                      (-0.71)                                   
    
    1980.year         -0.0528**                                 
                      (-3.19)                                   
    
    1981.year          -0.156***                                
                      (-7.87)                                   
    
    1982.year          -0.171***                                
                      (-4.72)                                   
    
    1983.year          -0.155*                                  
                      (-2.47)                                   
    
    1984.year          -0.153*                                  
                      (-2.21)                                   
    
    D.iv19                                            -0.0348***
                                                      (-6.05)   
    
    D.iv20                                            -0.0749***
                                                      (-7.22)   
    
    D.iv21                                             -0.143***
                                                      (-8.58)   
    
    D.iv22                                             -0.191***
                                                      (-9.15)   
    
    D.iv23                                             -0.143***
                                                      (-7.71)   
    
    D.iv24                                            -0.0736***
                                                      (-4.95)   
    
    D.iv25                                            -0.0311** 
                                                      (-3.07)   
    ------------------------------------------------------------
    N                     891             891             751   
    ------------------------------------------------------------
    t statistics in parentheses
    * p<0.05, ** p<0.01, *** p<0.001
    Any guidance is much appreciated.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    A substantial difference between those two test statistics suggests that the weighting matrix might be imprecisely estimated. A solution might be to use the iterated GMM estimator. But it could also be a symptom of a relatively small sample size or weak instruments.

    Leave a comment:


  • Nursena Sagir
    replied
    Sebastian Kripfganz Dear Sebastian, I have a question to you about Sargan-Hansen test. How should I interpret diverged 2-step and 3-step weighting matrix results like statistics below?


    2-step moment functions, 2-step weighting matrix chi2(2) = 3.1408
    Prob > chi2 = 0.2080

    2-step moment functions, 3-step weighting matrix chi2(2) = 11.5937
    Prob > chi2 = 0.0030

    Thanks in advance!

    Best regards,
    Nursena

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Originally posted by Jupp Peters View Post
    Also, I struggle to find an initial candidate model that passes the specification tests. I assume this is due to the very large N and that the specification tests can already detect relatively small deviations from the null hypotheses.
    This would normally be my answer, yes.

    If statistical tests do not seem to be helpful, you might have to resort to economic theory as a guide for model specification / variable classification.

    Another possibility might be to consider smaller subsets of the data where the Hansen test has less power. This might sound odd, but if the Hansen test does not detect small deviations from the null hypothesis anymore, it might be helpful to single out models with more severe model specifications.

    Forward-orthogonal deviations indeed seem to be appropriate given the unbalanced nature of the panel.

    With such a large sample size, the two-step estimator might deliver substantial efficiency gains and is therefore highly recommended.

    Leave a comment:


  • Jupp Peters
    replied
    Dear Sebastian Kripfganz,

    thank you so much for your help. I have one more question that I hope may add to the collection of advice you have already given in this thread.

    I struggle to find a model specification. This is a summary of my sample:
    • N = ~25.000 households
    • T = 12 years
    • ~150.000 observations
    • Unbalanced panel:
      • Minimum observations per household: 1
      • Maximum observations per household: 12
    The goal is to estimate the relationship between consumption of a good (dependent variable) and (1) price of this good, (2) household income, and (3) various household covariates such as household size, employment status of household head, dwelling type, ... + federal state and time dummies. Some of the household covariates are binary or categorical variables. I am also interested in the interaction effect of price and household income.

    I tested fixed and random effects models as benchmarks with the following specifications:
    Code:
    L(0/1)y c.x_price##c.x_income X_covariates time_effects
    I would like to have the same combinations of regressors in the GMM model to compare the results with the fixed and random effects models.

    I started the model selection process. However, it seems impractical in my case as a single estimation run lasts ~20 minutes. Also, I struggle to find an initial candidate model that passes the specification tests. I assume this is due to the very large N and that the specification tests can already detect relatively small deviations from the null hypotheses.

    My questions are:
    • Do you have any advice on how to configure IV lags and how to specify the variable types (endogenous/predetermined/exogenous) for the different variables?
    • Would you agree that I should use forward orthogonal deviations because of the unbalanced panel?
    • Would you agree that I should use the two-step estimator because of the large sample size?
    I really appreciate any help you can provide.

    Jupp

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Zeenat, Rupali: Apologies; I do not currently have the time to respond to longer queries.

    Jupp: If this regressor is not one of your main regressors of interest, you could remove it entirely if all coefficients have high p-values. In principle, you could retain the respective instruments if you believe that they are strong instruments for the other regressors; otherwise, you can remove them as well.

    Leave a comment:


  • Jupp Peters
    replied
    Dear Sebastian Kripfganz,

    I have a question regarding the Sequential model selection process you presented at the 2019 London Stata Conference.

    In step 3, you recommend to "remove lags or interaction effects with (very) high p-values in individual or joint significance tests". What if, after removing all lags of one regressor due to their high individual p-values, the remaining contemporaneous effect of that regressor still has a high p-value? Should it then be entirely removed? If yes, what should be done with the respective IVs?

    I really appreciate any help you can provide.

    Leave a comment:


  • Rupali Vashisht
    replied
    Dear Prof. Sebastian Kripfganz,

    Thank you very much for your previous response. I am using xtdpdgmm and the gmm technique for the first time and I would really appreciate your help in understanding if I am doing it correctly.

    In my model, I consider EPS and ROAA as endogenous. The predetermined variables are - l.ROAA l.EPS TDtoTA SalesGrowth lnTA CFOtoSales CapitalIntensity l.EnvDisclScore. And, the exogenous variables include the time dummies.

    I intend to incorporate fixed effects by first differences transformation. And, I wish to take care of the correlation between the error and the lagged EPS by considering their lags as their instruments.

    I am using the following code:

    xtdpdgmm L(0/1).EPS L(0/1).ROAA TDtoTA SalesGrowth lnTA l.EnvDisclScore i.t, model(diff) collapse gmm(EPS ROAA, lag(2 3)) gmm(EPS ROAA, lag(1 1) diff model(level)) gmm(l.ROAA l.EPS TDtoTA SalesGrowth lnTA CFOtoSales CapitalIntensity l.EnvDisclScore, lag(1 3)) gmm(l.ROAA l.EPS TDtoTA SalesGrowth lnTA CFOtoSales CapitalIntensity l.EnvDisclScore i.t, lag(0 0) diff model(level)) iv(i.t) two vce(cluster id) small overid

    And I obtain the following output:
    WC-Robust
    EPS Coefficient std. err. t P>t [95% conf. interval]
    EPS
    L1. 1.009836 0.0749899 13.47 0 0.8620847 1.157588
    ROAA 0.2411051 0.1097758 2.2 0.029 0.0248154 0.4573949
    L1.ROAA 0.0063018 0.0585874 0.11 0.914 -0.1091322 0.1217357
    TDtoTA 0.0151328 0.0461458 0.33 0.743 -0.0757876 0.1060532
    SalesGrowth -0.0158857 0.0163982 -0.97 0.334 -0.0481948 0.0164234
    lnTA 0.9796653 1.435696 0.68 0.496 -1.849068 3.808398
    EnvDisclScore
    L1. 0.0485014 0.0524756 0.92 0.356 -0.0548905 0.1518933
    t
    2011 0 (empty)
    2012 1.378857 1.268998 1.09 0.278 -1.121434 3.879147
    2013 -0.3298332 1.159062 -0.28 0.776 -2.613518 1.953851
    2014 -1.774592 1.015847 -1.75 0.082 -3.776101 0.2269177
    2015 0.5190836 1.136322 0.46 0.648 -1.719796 2.757963
    2016 0.6554844 0.9437869 0.69 0.488 -1.204046 2.515015
    2017 -0.2927053 0.8384453 -0.35 0.727 -1.944683 1.359272
    2018 -2.61427 1.03919 -2.52 0.013 -4.661772 -0.5667682
    2019 -0.5594183 0.8990458 -0.62 0.534 -2.330796 1.21196
    2020 0 (omitted)
    _cons -11.50282 14.16942 -0.81 0.418 -39.42064 16.415
    Instruments corresponding to the linear moment conditions:
    1, model(diff):
    L2.EPS L3.EPS L2.ROAA L3.ROAA
    2, model(level):
    L1.D.EPS L1.D.ROAA
    3, model(diff):
    L3.L.ROAA L3.L.EPS L1.TDtoTA L2.TDtoTA L3.TDtoTA L1.SalesGrowth
    L2.SalesGrowth L3.SalesGrowth L1.lnTA L2.lnTA L3.lnTA L1.CFOtoSales
    L2.CFOtoSales L3.CFOtoSales L1.CapitalIntensity L2.CapitalIntensity
    L3.CapitalIntensity L1.L.EnvDisclScore L2.L.EnvDisclScore
    L3.L.EnvDisclScore
    4, model(level):
    D.TDtoTA D.SalesGrowth D.lnTA D.CFOtoSales D.CapitalIntensity
    D.L.EnvDisclScore
    5, model(diff):
    2013bn.t 2014.t 2015.t 2016.t 2017.t 2018.t 2019.t 2020.t
    6, model(level):
    _cons

    I just want to make sure if the code above does what I want to do. I have the following doubts, I would greatly appreciate your help on these:
    1. Does the model above specify the endogenous, predetermined and exogeneous variables correctly?
    2. I have introduced ‘CFOtoSales’ and ‘CapitalIntensity’ variables in my set of instruments as external instruments as I wish to instrument for ROAA (which I consider endogenous). Am I correct in doing that?
    3. When I use iv(i.t) – am I right in thinking that i.t acts as an instrument for all variables?
    4. Is my model first differenced?
    5. The text below the table shows that the lagged values of the endogenous variables act as instruments of the differenced model and that the level model has differenced variables as instruments (which I have specified) - is that the correct way to go about it?
    Apart from the above questions, Could you please help me understand what is the benefit of specifying instruments for both level and difference models?

    Thank you very much in advance!

    Kind regards,
    Rupali

    Leave a comment:


  • Zeenat Murtaza
    replied
    Hi Sebastian,

    I hope you are doing well. Sebastian, I have few concerns regarding system gmm and marginal plots contrast effects and their interpretation. I used the following model:

    Di;t = β1Di;t−1 + β2D2i;t−1 + β3FCR + β4Crisis + β5ΔCAi;t + β6ΔCAi;t−1 + β7CSi;t + β8CSi;t−1 + β9SIi;t + β10SIi;t−1 + β11Li;t + β12Li;t−1 + β13Bi;t-1 + β14Gi;t + β15FA + β16EZ + β17(FCR * ΔCAi;t) + β18(FCR * Crisis * ΔCAi;t) + β19(FCR * FA* ΔCAi;t) + β20(FCR * EZ * ΔCAi;t)+ αj + dt j;t.

    Here, FCR, CRISIS, FA & EZ are factor/ binary variables while rest are continuous. Following literature, I treated all financial variables to be potentially endogenous in nature. Furthermore, to resolve endogeneity concerns, I used t-2 to t-5 lagged levels for equation in differences as both the overidentification and serial correlation were satisfied at the 5th lag. For the equation in levels, I used lagged differences dated t-1 as instruments. Also, both the firm fixed and time effects are included.

    System GMM command

    xtdpdgmm L(0/1).D D^2 I.FCR I.CRISIS CA CA_L1 CS CS_L1 SI SI_L1 L L_L1 B G FA EZ I.FCR#CA I.FCR#C.CA#I.CRISIS I.FCR#I.FA#C.CA I.FCR#I.EZ#C.CA , model(diff) collapse gmm(D_L1 CA CS CS_L1 SI L B G FCR FA , lag(2 5)) gmm(D^2 EZ I.FCR#CA I.FCR#C.CA#I.CRISIS I.CRISIS I.FCR#I.FA#C.CA I.FCR#I.EZ#C.CA , lag(1 2)) gmm(D_L1 CA CS CS_L1 SI L B G FCR FA , lag(1 1) diff model(level)) gmm(D^2 EZ I.FCR#CA I.FCR#C.CA#I.CRISIS I.CRISIS I.FCR#I.FA#C.CA I.FCR#I.EZ#C.CA, lag(0 1) diff model(level)) teffects two vce(r)

    Can you please advise if the system GMM command is in accordance with above description of model.


    Second, I have few ambiguities regarding marginal plots and contrast command. First, I ran marginal plots command for an interaction term of two factor (FCR& CRISIS) and 1 continuous variable (CA) which leads to following result:

    margins fcr, at (ca = (-2 (0.5) 2) crisis=(0 1))
    marginsplot, recast(line) x(ca) by(crisis) yline(0)

    1ST CRISIS EFFECTS.gph

    Because the confidence intervals of fcr are overlapping, does that mean that there is no significant difference between the two categories of fcr in terms of the effect of ca on D (dependent variable)?? Also, am I right to interpret that for crisis=0, three lines of fcr=1 above the red line are statistically significant and different from zero and the same is true for crisis =1 while for fcr= 1, 6 lines out of 9 show statiscally significant results and same goes for crisis=1. So, there is no effect of crisis?? and there is no statical difference between fcr=0 & 1 as confidence intervals are overlapping?

    I also run the contrast command to compare the effects and I took fcr=1 as the reference group: Command is as follows:

    margins rb1.fcr, at (ca = (-2 (0.5) 2) crisis=(0 1))
    marginsplot, recast(line) x(ca) by(crisis) yline(0)

    Results show the following effects:

    fcr 1 CRISIS EFFECTS.gph

    Further, I also run contrast command with fcr= 0 as the reference category

    margins r.fcr, at (ca = (-2 (0.5) 2) crisis=(0 1))
    marginsplot, recast(line) x(ca) by(crisis) yline(0)

    fcr 0 CRISIS EFFECTS.gph

    Can you please advise if I am doing it right and whether the interpretation is correct?

    Second, when I ran system GMM, the results show a negative relationship between ca and D but when an interaction term is run between ca#fcr#crisis, the sign is positive. So, given the graphs ( fcr 1 CRISIS EFFECTS.gph fcr 0 CRISIS EFFECTS.gph) how do I interpret these 2 opposite direction FCR graphs?

    (fcr & crisis are dummy/factor variables while ca is continuous variables).

    Results of GMM are attached for reference: Generalized method of moments estimation.pdf

    Please advise on interpretation of results and overlapping CIs .
    Attached Files
    Last edited by Zeenat Murtaza; 01 Sep 2023, 16:34.

    Leave a comment:

Working...
X