Announcement

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

  • Filip Novinc
    replied
    Dear professor Kripfganz,

    Regarding difference-in-Hansen test after xtdpdgmm estimation, may I ask two questions please:

    1) If moment conditions for just one variable in model(level) do not pass the test, is it ok not to use instruments for model(level) just for that variable? Do reviewers see this as a cherry-picking or is it legit?

    2) estat overid, difference gave me the following output:
    Click image for larger version

Name:	diff-in-Hansen.png
Views:	1
Size:	33.1 KB
ID:	1713710


    Is it ok to report overall Hansen test + p-values circled in red (since these test the Blundell-Bond assumption, if my understading is correct)?

    I am asking this since I've got a lot of models to report, but cannot figure out how to extract the diff-in-Hansen test in a table to word document. Any suggestions here?

    3) For the purpose of testing robustness of dynamic panel data SYS-GMM estimation, what of the following do you suggest: a) comparing twostep and igmm estimations; b) using another (similar) dependent variable; c) reporting FE and OLS estimations; d) something else?

    Leave a comment:


  • Mugi Jang
    replied
    Thank you very much Sebastian Kripfganz
    and sorry about my misnumbering
    2.Second Q corresponds to 3.Replacing with higher lagged
    and
    3. Third Q corresponds to 2.including higher lagged differenced instruments
    ​​​​​​​
    Anyway I clearly understand what redundant means
    Thanks lot again!

    Leave a comment:


  • Sebastian Kripfganz
    replied
    1. Redundant means that these instruments are perfectly collinear with the already included instruments. Therefore, you do not need to include them because they would be dropped during the estimation anyway (just as any estimation command drops regressors which are perfectly collinear with others). However, strictly speaking, these additional lagged instruments for the level model are only redundant if ALL lags for the first-differenced model are used WITHOUT collapsing (and with balanced panel data). As soon as you collapse the instruments or limit their lag order, there is a good chance that the extra lags for the level model are no longer redundant, and therefore could be used in the estimation.
    2. Yes, that would exactly be the recommended approach.
    3. In your example, the higher-order lags are not strictly redundant because the lag limit for the first-differenced model is restricted to 3 and the instruments are also collapsed.
    Here is an example of that redundancy, where adding the first lag of the instruments for the model in level neither changes the number of instruments actually used nor the estimation results:
    Code:
    . webuse psidextract
    
    . xtdpdgmm L(0/1).lwage wks, gmm(L.lwage wks, l(1 .) m(d)) gmm(L.lwage wks, d l(0 0)) vce(r)
    
    Generalized method of moments estimation
    
    Fitting full model:
    Step 1         f(b) =  .02160153
    
    Group variable: id                           Number of obs         =      3570
    Time variable: t                             Number of groups      =       595
    
    Moment conditions:     linear =      47      Obs per group:    min =         6
                        nonlinear =       0                        avg =         6
                            total =      47                        max =         6
    
                                       (Std. err. adjusted for 595 clusters in id)
    ------------------------------------------------------------------------------
                 |               Robust
           lwage | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
           lwage |
             L1. |   .8324395   .0321538    25.89   0.000     .7694192    .8954597
                 |
             wks |  -.0000475   .0014533    -0.03   0.974     -.002896    .0028009
           _cons |   1.209187   .2559019     4.73   0.000     .7076281    1.710745
    ------------------------------------------------------------------------------
    Instruments corresponding to the linear moment conditions:
     1, model(diff):
       3:L1.L.lwage 4:L1.L.lwage 5:L1.L.lwage 6:L1.L.lwage 7:L1.L.lwage
       4:L2.L.lwage 5:L2.L.lwage 6:L2.L.lwage 7:L2.L.lwage 5:L3.L.lwage
       6:L3.L.lwage 7:L3.L.lwage 6:L4.L.lwage 7:L4.L.lwage 7:L5.L.lwage 3:L1.wks
       4:L1.wks 5:L1.wks 6:L1.wks 7:L1.wks 3:L2.wks 4:L2.wks 5:L2.wks 6:L2.wks
       7:L2.wks 4:L3.wks 5:L3.wks 6:L3.wks 7:L3.wks 5:L4.wks 6:L4.wks 7:L4.wks
       6:L5.wks 7:L5.wks 7:L6.wks
     2, model(level):
       3:D.L.lwage 4:D.L.lwage 5:D.L.lwage 6:D.L.lwage 7:D.L.lwage 2:D.wks 3:D.wks
       4:D.wks 5:D.wks 6:D.wks 7:D.wks
     3, model(level):
       _cons
    
    . xtdpdgmm L(0/1).lwage wks, gmm(L.lwage wks, l(1 .) m(d)) gmm(L.lwage wks, d l(0 1)) vce(r)
    
    Generalized method of moments estimation
    
    Fitting full model:
    Step 1         f(b) =  .02160153
    
    Group variable: id                           Number of obs         =      3570
    Time variable: t                             Number of groups      =       595
    
    Moment conditions:     linear =      47      Obs per group:    min =         6
                        nonlinear =       0                        avg =         6
                            total =      47                        max =         6
    
                                       (Std. err. adjusted for 595 clusters in id)
    ------------------------------------------------------------------------------
                 |               Robust
           lwage | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
           lwage |
             L1. |   .8324395   .0321538    25.89   0.000     .7694192    .8954597
                 |
             wks |  -.0000475   .0014533    -0.03   0.974     -.002896    .0028009
           _cons |   1.209187   .2559019     4.73   0.000     .7076281    1.710745
    ------------------------------------------------------------------------------
    Instruments corresponding to the linear moment conditions:
     1, model(diff):
       3:L1.L.lwage 4:L1.L.lwage 5:L1.L.lwage 6:L1.L.lwage 7:L1.L.lwage
       4:L2.L.lwage 5:L2.L.lwage 6:L2.L.lwage 7:L2.L.lwage 5:L3.L.lwage
       6:L3.L.lwage 7:L3.L.lwage 6:L4.L.lwage 7:L4.L.lwage 7:L5.L.lwage 3:L1.wks
       4:L1.wks 5:L1.wks 6:L1.wks 7:L1.wks 3:L2.wks 4:L2.wks 5:L2.wks 6:L2.wks
       7:L2.wks 4:L3.wks 5:L3.wks 6:L3.wks 7:L3.wks 5:L4.wks 6:L4.wks 7:L4.wks
       6:L5.wks 7:L5.wks 7:L6.wks
     2, model(level):
       3:D.L.lwage 5:D.L.lwage 6:D.L.lwage 7:D.L.lwage 5:L1.D.L.lwage 2:D.wks
       4:D.wks 6:D.wks 7:D.wks 4:L1.D.wks 6:L1.D.wks
     3, model(level):
       _cons

    Leave a comment:


  • Mugi Jang
    replied
    Dear professor Sebastian Kripfganz
    I hope you are well today
    Always thank you for your clear answer
    This time I have three question as followings
    1.First Q
    In your London presentation(2019)p.31 you tald that "In combination with the moment conditions for the differenced model, further lags for the level model are redundant" with roodman(2009), and Arellano and Bover(1995)
    Here what is the exact meaning of redundant? does it mean that we do not need to include higher order lags or must not use higer lags additionally ?

    2.Second Q
    another question is if higher order lags are redundant and it is better to use only one moment contion then instead of using the first zero lag can we use higher lag one. in case of predetermined variable

    3. Third Q
    Last, if higher lags are redundant, then why including the higer lags affect the estimation results


    The folliwings are three case
    1.using only first differenced instrument in level equation :gmm(n, lag(1 1) diff model(level))
    xtdpdgmm L(0/1).n w k, model(diff) collapse gmm(n, lag(2 4)) gmm(w k, lag(1 3)) gmm(n, lag(1 1) diff model(level)) gmm(w k, lag(0 0) diff model(level)) two vce(r) // p.36

    ------------------------------------------------------------------------------
    | WC-Robust
    n | Coefficient std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    n |
    L1. | .5117523 .1208484 4.23 0.000 .2748937 .7486109
    |
    w | -1.323125 .2383451 -5.55 0.000 -1.790273 -.855977
    k | .1931365 .0941343 2.05 0.040 .0086367 .3776363
    _cons | 4.698425 .7943584 5.91 0.000 3.141511 6.255339
    ------------------------------------------------------------------------------

    2.including higher lagged differenced instruments in level equation :gmm(n, lag(1 3) diff model(level))
    xtdpdgmm L(0/1).n w k, model(diff) collapse gmm(n, lag(2 4)) gmm(w k, lag(1 3)) gmm(n, lag(1 3) diff model(level)) gmm(w k, lag(0 0) diff model(level)) two vce(r) // p.36

    ------------------------------------------------------------------------------
    | WC-Robust
    n | Coefficient std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    n |
    L1. | .4951825 .0955246 5.18 0.000 .3079577 .6824073
    |
    w | -1.2974 .192342 -6.75 0.000 -1.674383 -.9204167
    k | .2078625 .0951428 2.18 0.029 .0213861 .394339
    _cons | 4.649591 .5885837 7.90 0.000 3.495989 5.803194
    ------------------------------------------------------------------------------


    ​​​​​​​3.Replacing with higher lagged differenced instruments in level equation :gmm(n, lag(3 3) diff model(level))
    xtdpdgmm L(0/1).n w k, model(diff) collapse gmm(n, lag(2 4)) gmm(w k, lag(1 3)) gmm(n, lag(3 3) diff model(level)) gmm(w k, lag(0 0) diff model(level)) two vce(r) // p.36

    ------------------------------------------------------------------------------
    | WC-Robust
    n | Coefficient std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    n |
    L1. | .4765705 .0994517 4.79 0.000 .2816488 .6714922
    |
    w | -1.412922 .2631131 -5.37 0.000 -1.928614 -.8972297
    k | .1916385 .1015619 1.89 0.059 -.0074192 .3906962
    _cons | 5.016399 .8148121 6.16 0.000 3.419396 6.613401
    ------------------------------------------------------------------------------

    Thank you so much again!!!

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Because they are are used for different model transformations - here: forward-orthogonal deviations and mean deviations - these instruments (more precisely: these moment conditions) carry different informational content. If that was not the case, the command would automatically drop redundant instruments.

    Let F be the forward-orthogonal deviations transformation matrix, M be the mean deviations transformation matrix, Z be the untransformed instrument, and e be the untransformed errors. The respective moment conditions are
    E [Z' (F e)] = 0 for the forward-orthogonally deviated errors
    E [Z' (M e)] = 0 for the mean deviated errors

    Now redefine the Zf = F' Z and Zm = M' Z, then the moment conditions can be written as
    E [Zf' e] = 0 for the level errors
    E [Zm' e] = 0 for the level errors

    Clearly, Zf and Zm are different instruments (even though Z was initially the same). See also slide 33 of my presentation.

    Leave a comment:


  • Mugi Jang
    replied
    Dear professor Kripfganz
    I have a question about your 2019 London Stata Conference presentation p.112

    "Again skipping some intermediate steps, we might be willing to treat k as strictly exogenous, using its contemporaneous term as an instrument for the model in mean deviations:"
    . xtdpdgmm L(0/2).n L(0/2).w k L(0/3).ys c.w#c.w c.w#c.k, model(fod) collapse gmm(n, lag(1 .)) ///
    > gmm(w, lag(0 .)) gmm(k, lag(0 .)) gmm(ys, lag(1 .)) gmm(c.w#c.w, lag(0 .)) gmm(c.w#c.k, lag(0 .)) ///
    > gmm(k, lag(0 0) model(md)) teffects two vce(r) overid
    Here you use simultaneously gmm(k, lag(0 .)) and gmm(k, lag(0 0) model(md))
    My doubt is that althought one is differened and another is mean differenced k,lag(0 0) is used twice as instrument in one equation
    then can I repeatably use one instrument variable in different form in one equation
    thanks lot you kind reply

    Leave a comment:


  • Sebastian Kripfganz
    replied
    xtdpd always uses a small-sample adjustment. While the small-sample adjustments differ across commands, none of them are necessarily wrong. I am unable to tell what xtdpd and xtabond2 do differently. In my view, xtdpdgmm follows the usual convention for small-sample standard error correction.

    Leave a comment:


  • Mugi Jang
    replied
    Thank Professor Sebastian

    1.When small option is removed xtdpdgmm and xtabond2 are coincident but xtdpd(stata manual example) is different from the others

    xtdpdgmm L(0/1).n L(0/2).(w k) yr1980-yr1984 year, model(diff) iv(L(0/1).(w k) yr1980-yr1984 year,diff ) gmm(L.n, lag(2 .)) gmm(L.n,diff lag(1 1) model(level)) overid w(ind)
    L1. | .9603675 .0945063 10.16 0.000 .7751387 1.145596

    xtabond2 L(0/1).n L(0/2).(w k) yr1980-yr1984 year, iv(L(0/1).(w k) yr1980-yr1984 year,equation(diff)) gmm(L.n,lag(2 .) equation(diff)) gmm(L.n,equation(level) lag(1 1)) h(2) ar(3)
    L1. | .9603675 .0945063 10.16 0.000 .7751387 1.145596

    xtdpd L(0/1).n L(0/2).(w k) yr1980-yr1984 year, div(L(0/1).(w k) yr1980-yr1984 year) dgmmiv(n, lag(3 .)) lgmmiv(n, lag(2)) hascons
    L1. | .9603675 .095608 10.04 0.000 .7729794 1.147756

    2.When small option is added ,xtdpd and xtabond2 are coincident, but not xtdpdgmm, so xtdpdgmm does not replicate the example of stata and xtdpd does not permit small option

    xtdpdgmm L(0/1).n L(0/2).(w k) yr1980-yr1984 year, model(diff) iv(L(0/1).(w k) yr1980-yr1984 year,diff ) gmm(L.n, lag(2 .)) gmm(L.n,diff lag(1 1) model(level)) overid w(ind) small
    L1. | .9603675 .095335 10.07 0.000 .7732074 1.147528

    xtabond2 L(0/1).n L(0/2).(w k) yr1980-yr1984 year, iv(L(0/1).(w k) yr1980-yr1984 year,equation(diff)) gmm(L.n,lag(2 .) equation(diff)) gmm(L.n,equation(level) lag(1 1)) h(2) ar(3) small
    L1. | .9603675 .095608 10.04 0.000 .7726711 1.148064

    xtdpd L(0/1).n L(0/2).(w k) yr1980-yr1984 year, div(L(0/1).(w k) yr1980-yr1984 year) dgmmiv(n, lag(3 .)) lgmmiv(n, lag(2)) hascons
    L1. | .9603675 .095608 10.04 0.000 .7729794 1.147756

    This is my conclusion

    Leave a comment:


  • Sebastian Kripfganz
    replied
    For the first example, add the nolevel option to the xtdpdgmm command. This will give you the same standard errors as the other commands.

    In the second example, you generally do not get identical standard errors when you also estimate an intercept. (Note that the other coefficients remain unchanged if you remove the intercept.) Out of the top of my head, I cannot tell you exactly what causes the small difference in standard errors when the intercept is included; it has something to do with the small-sample adjustment. (Without option small, the standard errors between xtabond2 and xtdpdgmm coincide.) I have double checked the code of xtdpdgmm; all it does with the small option is rescaling the variance-covariance matrix by factor N / (N - rank(e(V))) in this case. Interestingly, in your example e(V) is rank deficient; however, this does not seem to explain the differences. Also note that xtabond2 produces different standard errors with and without option nomata.

    In the third example, xtdpdgmm estimates the error variance from the level residuals, while xtdpd and xtabond2 estimate it from the first-differenced residuals. This is because with xtdpdgmm, model(diff) is only specified locally within the gmm() and iv() options; the global default used to compute the standard errors remains model(level). You can either set model(diff) globally, or add vce(, model(diff)) to also set it locally for the VCE. Admittedly, this is a subtle issue easily overlooked; it is a consequence of the flexibility the command provides. (You would still need to remove the small option again for exact replication.)

    Leave a comment:


  • Mugi Jang
    replied
    Yes here is the example1 of stata manual of xtabond
    use https://www.stata-press.com/data/r17/abdata
    . xtabond n l(0/1).w l(0/2).(k ys) yr1980-yr1984 year, lags(2) noconstant
    (some output omitted)
    L1. .6862261 .1486163 4.62 0.000 .3949435 .9775088

    xtdpd L(0/2).n L(0/1).w L(0/2).(k ys) yr1980-yr1984 year, noconstant div(L(0/1).w L(0/2).(k ys) yr1980-yr1984 year) dgmmiv(n)
    (some output omitted)
    L1. | .6862261 .1486163 4.62 0.000 .3949435 .9775088

    xtabond2 L(0/2).n L(0/1).w L(0/2).(k ys) yr1980-yr1984 year, gmm(L.n,lag(1 .)) iv( L(0/1).w L(0/2).(k ys) yr1980-yr1984 year ) nolevel small
    (some output omitted)
    L1. | .6862261 .1486163 4.62 0.000 .3943654 .9780869
    this is t value not z value because of small option but the S.E is coincident

    xtdpdgmm L(0/2).n L(0/1).w L(0/2).(k ys) yr1980-yr1984 year, model(diff) iv(L(0/1).w L(0/2).(k ys) yr1980-yr1984 year,diff) gmm(L.n, lag(1 .)) nocons small
    (some output omitted)
    L1. | .6862261 .1482452 4.63 0.000 .3951916 .9772607
    this is t value not z value because of small option and the S.E is marginally different

    Here is another example of xtdpd of stata nanual Example 5: Allowing for MA(1) errors

    xtdpd L(0/1).n L(0/2).(w k) yr1980-yr1984 year, div(L(0/1).(w k) yr1980-yr1984 year) dgmmiv(n, lag(3 .)) hascons
    (some output omitted)
    L1. | .8696303 .2014473 4.32 0.000 .4748008 1.26446

    xtabond2 L(0/1).n L(0/2).(w k) yr1980-yr1984 year, iv(L(0/1).(w k) yr1980-yr1984 year,eq(diff)) gmm(L.n, lag(2 .) eq(diff)) h(2) small
    (some output omitted)
    L1. | .8696303 .2014473 4.32 0.000 .4741513 1.265109

    xtdpdgmm L(0/1).n L(0/2).(w k) yr1980-yr1984 year, model(diff) iv(L(0/1).(w k) yr1980-yr1984 year, diff) gmm(L.n, lag(2 .)) small
    (some output omitted)
    L1. | .8696303 .2008722 4.33 0.000 .4752813 1.263979

    The S.E is delicately different from the first two result

    xtdpd L(0/1).n L(0/2).(w k) yr1980-yr1984 year, div(L(0/1).(w k) yr1980-yr1984 year) dgmmiv(n, lag(3 .)) lgmmiv(n, lag(2)) hascons
    (some output omitted)
    L1. | .9603675 .095608 10.04 0.000 .7729794 1.147756

    xtabond2 L(0/1).n L(0/2).(w k) yr1980-yr1984 year, iv(L(0/1).(w k) yr1980-yr1984 year,equation(diff)) gmm(L.n,lag(2 .) equation(diff)) gmm(L.n,equation(level) lag(1 1)) h(2) ar(3) small
    (some output omitted)
    L1. | .9603675 .095608 10.04 0.000 .7726711 1.148064

    xtdpdgmm L(0/1).n L(0/2).(w k) yr1980-yr1984 year, iv(L(0/1).(w k) yr1980-yr1984 year,diff model(diff)) gmm(L.n, lag(2 .)model(diff)) gmm(L.n,diff lag(1 1) model(level)) overid w(ind) small
    (some output omitted)
    L1. | .9603675 .1256404 7.64 0.000 .7137123 1.207023

    In this case the s.e value is very different from the first two results

    I just tried to replicate the examples of stata manual (xtabond, xtdpdsys ) with xtdpd, xtabond2 and xtdpdgmm

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Originally posted by Mugi Jang View Post
    Dear Sebastian Kripfganz
    Could you summarize the option about standard error to get the same value among xtdpd, xtabond2 and xtdpdgmm
    Thank you in advance
    As a starting point, could you please provide a replicable example, say, using the abdata data set, where standard errors are not aligned?

    Leave a comment:


  • Mugi Jang
    replied
    Dear Sebastian Kripfganz
    Could you summarize the option about standard error to get the same value among xtdpd, xtabond2 and xtdpdgmm
    Thank you in advance

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Filip Novinc
    Thank you very much for reporting the two bugs with the CU-GMM estimator and the portmanteau test, and for sharing your data with me. I was able to replicate the bugs and implement a fix for them. An update to version 2.6.3 is now available on my personal website:
    Code:
    net install xtdpdgmm, from(http://www.kripfganz.de/stata/) replace

    Leave a comment:


  • Sebastian Kripfganz
    replied
    (Numbering not consistent with your questions. Not sure what happened with your post above; this appears to be a bug in the forum software.)
    1. I would not necessarily be worried by these correlation coefficients; they might be large enought. You could check for potential identification problems with the underid command; see slides 43-47 of my 2019 London Stata Conference presentation.
    2. Potentially, yes. It might be enough to simply change the lags for those instruments (i.e. starting with one lag higher).
    3. Aside from maybe row 6, your difference-in-Hansen tests look all fine. I would not worry too much about row 6 (which still has a p-value higher than the usual critical values), given the overwhelming evidence for correct specification in the other rows. Regarding the interpretation, taking row 6 again, the test in column "Excluding" is a Hansen test for the model without the instruments in row 6 (see list below the regression output). The test does not provide evidence of model misspecification if those instruments are left out. The column "Difference" then is a test for the validity of the additional instruments in row 6 (assuming validity of all other instruments), which is marginally acceptable here. To check that the difference GMM estimator is fine, I would in the first place just estimate the model with the difference GMM estimator only, i.e. do not include the instruments from row 7 onwards and specify the nolevel option. Then check the Hansen test for that model.
    4. All xtdpdgmm postestimation command return results in r(); type return list after a postestimation command to see the full list. These results can then be fed into the usual commands for table generation.
    5. Regarding those error messages, would it be possible for you to send me your data set (or a suitable subset of it) by e-mail, so that I can replicate the error messages?
    6. These weak instrument procedures are not directly implemented in the xtdpdgmm package. Some might be available with ivreg2 or with other community-contributed commands that work after ivreg2. In that case, replicate the results first with ivreg2, as explained on slides 39-42 of my presentation.
    7. I do not have a good answer to the CUE question right now.
    8. You could again replicate the results with ivreg2 and then follow the procedure suggested by Baum et al. (2003). If there are problems with instrument relevance, underidentification tests with the underid command might detect them. I generally recommend to routinely carry out these underidentification tests.
    9. If there is indication of underidentification, then this would generally imply that your instruments are weak or highly multicollinear. The usual consequences from the weak-instruments literature apply (biased coefficients and test results, large standard errors/confidence intervals, etc.).
    10. Without looking into the Blundell and Bond (2000) paper, they might just have obtained predicted firm-specific effects (with option u of the predict command after xtdpdgmm) and then looked at their variance (simply computing summary statistics). Those group-fixed effects are the means of the error term for each firm. While these effects themselves cannot be estimated/predicted consistently, their variance estimate is consistent.
    11. Precision problems with the estimate of the weighting matrix typically occur when the cross-sectional sample size N is small, the number of instruments is large, or the instruments are weak. An indication might be large differences in the two versions of the Hansen test reported by estat overid after two-step estimation, or convergence problems of the iterated GMM estimator.
    12. If individuals have different starting points, a violation of the system GMM assumption might not be easily seen in the graphs. The best approach would usually be a difference-in-Hansen test, comparing the system GMM estimator with a difference GMM estimator (where the latter might possibly use nonlinear moment conditions as well to avoid weak identification problems). The residuals are already obtained for the model with log dependent variable; no need to apply logs again.

    Leave a comment:


  • Filip Novinc
    replied
    My apologies for the bigger post. I am trying to rearrange it, but am coming across a bug which doesn't let me edit the post. This is my first time posting on Stata forum. The question numeration is not correct. Questions 5 and 6 are numbered twice, but are two distinct question.

    Leave a comment:

Working...
X