Announcement

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

  • Sebastian Kripfganz
    replied
    The following xtdpdgmm specifications exactly replicates your estimates (the first with Windmeijer correction as in xtabond2, and the second without as in ivreg2):
    Code:
    xtdpdgmm L(0/1).n w k, teffects model(diff) gmm(L.n, lag(1 2)) iv(w k) nocons nolevel vce(cluster id) twostep wmatrix(separate)
    xtdpdgmm L(0/1).n w k, teffects model(diff) gmm(L.n, lag(1 2)) iv(w k) nocons nolevel twostep wmatrix(separate)
    The following is the replication command line for gmm (although I am not sure whether it is possible to replicate standard errors):
    Code:
    gmm (D.n - {xb:DL.n D.w D.k yr1978-yr1984}), xtinstruments(L.n, lags(1 2)) instruments(w k yr1978-yr1984, nocons) winitial(xt L)
    I am not sure what you are aiming for in your last question beyond the above replication. You will always have to generate the GMM-style instruments manually for ivreg2. The main reason is that you need to replace missing values by zeros to avoid those observations being dropped. xtdpdgmm produces those instruments as new variables with the postestimation command predict (with option iv), which can then be fed into ivreg2.

    Leave a comment:


  • Arkangel Cordero
    replied
    Dear Professor @Sebastian Kripfganz

    I have some follow-up questions. For pedagogical purposes, I am trying to understand how to replicate various specifications of xtdpdgmm with both xtabond2 and ivereg2, and vice versa. Specifically, I would like to know how to replicate the specifications below with xtdpdgmm and Stata’s native “gmm” command. I am aware that the following specifications make the incorrect assumption of homoskedasticity:

    Code:
    webuse abdata, clear
    
    xtabond2 L(0/1).n (yr1978 - yr1984) w k, ///
     gmm(L.n , lag(1 2) eq(diff) passthru)  iv(yr1978 - yr1984 w k, eq(diff) passthru) ///
     nocons nolevel cluster(id) twostep ar(4) h(1)
    estimate store m_xtabond2
    
    * Replicate above results using ivreg2 exclusively
    * Create gmm-style instruments
    foreach var of varlist n {
       forvalues lag = 2(1)3 {
          capture drop il`lag'`var'
          gen il`lag'`var' = L`lag'.`var'
          replace il`lag'`var' = 0 if il`lag'`var' ==.
     
          foreach year of varlist yr1978- yr1984 {
                capture drop i`year'l`lag'`var' 
                gen i`year'l`lag'`var' = `year' * il`lag'`var'
                replace i`year'l`lag'`var' = 0 if i`year'l`lag'`var'  == .          
    }
        drop il`lag'`var' 
    }
    }
    
    sum iyr*
    * Drop all gmm-style instruments that are always "0"
    findname, all(@==0)
    drop `r(varlist)'
    
    
    ivreg2  D.n yr1978 - yr1984 (D.L.n D.w D.k  = iyr* w k), gmm2s nocons cluster(id) 
    estimate store m_ivreg2_gmm2s
    
    esttab  m_xtabond2 m_ivreg2_gmm2s, order(L.n LD.n w D.w  k D.k) b(7) se(8)
    With the results below

    HTML Code:
    --------------------------------------------
                          (1)             (2)   
                            n             D.n   
    --------------------------------------------
    L.n             0.1248564                   
                 (0.26002198)                   
    
    LD.n                            0.1248564   
                                 (0.12566118)   
    
    w              -1.0278240**                 
                 (0.32938896)                   
    
    D.w                            -1.0278240***
                                 (0.19269549)   
    
    k               0.6161085*                  
                 (0.25809647)                   
    
    D.k                             0.6161085***
                                 (0.14412866)   
    
    yr1978         -0.0490880**    -0.0490880***
                 (0.01844949)    (0.01429634)   
    
    yr1979         -0.0608093*     -0.0117213   
                 (0.02464175)    (0.00994148)   
    
    yr1980         -0.0716865***   -0.0108772   
                 (0.02055941)    (0.01055265)   
    
    yr1981         -0.0870178***   -0.0153313   
                 (0.02482253)    (0.01516805)   
    
    yr1982         -0.0650888*      0.0219290   
                 (0.03236609)    (0.01593615)   
    
    yr1983         -0.0343555       0.0307333*  
                 (0.04061727)    (0.01495625)   
    
    yr1984         -0.0190336       0.0153218   
                 (0.04712421)    (0.01630749)   
    --------------------------------------------
    N                     751             751   
    --------------------------------------------
    Standard errors in parentheses
    * p<0.05, ** p<0.01, *** p<0.001
    In short, I am able to reproduce the point estimates (not the SEs because ivreg2 does not allow for the Windmeijer correction) for "xtabond2, h(1)" using "ivreg2" exclusively, i.e. by creating the gmm-style instruments by hand. Again, my interest in doing so is merely pedagogical and in order to understand the different specifications possible with each command. My questions are the following:

    1) Is it possible to replicate the estimates above with xtdpdgmm? What options would I need to use?

    2) Is it possible to replicate the estimates above with Stata’s native “gmm” command? What options would I need to use?

    3) Do you know of any options for ivreg2 that would result in the correct point estimates as those generated by the default options in xtdpdgmm? I understand that the SEs will always be smaller in ivreg2 because it cannot do the Windmeijer correction, but is it possible to obtain the correct point estimates?

    Thank you in advance for your guidance.

    Leave a comment:


  • Arkangel Cordero
    replied
    Dear Professor @Sebastian Kripfganz
    Thank you very much!

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Some of the instruments can become irrelevant when the true autoregressive coefficient is 1 (especially those for a difference GMM estimator), but with system GMM there are usually enough relevant instruments (although there is the risk that many of them might be weak). A relevant reference is the following:

    Leave a comment:


  • Arkangel Cordero
    replied
    Dear Professor @Sebastian Kripfganz

    I have a quick question. At the link below, you mention that:

    1. A coefficient of the lagged dependent variable slightly above 1, but not significantly different from 1, can happen in empirical work. It could be a characteristic of the data and does not necessarily imply that there is anything wrong.
    https://www.statalist.org/forums/for...08#post1511708

    Can you please provide some insight into this in the context of the system-gmm? Could you kindly point to some references where this is indicated? I just want to make sure I am able to preempt reviewer pushback on this matter.

    Thank you in advance!

    Leave a comment:


  • Sebastian Kripfganz
    replied
    A minor update to version 2.6.7 is available for the xtdpdgmm package:
    Code:
    net install xtdpdgmm, from(http://www.kripfganz.de/stata/) replace
    While old do-files continue to run, the postestimation command estat serialpm is now no longer documented. It is superseded by the new standalone package xtdpdserial, which can be used as a postestimation command after xtdpdgmm.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    The Durbin-Wu-Hausman test is not of much use in such dynamic panel models because there are multiple regressors that we can rule out to be strictly exogenous from the very beginning. It is more common in the empirical practice to use incremental overidentification tests (Difference-in-Hansen tests) to check the assumptions behind specific variables.

    Leave a comment:


  • Neyati Ahuja
    replied
    Dear Prof Sebasian

    In my research model i have used system GMM (using xtdpgmm command) since the dependent variable in my study can be influenced by its past values, there exists heteroskedasticity and autocorrelation issue. Further, few of the explanotory variables are also influenced by unobserved factors and have a reverse causality effect on my dependent variable.

    I would like to know that besides the post estimation tests of Arellano & Bond and Sargan-Hansen, do we also need to perform endogeneity test (Durbin-Wu-Hausman Test).

    Thank You.

    Leave a comment:


  • Arkangel Cordero
    replied
    Dear Professor @Sebastian Kripfganz

    As a follow up, I ran the "weakiv" test after ivreg2 (ssc install weakiv) and obtained the diagnostics below for the same model. Can I conclude that the instruments are strong enough despite the low magnitude of the Weak identification test statistics that come by default in ivreg2?

    HTML Code:
    ----------------------------------------
     Test |       Statistic         p-value
    ------+---------------------------------
      CLR | stat(.)   =   137.16     0.0000
        K | chi2(32)  =    99.89     0.0000
        J | chi2(13)  =    42.29     0.0000
      K-J |        <n.a.>            0.0000
       AR | chi2(44)  =   142.18     0.0000
    ------+---------------------------------
     Wald | chi2(32)  =   146.58     0.0000
    ----------------------------------------

    Leave a comment:


  • Arkangel Cordero
    replied
    Dear Professor @Sebastian Kripfganz


    I have a quick question regarding a difference gmm model. The output below comes after successfully reproducing the results for the difference gmm model in xtdpdgmm with xtivreg2 in order to access the instrument diagnostics available for the latter. In general, the diagnostics look fine. The Arellano-Bond autocorrelation test of the residuals look fine as well-- statistically significant ar(1) but statistically insignificant for higher-order autocorrelation in residuals. However, both statistics for the Weak identification test look quite low in magnitude and to complicate things, the "Stock-Yogo weak ID test critical values" are <not available>. My questions are:

    1) Is this a matter for concern given the low values of the statistics for the Weak identification test?
    2) Is there anything to be done to obtain valid "Stock-Yogo weak ID test critical values"?
    3) Do you find these diagnostics concerning?
    4) Is there anything to be done at all?

    Thank you in advance!

    HTML Code:
    Underidentification test (Kleibergen-Paap rk LM statistic):             98.401
                                                       Chi-sq(14) P-val =   0.0000
    ------------------------------------------------------------------------------
    Weak identification test (Cragg-Donald Wald F statistic):                1.345
                             (Kleibergen-Paap rk Wald F statistic):          1.879
    Stock-Yogo weak ID test critical values:                       <not available>
    ------------------------------------------------------------------------------
    Hansen J statistic (overidentification test of all instruments):        15.589
                                                       Chi-sq(12) P-val =   0.1780
    -endog- option:
    Endogeneity test of endogenous regressors:                              17.543
                                                       Chi-sq(3) P-val =    0.0004
    Last edited by Arkangel Cordero; 09 Mar 2024, 17:30.

    Leave a comment:


  • Ismail Boujnane
    replied
    Dear sebastian, I have some cross-sectional (categorical) data collected from a questionnaire in 2021, which are integrated into a longitudinal dataset collected at different points in time for a period of 6 years, from 2015 to 2020. Knowing that the sample is the same for both data collection method, and my categorical data (institutional support, corporate governance) are dynamic, not static, I want to know if integrating them into my panel data is feasible.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    A new update is available for xtdpdgmm on my personal website. Version 2.6.6 fixes a few bugs in the postestimation command estat serialpm.

    Code:
    net install xtdpdgmm, from(https://www.kripfganz.de/stata) replace

    Leave a comment:


  • Sebastian Kripfganz
    replied
    The lags for those instrument that refer to the first-differenced model should be the same for the two estimators; otherwise the results become less easy to compare.

    Leave a comment:


  • Sarah Magd
    replied
    Dear Prof. Sebastian Kripfganz

    Thanks for your constructive replies.

    Does the specification of the system GMM have to be the same as the specification of the Diff-GMM? For example, if we use lags(1 3) in the system GMM, do we have to specify the same range of lags in the Diff-GMM? or can the two estimators have different specifications for the range of lags?





    Leave a comment:


  • Sebastian Kripfganz
    replied
    1. N=28 is still small; therefore, my previous comments still apply.
    2. Yes, you can (and probably should) use a diff-GMM estimator as a robustness check (again, preferably one-step only).

    Leave a comment:

Working...
X