Announcement

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

  • Dario Maimone Ansaldo Patti
    replied
    Sebastian Kripfganz thanks for the suggestion. It works fine now.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    xtseqreg does not support xtabond2 for the first stage, because xtabond2 does not have the necessary functionality to compute parameter-level scores. You can use xtdpdgmm instead of xtabond2. For simple GMM estimations, you can also simply estimate the first stage directly with xtseqreg itself. For examples, please see further up in this Statalist topic (in particular note the instruction in post #81) or the replication files to my 2019 Journal of Applied Econometric article.

    Time dummies are usually included in the first stage (i.e., inside the brackets).

    Leave a comment:


  • Dario Maimone Ansaldo Patti
    replied
    Hi All,

    I estimate the following model:

    Code:
    xtabond2 investment l.investment mtb time*, gmm (investment mtb, collapse lag (2 4)) iv(time*) ar(4) twos r nol
    Then, I use:

    Code:
    xtseqreg investment (l.investment mtb time*) efi, vce(robust) iv(time*) first(gmm10)
    Stata keeps saying:

    Code:
    . xtseqreg investment (l.investment mtb time*) efi, vce(robust) iv(time*) first(
    > gmm10)
    option first() incorrectly specified -- variable names do not match
    I cannot figure out why I got that error message. Have you any suggestion about?

    On the side, should I include the set of period dummies, time*, in the brackets or should I put them close to efi, the time invariant regressor?

    Thanks in advance.

    Dario

    Leave a comment:


  • Erlend Salhus
    replied
    That's actually spot on. EV_EBITDA is not country-specific. I did not realize this would cause trouble. Thank you!

    Leave a comment:


  • Sebastian Kripfganz
    replied
    There appears to be perfect collinearity in your data set between one of the regressors and the full set of time dummies.. The only explanation I have is that one of your regressors might only vary over time but not across groups.

    Leave a comment:


  • Erlend Salhus
    replied
    With xtdpdgmm 2021 is omitted, while xtseqreg omits the constant.
    Code:
    . xtdpdgmm investments l.investments fundraising loans realrate EV_EBITDA GDPGrowth, gmm(l.investments fundraising loans realrate EV_EBITDA GDPGrowth, lagrange
    > (1 1) collapse model(diff)) teffects vce(robust)
    note: 2021.Year omitted because of collinearity
    
    Generalized method of moments estimation
    
    Fitting full model:
    Step 1         f(b) =  4.713e-24
    
    Group variable: Country                      Number of obs         =       322
    Time variable: Year                          Number of groups      =        23
    
    Moment conditions:     linear =      19      Obs per group:    min =        14
                        nonlinear =       0                        avg =        14
                            total =      19                        max =        14
    
                                   (Std. Err. adjusted for 23 clusters in Country)
    ------------------------------------------------------------------------------
                 |               Robust
     investments |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
     investments |
             L1. |  -.2415121   .3279978    -0.74   0.462     -.884376    .4013518
                 |
     fundraising |  -.1464715   .1552177    -0.94   0.345    -.4506925    .1577496
           loans |  -.0327191   .0366048    -0.89   0.371    -.1044631    .0390249
        realrate |   .0224572   .1848913     0.12   0.903    -.3399231    .3848375
       EV_EBITDA |   .1772153   .1587355     1.12   0.264    -.1339006    .4883312
       GDPGrowth |  -.1380841   .1200476    -1.15   0.250    -.3733731    .0972049
                 |
            Year |
           2009  |  -.9359642   1.229798    -0.76   0.447    -3.346323    1.474395
           2010  |  -.9254255   .8985977    -1.03   0.303    -2.686645    .8357937
           2011  |   -.410679   1.003757    -0.41   0.682    -2.378006    1.556648
           2012  |  -.8875602   .9375887    -0.95   0.344      -2.7252    .9500798
           2013  |  -1.618549   1.080531    -1.50   0.134     -3.73635    .4992529
           2014  |   -1.60488   1.295792    -1.24   0.216    -4.144586    .9348267
           2015  |  -.6483632   .8649522    -0.75   0.453    -2.343638    1.046912
           2016  |  -.5990037   .6912807    -0.87   0.386    -1.953889    .7558815
           2017  |  -.0421427   .3971043    -0.11   0.915    -.8204528    .7361674
           2018  |  -.6543601   .9897612    -0.66   0.509    -2.594256    1.285536
           2019  |  -.6679732   .6109213    -1.09   0.274    -1.865357    .5294105
           2020  |  -1.680386   .7663415    -2.19   0.028    -3.182388   -.1783846
           2021  |          0  (empty)
                 |
           _cons |   14.97025   6.142948     2.44   0.015     2.930292    27.01021
    ------------------------------------------------------------------------------
    Instruments corresponding to the linear moment conditions:
     1, model(diff):
       L1.L.investments L1.fundraising L1.loans L1.realrate L1.EV_EBITDA
       L1.GDPGrowth
     2, model(level):
       2009bn.Year 2010.Year 2011.Year 2012.Year 2013.Year 2014.Year 2015.Year
       2016.Year 2017.Year 2018.Year 2019.Year 2020.Year
     3, model(level):
       _cons

    Leave a comment:


  • Sebastian Kripfganz
    replied
    There are effectively only 19 instruments for 20 coefficients. From the output, I cannot tell why one of the instruments was omitted. Can you run the same specification with my other command xtdpdgmm and check if there is any of the instruments omitted in the list of instruments below the regression output?
    Code:
    xtdpdgmm investments l.investments fundraising loans realrate EV_EBITDA GDPGrowth, gmm(l.investments fundraising loans realrate EV_EBITDA GDPGrowth, lagrange(1 1) collapse model(diff)) teffects vce(robust)
    The time effects capture the trends in all variables, not just the dependent variable.

    Leave a comment:


  • Erlend Salhus
    replied
    If I specify it correctly, it seems that the constant is always omitted? What is the reason for this?
    Another question I cannot seem to understand: The investment series is a growing series, but in most specifications the time effects are negative? Why is that?

    Code:
    xtseqreg investments l.investments fundraising loans realrate EV_EBITDA GDPGrowth, gmm(l.investments fundraising 
    > loans realrate EV_EBITDA GDPGrowth, lagrange(1 1) collapse model(diff)) teffects vce(robust)
    
    Group variable: Country                      Number of obs         =       322
    Time variable: Year                          Number of groups      =        23
    
                                                 Obs per group:    min =        14
                                                                   avg =        14
                                                                   max =        14
    
                                                 Number of instruments =        19
    
                                   (Std. Err. adjusted for 23 clusters in Country)
    ------------------------------------------------------------------------------
                 |               Robust
     investments |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
     investments |
             L1. |  -.2415121   .3279978    -0.74   0.462     -.884376    .4013518
                 |
     fundraising |  -.1464715   .1552177    -0.94   0.345    -.4506925    .1577496
           loans |  -.0327191   .0366048    -0.89   0.371    -.1044631    .0390249
        realrate |   .0224572   .1848913     0.12   0.903    -.3399231    .3848375
       EV_EBITDA |   2.054362   .7227027     2.84   0.004     .6378913    3.470834
       GDPGrowth |  -.1380841   .1200476    -1.15   0.250    -.3733731    .0972049
                 |
            Year |
           2009  |   2.912187   .8515469     3.42   0.001     1.243186    4.581189
           2010  |  -.7377108   .8516696    -0.87   0.386    -2.406952    .9315309
           2011  |  -1.020752   1.136603    -0.90   0.369    -3.248452    1.206948
           2012  |  -1.216061   .9925282    -1.23   0.220    -3.161381    .7292586
           2013  |  -2.744837   1.390924    -1.97   0.048    -5.470998   -.0186759
           2014  |  -2.825025   1.701869    -1.66   0.097    -6.160627    .5105765
           2015  |  -3.792585   1.853554    -2.05   0.041    -7.425483   -.1596861
           2016  |  -3.696297   1.428735    -2.59   0.010    -6.496566    -.896027
           2017  |  -5.063511   2.241953    -2.26   0.024    -9.457659   -.6693639
           2018  |  -3.235437   .9713064    -3.33   0.001    -5.139163   -1.331712
           2019  |  -6.440201   2.549344    -2.53   0.012    -11.43682   -1.443578
           2020  |  -6.138611   2.101067    -2.92   0.003    -10.25663   -2.020595
           2021  |  -7.367803   3.023332    -2.44   0.015    -13.29342   -1.442181
                 |
           _cons |          0  (omitted)
    ------------------------------------------------------------------------------

    Leave a comment:


  • Erlend Salhus
    replied
    Great, I cannot thank you enough!

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Actually, now your model is underidentified. You have 1 instrument too few, which is why one of the time dummies is omitted. If you include 2 lags of the dependent variable as regressors, you need to also include at least two lags as instruments. As a minimum, the following would give you a just-identified model:
    Code:
    xtseqreg L(0/2).investments fundraising loans realrate EV_EBITDA GDPGrowth, gmm(L(1/2).investments fundraising loans realrate EV_EBITDA GDPGrowth, lagrange(1 1) collapse model(diff)) teffects vce(robust)

    Leave a comment:


  • Erlend Salhus
    replied
    Great insights - I am sorry for my ignorance, but I have a final specification. As you suggested above I replaced the instrument with the lagged dependent variable, removed time effects in the second-stage regression, and added two lags for the dependent variable. For the GMM instruments I reduced the lag order in addition to collapsing the instruments. Now estimates make sense, the number of instruments is reasonable and the instruments are differenced. Does the specification make sense? Sorry to bother you, but I think these comments might be valuable for other beginners within the field as well!

    Code:
     xtseqreg L(0/2).investments fundraising loans realrate EV_EBITDA GDPGrowth, gmm(L.investments fundraising lo
    > ans realrate EV_EBITDA GDPGrowth, lagrange(1 1) collapse model(diff)) teffects vce(robust)
    
    Group variable: Country                      Number of obs         =       299
    Time variable: Year                          Number of groups      =        23
    
                                                 Obs per group:    min =        13
                                                                   avg =        13
                                                                   max =        13
    
                                                 Number of instruments =        18
    
                                   (Std. Err. adjusted for 23 clusters in Country)
    ------------------------------------------------------------------------------
                 |               Robust
     investments |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
     investments |
             L1. |   .3526592   .1260307     2.80   0.005     .1056435    .5996749
             L2. |   .4248817   .1087693     3.91   0.000     .2116978    .6380657
                 |
     fundraising |  -.0670592    .059737    -1.12   0.262    -.1841416    .0500232
           loans |  -.0138039   .0342988    -0.40   0.687    -.0810283    .0534205
        realrate |   .0078039   .1847154     0.04   0.966    -.3542315    .3698393
       EV_EBITDA |   .3774473   .1448065     2.61   0.009     .0936318    .6612628
       GDPGrowth |    .014976   .1742886     0.09   0.932    -.3266235    .3565754
                 |
            Year |
           2010  |  -.0048678   1.011757    -0.00   0.996    -1.987874    1.978139
           2011  |   .7605277   1.020011     0.75   0.456    -1.238657    2.759712
           2012  |  -.1814969   .6433709    -0.28   0.778    -1.442481    1.079487
           2013  |   -.968242   .6885015    -1.41   0.160     -2.31768    .3811961
           2014  |  -.4326073   .6633004    -0.65   0.514    -1.732652    .8674375
           2015  |   .3612557   .7168759     0.50   0.614    -1.043795    1.766307
           2016  |   -.330125   .7287244    -0.45   0.651    -1.758399    1.098149
           2017  |  -.0637389   .5153792    -0.12   0.902    -1.073864    .9463857
           2018  |  -.7606723   1.134643    -0.67   0.503    -2.984532    1.463187
           2019  |  -.6009757   .7758376    -0.77   0.439    -2.121589    .9196381
           2020  |  -1.339748   .6713034    -2.00   0.046    -2.655478   -.0240173
           2021  |          0  (omitted)
                 |
           _cons |          0  (omitted)
    ------------------------------------------------------------------------------
    
    . xtseqreg investments (L(1/2).investments fundraising loans realrate EV_EBITDA GDPGrowth) qe_D, iv(qe_D, mode
    > l(level)) vce(robust)
    
    Group variable: Country                      Number of obs         =       299
    Time variable: Year                          Number of groups      =        23
    
    ------------------------------------------------------------------------------
    Equation _first                              Equation _second
    Number of obs         =       299            Number of obs         =       299
    Number of groups      =        23            Number of groups      =        23
    
    Obs per group:    min =        13            Obs per group:    min =        13
                      avg =        13                              avg =        13
                      max =        13                              max =        13
    
    Number of instruments =        18            Number of instruments =         2
    
                                    (Std. Err. adjusted for clustering on Country)
    ------------------------------------------------------------------------------
                 |               Robust
     investments |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    _first       |
     investments |
             L1. |   .3526592   .1260307     2.80   0.005     .1056435    .5996749
             L2. |   .4248817   .1087693     3.91   0.000     .2116978    .6380657
                 |
     fundraising |  -.0670592    .059737    -1.12   0.262    -.1841416    .0500232
           loans |  -.0138039   .0342988    -0.40   0.687    -.0810283    .0534205
        realrate |   .0078039   .1847154     0.04   0.966    -.3542315    .3698393
       EV_EBITDA |   .3774473   .1448065     2.61   0.009     .0936318    .6612628
       GDPGrowth |    .014976   .1742886     0.09   0.932    -.3266235    .3565754
           _cons |          0  (omitted)
    -------------+----------------------------------------------------------------
    _second      |
            qe_D |   .5846122   .6130905     0.95   0.340     -.617023    1.786247
           _cons |  -.5007053   .5002986    -1.00   0.317    -1.481273    .4798619
    ------------------------------------------------------------------------------
    
    . estat overid
    
    Hansen's J-test for equation _first                    chi2(0)     =    0.0000
    note: coefficients are exactly identified              Prob > chi2 =         .
    
    Hansen's J-test for equation _second                   chi2(0)     =    0.0000
    note: coefficients are exactly identified              Prob > chi2 =         .

    Leave a comment:


  • Sebastian Kripfganz
    replied
    The first lag of the dependent variable, investments, is not a valid instrument for the first-differenced model because it is correlated by construction with the first-differenced error term. You would need to start with lag 2 or replace investments by L.investments in your gmm() option.

    Leave a comment:


  • Erlend Salhus
    replied
    If I transform the instruments as you suggest, the results does not make any sense. However, I know for a fact that there indeed are unobserved group-specific effects. Is there something else which can be done?

    Code:
    xtseqreg investments l.investments fundraising loans realrate EV_EBITDA GDPGrowth, gmm(investments fundraising loans realrate EV_EBITDA GDPGrowth, model(diff) lagrange(1 2) collapse) teffects vce(robust)
    
    Group variable: Country                      Number of obs         =       322
    Time variable: Year                          Number of groups      =        23
    
                                                 Obs per group:    min =        14
                                                                   avg =        14
                                                                   max =        14
    
                                                 Number of instruments =        24
    
                                   (Std. Err. adjusted for 23 clusters in Country)
    ------------------------------------------------------------------------------
                 |               Robust
     investments |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
     investments |
             L1. |  -.7970249   .1026553    -7.76   0.000    -.9982257   -.5958241
                 |
     fundraising |  -.4651334   .1440001    -3.23   0.001    -.7473684   -.1828984
           loans |  -.1435853   .0646596    -2.22   0.026    -.2703158   -.0168547
        realrate |   .2401136   .1424713     1.69   0.092     -.039125    .5193523
       EV_EBITDA |   3.351303   .2631574    12.73   0.000     2.835524    3.867082
       GDPGrowth |  -.2026799   .1112768    -1.82   0.069    -.4207784    .0154185
                 |
            Year |
           2009  |   4.538746   .8283898     5.48   0.000     2.915132     6.16236
           2010  |  -1.653224   .8996291    -1.84   0.066    -3.416464    .1100171
           2011  |  -2.570672   1.353209    -1.90   0.057    -5.222913    .0815686
           2012  |  -2.214624   1.331253    -1.66   0.096    -4.823832     .394584
           2013  |  -4.821718   1.443958    -3.34   0.001    -7.651824   -1.991612
           2014  |  -4.759001   1.480642    -3.21   0.001    -7.661005   -1.856996
           2015  |  -6.212976    1.41284    -4.40   0.000    -8.982093    -3.44386
           2016  |  -4.813099   1.603158    -3.00   0.003     -7.95523   -1.670967
           2017  |  -7.415403   1.589979    -4.66   0.000     -10.5317   -4.299102
           2018  |  -3.058209   1.407552    -2.17   0.030     -5.81696   -.2994591
           2019  |  -9.845316   1.816203    -5.42   0.000    -13.40501   -6.285623
           2020  |   -7.98553   1.785062    -4.47   0.000    -11.48419   -4.486872
           2021  |  -10.98603   1.805061    -6.09   0.000    -14.52389   -7.448179
                 |
           _cons |          0  (omitted)
    ------------------------------------------------------------------------------

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Now you have specified only untransformed instruments for the level model (the default). This would only be valid if there were no unobserved group-specific effects. Not surprisingly, the Hansen test rejects. Also, time effects should normally be included in the first stage, not the second stage.

    Leave a comment:


  • Erlend Salhus
    replied
    Thank you, Sebastian. I know understand the difference between one-step and two-step significantly better. Having GMM-instrumented the variables with the collapse function provides for a reasonable estimate given my hypotheses, along with a reasonable number of instruments. However the J-test for instrumental validity is rejected. Is there anything I can do about this? Do you have any advice on the specification?

    Code:
     xtseqreg investments l.investments fundraising loans realrate EV_EBITDA GDPGrowth, gmm(investments fundraising loans realrate EV_EBITDA GDPGrowth, lagrange(1 2) collapse) teffects vce(robust)
    
    Group variable: Country                      Number of obs         =       322
    Time variable: Year                          Number of groups      =        23
    
                                                 Obs per group:    min =        14
                                                                   avg =        14
                                                                   max =        14
    
                                                 Number of instruments =        24
    
                                   (Std. Err. adjusted for 23 clusters in Country)
    ------------------------------------------------------------------------------
                 |               Robust
     investments |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
     investments |
             L1. |    .343524   .0742916     4.62   0.000     .1979151    .4891328
                 |
     fundraising |   .4023131   .0872731     4.61   0.000     .2312609    .5733653
           loans |   .0858774    .063126     1.36   0.174    -.0378473    .2096021
        realrate |  -.0598164   .1445509    -0.41   0.679    -.3431309    .2234982
       EV_EBITDA |   .4172634   .1554146     2.68   0.007     .1126565    .7218704
       GDPGrowth |  -.2297269   .2305901    -1.00   0.319    -.6816753    .2222214
                 |
            Year |
           2009  |   .6828628   .8297635     0.82   0.411    -.9434437    2.309169
           2010  |   .7206616   .7358084     0.98   0.327    -.7214964     2.16282
           2011  |   1.530941   1.077079     1.42   0.155    -.5800947    3.641978
           2012  |   .4080854   .6441439     0.63   0.526    -.8544135    1.670584
           2013  |    .194311   .7907806     0.25   0.806    -1.355591    1.744213
           2014  |  -.1823429   .8501904    -0.21   0.830    -1.848686       1.484
           2015  |  -.3632815   1.126338    -0.32   0.747    -2.570863      1.8443
           2016  |  -1.887032   1.074414    -1.76   0.079    -3.992845    .2187815
           2017  |  -1.318689   2.079065    -0.63   0.526    -5.393582    2.756204
           2018  |  -2.829009   1.367854    -2.07   0.039    -5.509954   -.1480636
           2019  |  -1.583258   1.552625    -1.02   0.308    -4.626348    1.459831
           2020  |  -3.601026   1.462555    -2.46   0.014    -6.467581   -.7344706
           2021  |  -2.024731    2.20412    -0.92   0.358    -6.344728    2.295265
                 |
           _cons |          0  (omitted)
    ------------------------------------------------------------------------------
    Code:
    xtseqreg investments (l.investments fundraising loans realrate EV_EBITDA GDPGrowth) qe_D, iv(qe_D, model(level)) teffects vce(robust)
    
    Group variable: Country                      Number of obs         =       322
    Time variable: Year                          Number of groups      =        23
    
    ------------------------------------------------------------------------------
    Equation _first                              Equation _second
    Number of obs         =       322            Number of obs         =       322
    Number of groups      =        23            Number of groups      =        23
    
    Obs per group:    min =        14            Obs per group:    min =        14
                      avg =        14                              avg =        14
                      max =        14                              max =        14
    
    Number of instruments =        24            Number of instruments =        15
    
                                    (Std. Err. adjusted for clustering on Country)
    ------------------------------------------------------------------------------
                 |               Robust
     investments |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    _first       |
     investments |
             L1. |    .343524   .0742916     4.62   0.000     .1979151    .4891328
                 |
     fundraising |   .4023131   .0872731     4.61   0.000     .2312609    .5733653
           loans |   .0858774    .063126     1.36   0.174    -.0378473    .2096021
        realrate |  -.0598164   .1445509    -0.41   0.679    -.3431309    .2234982
       EV_EBITDA |   .4172634   .1554146     2.68   0.007     .1126565    .7218704
       GDPGrowth |  -.2297269   .2305901    -1.00   0.319    -.6816753    .2222214
           _cons |          0  (omitted)
    -------------+----------------------------------------------------------------
    _second      |
            qe_D |  -.4532447   .3270456    -1.39   0.166    -1.094242    .1877528
                 |
            Year |
           2008  |   1.709431   2.193838     0.78   0.436    -2.590412    6.009273
           2009  |      2.412   2.519466     0.96   0.338    -2.526063    7.350063
           2010  |   2.449798   2.392151     1.02   0.306    -2.238731    7.138328
           2011  |   3.240372   2.062877     1.57   0.116    -.8027918    7.283536
           2012  |   2.117516   2.220177     0.95   0.340    -2.233951    6.468983
           2013  |   1.903742   2.004936     0.95   0.342    -2.025861    5.833344
           2014  |   1.546794   1.895133     0.82   0.414    -2.167598    5.261186
           2015  |   1.622037   1.574558     1.03   0.303    -1.464039    4.708114
           2016  |   .0785806   1.263686     0.06   0.950    -2.398198     2.55536
           2017  |   .6469234   .6114013     1.06   0.290     -.551401    1.845248
           2018  |  -.8436903   1.324827    -0.64   0.524    -3.440303    1.752923
           2019  |   .4020603   .9941911     0.40   0.686    -1.546518    2.350639
           2020  |  -1.576295    1.46051    -1.08   0.280    -4.438842    1.286252
           2021  |          0  (omitted)
                 |
           _cons |  -1.689724   2.192586    -0.77   0.441    -5.987114    2.607666
    ------------------------------------------------------------------------------
    
    . estat overid
    
    Hansen's J-test for equation _first                    chi2(5)     =   23.0000
    H0: overidentifying restrictions are valid             Prob > chi2 =    0.0003
    
    Hansen's J-test for equation _second                   chi2(0)     =    0.0000
    note: coefficients are exactly identified              Prob > chi2 =         .
    I am grateful for your help so far!

    Leave a comment:

Working...
X