Announcement

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

  • xtabond2 specifications under reverse causality

    Hi everyone,

    I am trying to estimate a GMM panel dynamic model using a database of 31 countries (European countries) and 10 years.
    My dependent variable is log_evshare (electric vehicles registrations over total vehicle registrations), regressed using fixed effects (country-based) over (1) a continuous variable monetaryincentive, (2) log_elecdieselratio, aka the ratio between the price of electricity and the price of diesel, and (3) a trend variable year.

    The basic characteristics of my data/model revolve around two considerations:
    1. The dependent variable is dynamic (as confirmed by running autocorrelation tests for residuals after performing a simple xtreg, fe using the variables above).
    2. A FE model might suffer from omitted variable bias from not including charging, aka the number of charging stations present in the country. I then thought of using l.charging as additional control variable in my FE model to limit omitted variable bias but, at the same time, avoid introducing reverse causality.
    I realise that GMM models (xtabond2) might meet both my requests. My intuition would be to include l2.charging in the ivstyle specifications for l1.log_evshare, and l1.log_evshare as gmmstyle. That is:
    1. First stage: l2.charging explains l1.log_evshare, which in turn explains log_evshare
    2. Exclusion restriction: respected, since it's assumed that l2.charging affects log_evshare only through l1.log_evshare
    However, many things are not clear on how to use xtabond2 in my case:
    1. How do I choose how many lags to include? The reason I wanted to limit lags to gmmstyle (..., lags(0,1)) is that I then also have ivstyle(l2.charging, eq(l)). I worry that if I include more lags of the depvar in gmmstyle, my IV might not respect the exclusion restriction.
    2. How do I chose if I should include monetaryincentive and log_elecdieselratio inside the gmmstyle specifications? In case I add more controls (e.g. unemployment rate), should they always be included in the gmmstyle form too?
    3. Based on what do I include or not the trend year? I supposed modelling the depvar as dynamic makes it less necessary to include a trend. Is that correct?
    4. As a consequence of the previous three point, I did not find the correct specification yet to decide whether to use diff-GMM or system GMM. However, the following Pooled OLS regression suggests an estimate for l.log_evshare of 0.73. Is it correct to consider that diff-GMM could be a correct model, since log_evshare does not exhibit a random walk (beta -> 1)? Or should I move to system-GMM considering my small sample size?
    Code:
    regress log_evshare l.log_evshare monetaryincentive log_elecdieselratio l.charging year, vce(cluster countryid)
    Thank you very much and sorry for the long post.
    Last edited by Flora Marchioro; 26 Oct 2020, 15:03.

  • #2
    Hi Flora,

    Few things related to your questions:

    1) you cannot choose Z1 to instrument X1. What I mean is that when you choose the set of instruments you cannot say that one is used for another and a second instrument for a second variable. So you cannot say that l2.charging explains l1.evshare. unless you specify that ALL your regressors are exogenous a part from l1.evshare

    2) there is not a specific rule to say how many lags you should/should not include on your specification. Idellay they should be not too many since if you include a lot you loose explanatory power of your tests. Some time ago I read about a user-written routine named pca2 which allows you to determine the correct number of lags using a principal component analysis approach. You may want to have a look at it.

    3) when you mention a trend, do you mean a variable taking the values 1,2,3 and so on or do you mean a set of time dummies? Nonetheless they are exogenous and should be out under iv() option. If you model dynamically your dependent variable, this does not mean that you do not need a variable capturing temporal shocks that may affect in the same way countries in your sample (think of 2008 financial crisis for instance).

    4) Regarding whether to choose sys or diff gmm, a part from the diagnostic tests, recall that sys can be more appropriate of variables show persistency. In addition, a paper by bond hoffler and temple suggests that the POLS and the FE can be considered as the lower and upper bounds for a correct estimation of the the lagged dependent variable using the GMM. Specifically, the estimation of the lagged dependent variable obtained by the diff gmm ahouldcshould betbe closer to the estimate of the same parameter obtained via the FE estimator. Instead the parameter from the SYS gmm should approach the one obtained via the POLS.

    I hope this could help you

    Comment


    • #3
      Dear Dario,

      Thank you very very much for your prompt reply. To sum up:

      1. If I cannot be sure that my other variables apart from l.log_evshare are exogenous, I have to include all of them in the gmmstyle specifications. Is that correct?
      2. Can I then be at ease with including deeper lags in the gmmstyle specifications e.g. gmmstyle (..., lags(1,3)) even if I include ivstyle(l2.charging, eq(l))?
      3. By trend I meant indeed a variable
      taking the values 1,2,3 and so on. I will try to include either that or i.year in the specifications ivstyle(l2.charging i.year).
      4. I just confronted Pooled OLS and FE with the specification below (Two-step Diff-GMM). The Pooled OLS estimate was 0.74, the FE (with lagged depvar) estimate was 0.17. Should I try System GMM instead? Also, the AR(1) worries me a bit.

      Code:
       xtabond2 L(0/1).log_evshare monetaryincentive log_elecdieselratio, gmm(L.log_evshare monetaryincentive log_elecdieselratio, lag(1 3) e(d) collapse) ivstyle(l2.charging i.year) nol twostep robust
      Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
      Warning: Two-step estimated covariance matrix of moments is singular.
        Using a generalized inverse to calculate optimal weighting matrix for two-step estimation.
        Difference-in-Sargan/Hansen statistics may be negative.
      
      Dynamic panel-data estimation, two-step difference GMM
      ------------------------------------------------------------------------------
      Group variable: countryid                       Number of obs      =       217
      Time variable : year                            Number of groups   =        31
      Number of instruments = 17                      Obs per group: min =         7
      Wald chi2(3)  =    203.54                                      avg =      7.00
      Prob > chi2   =     0.000                                      max =         7
      -------------------------------------------------------------------------------------
                          |              Corrected
              log_evshare |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      --------------------+----------------------------------------------------------------
              log_evshare |
                      L1. |   .7379298   .0910642     8.10   0.000     .5594472    .9164124
                          |
        monetaryincentive |   .2364677   .1155878     2.05   0.041     .0099196    .4630157
      log_elecdieselratio |   -.512866   .9374967    -0.55   0.584    -2.350326    1.324594
      -------------------------------------------------------------------------------------
      Instruments for first differences equation
        Standard
          D.(L2.charging 2010b.year 2011.year 2012.year 2013.year 2014.year
          2015.year 2016.year 2017.year 2018.year 2019.year)
        GMM-type (missing=0, separate instruments for each period unless collapsed)
          L(1/3).(L.log_evshare monetaryincentive log_elecdieselratio) collapsed
      ------------------------------------------------------------------------------
      Arellano-Bond test for AR(1) in first differences: z =  -1.81  Pr > z =  0.071
      Arellano-Bond test for AR(2) in first differences: z =   0.32  Pr > z =  0.748
      ------------------------------------------------------------------------------
      Sargan test of overid. restrictions: chi2(14)   =  33.66  Prob > chi2 =  0.002
        (Not robust, but not weakened by many instruments.)
      Hansen test of overid. restrictions: chi2(14)   =  14.82  Prob > chi2 =  0.390
        (Robust, but weakened by many instruments.)
      
      Difference-in-Hansen tests of exogeneity of instrument subsets:
        gmm(L.log_evshare monetaryincentive log_elecdieselratio, collapse eq(diff) lag(1 3))
          Hansen test excluding group:     chi2(5)    =   9.73  Prob > chi2 =  0.083
          Difference (null H = exogenous): chi2(9)    =   5.09  Prob > chi2 =  0.826
        iv(L2.charging 2010b.year 2011.year 2012.year 2013.year 2014.year 2015.year 2016.year 2017.year 2018.year 2019.year)
          Hansen test excluding group:     chi2(6)    =   6.32  Prob > chi2 =  0.388
          Difference (null H = exogenous): chi2(8)    =   8.50  Prob > chi2 =  0.386
      Code:
      
      
      Thank you again!

      Comment


      • #4
        Also,
        • Is it always the case that l.log_evshare has to be significant to justify going on with a dynamic model?
        • Is wrong not to include l2.charging i.year (or any other additional ivstyle-variable) in the initial model? I see why you would need to have the same variables in the initial model and in gmmstyle, but is it the case for ivstyle variables too?

        Comment


        • #5
          Hi Flora,

          1) No. You select your instruments, which can consist of one variable only. Endogenous does not mean that you have to include into the set of instruments;
          2) Yes. Why not? By the way, I would not use lag (1 .), You should start from lag(2 .).
          4) You may try the SYS-GMM indeed. The AR1 is ok in my view.

          It seems to be that you are new with GMM estimation. I suggest you the following reading:

          https://www.stata.com/meeting/uk19/s..._kripfganz.pdf

          Very useful to understand how GMM works. It also contains a lot of examples.

          Comment


          • #6
            In addition to my London Stata Conference slides linked by Dario, also have a look at the following topic to be aware of some issues with xtabond2:
            A collection of bugs in xtabond2, xtabond, xtdpd, xtdpdsys, gmm
            https://www.kripfganz.de/stata/

            Comment


            • #7
              Thanks Sebastian. I missed that post which I find really useful!

              Comment


              • #8
                Dear Dario,

                Indeed Dario, I'm new to GMM.
                I read some more materials today, including the link you suggested me. I have one last question. As outlined above, I have a Pooled OLS estimate of l.log_evshare of 0.75 (significant) and a FE estimate of 0.17 (not significant). I run the following models to compare a twostep diff-GMM and a sys-GMM, and am puzzled about the estimate of l.log_evshare in the latter model.
                Is the fact that the sys-GMM estimate is outside the range of [Pooled OLS - FE] a suggestion that sys-GMM is not the right model? All other criteria of the sys-GMM (AR(2), Hansen, p-values...) seem fine to me, and possibly better than those of the diff_GMM.
                (as suggested by you, I avoided using lag( ...) as in the code above, and used lag(2 4) instead)

                Thank you

                Code:
                xtabond2 L(0/1).log_evshare monetaryincentive log_elecdieselratio, gmm(L.log_evshare monetaryincentive log_elecdieselratio, lag(2 4) e(d) collapse)ivstyle(l2.charging i.year, e(l)) nol twostep robust small
                Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
                Instruments for levels equations only ignored since noleveleq specified.
                
                Dynamic panel-data estimation, two-step difference GMM
                ------------------------------------------------------------------------------
                Group variable: countryid                       Number of obs      =       256
                Time variable : year                            Number of groups   =        32
                Number of instruments = 9                       Obs per group: min =         8
                F(3, 32)      =    219.75                                      avg =      8.00
                Prob > F      =     0.000                                      max =         8
                -------------------------------------------------------------------------------------
                                    |              Corrected
                        log_evshare |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                --------------------+----------------------------------------------------------------
                        log_evshare |
                                L1. |   .7978945   .1453282     5.49   0.000     .5018707    1.093918
                                    |
                  monetaryincentive |   .1633319   .1523598     1.07   0.292    -.1470148    .4736786
                log_elecdieselratio |  -1.387455   3.085756    -0.45   0.656    -7.672936    4.898025
                -------------------------------------------------------------------------------------
                Instruments for first differences equation
                  GMM-type (missing=0, separate instruments for each period unless collapsed)
                    L(2/4).(L.log_evshare monetaryincentive log_elecdieselratio) collapsed
                ------------------------------------------------------------------------------
                Arellano-Bond test for AR(1) in first differences: z =  -1.71  Pr > z =  0.087
                Arellano-Bond test for AR(2) in first differences: z =   1.08  Pr > z =  0.279
                ------------------------------------------------------------------------------
                Sargan test of overid. restrictions: chi2(6)    =  15.64  Prob > chi2 =  0.016
                  (Not robust, but not weakened by many instruments.)
                Hansen test of overid. restrictions: chi2(6)    =   8.86  Prob > chi2 =  0.181
                  (Robust, but weakened by many instruments.)
                Code:
                xtabond2 L(0/1).log_evshare monetaryincentive log_elecdieselratio, gmm(L.log_evshare monetaryincentive log_elecdieselratio, lag(2 4) e(d) collapse)ivstyle(l2.charging i.year, e(l)) twostep robust small
                Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
                Warning: Two-step estimated covariance matrix of moments is singular.
                  Using a generalized inverse to calculate optimal weighting matrix for two-step estimation.
                  Difference-in-Sargan/Hansen statistics may be negative.
                
                Dynamic panel-data estimation, two-step system GMM
                ------------------------------------------------------------------------------
                Group variable: countryid                       Number of obs      =       256
                Time variable : year                            Number of groups   =        32
                Number of instruments = 18                      Obs per group: min =         8
                F(3, 31)      =    237.35                                      avg =      8.00
                Prob > F      =     0.000                                      max =         8
                -------------------------------------------------------------------------------------
                                    |              Corrected
                        log_evshare |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                --------------------+----------------------------------------------------------------
                        log_evshare |
                                L1. |   .8460951   .0506492    16.71   0.000     .7427954    .9493948
                                    |
                  monetaryincentive |   .0926355   .0465823     1.99   0.056    -.0023696    .1876407
                log_elecdieselratio |  -1.620856   .8299146    -1.95   0.060    -3.313478    .0717659
                              _cons |  -4.133339   1.588582    -2.60   0.014    -7.373273   -.8934041
                -------------------------------------------------------------------------------------
                Instruments for first differences equation
                  GMM-type (missing=0, separate instruments for each period unless collapsed)
                    L(2/4).(L.log_evshare monetaryincentive log_elecdieselratio) collapsed
                Instruments for levels equation
                  Standard
                    L2.charging 2010b.year 2011.year 2012.year 2013.year 2014.year 2015.year
                    2016.year 2017.year 2018.year 2019.year
                    _cons
                ------------------------------------------------------------------------------
                Arellano-Bond test for AR(1) in first differences: z =  -1.77  Pr > z =  0.077
                Arellano-Bond test for AR(2) in first differences: z =   1.11  Pr > z =  0.266
                ------------------------------------------------------------------------------
                Sargan test of overid. restrictions: chi2(14)   =  19.94  Prob > chi2 =  0.132
                  (Not robust, but not weakened by many instruments.)
                Hansen test of overid. restrictions: chi2(14)   =  14.30  Prob > chi2 =  0.428
                  (Robust, but weakened by many instruments.)
                
                Difference-in-Hansen tests of exogeneity of instrument subsets:
                  gmm(L.log_evshare monetaryincentive log_elecdieselratio, collapse eq(diff) lag(2 4))
                    Hansen test excluding group:     chi2(5)    =   9.14  Prob > chi2 =  0.103
                    Difference (null H = exogenous): chi2(9)    =   5.15  Prob > chi2 =  0.821
                  iv(L2.charging 2010b.year 2011.year 2012.year 2013.year 2014.year 2015.year 2016.year 2017.year 2018.year 2019.year, eq(
                > level))
                    Hansen test excluding group:     chi2(6)    =   9.32  Prob > chi2 =  0.156
                    Difference (null H = exogenous): chi2(8)    =   4.97  Prob > chi2 =  0.760
                Last edited by Flora Marchioro; 27 Oct 2020, 11:10.

                Comment


                • #9
                  Hi Flora,

                  ​​​​​​there are a couple of mistakes in your routines.

                  1) in the diff-gmm you specified ivstyle with the option e(l). Since you also specified the option nol, this part of the routine is skipped as indicated in the model. Hence you end up in instrumenting even the time variables. You should use ivstyle without the specification e(l). Given that you are not running a sys-gmm they will be used for the diff-gmm only. Notice that the time variables should be always put in ivstyle no matter if you use diff-gmm and sys-gmm.

                  2) regarding the sys-gmm what happens if you drop the option e(l) from ivstyle (as you should do) and you add gmm(log_evshare, lag(1 1) eq(l))?

                  Dario

                  Comment


                  • #10
                    Hi Dario,

                    I thank you again for your support and am sorry for this long reply.
                    1. I noticed a mistake in my code: I was doing gmm(L. ..., lag(2 4), which is not the same of gmm(..., lag(2 4). The latter I think is the correct lag specification when including the dependent variable. See: https://www.statalist.org/forums/for...-or-difference Following Roodman (2007, page 129) I also lagged other predetermined explanatory variables starting from lag 1, that is with gmm(..., lag (1 ...)). Interestingly, going from a lag(1 3) to lag(1 4) of the other explanatory variables, the estimate of l.log_evshare moves from outside to inside the expected range of [0.75 - 0.17].
                    Finally, in both models the tests look fine, however, the variable of interest monetaryincentive has estimates which are way above what I expected. Sys-GMM estimates below are more in line.
                    Code:
                    xtabond2 L(0/1).log_evshare monetaryincentive log_elecdieselratio, gmm(log_evshare, lag(2 4) e(d) collapse) gmm(monetary
                    > incentive log_elecdieselratio, lag (1 3) collapse) ivstyle(l2.charging i.year) nol twostep robust
                    Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
                    Warning: Two-step estimated covariance matrix of moments is singular.
                      Using a generalized inverse to calculate optimal weighting matrix for two-step estimation.
                      Difference-in-Sargan/Hansen statistics may be negative.
                    
                    Dynamic panel-data estimation, two-step difference GMM
                    ------------------------------------------------------------------------------
                    Group variable: countryid                       Number of obs      =       224
                    Time variable : year                            Number of groups   =        32
                    Number of instruments = 17                      Obs per group: min =         7
                    Wald chi2(3)  =    223.18                                      avg =      7.00
                    Prob > chi2   =     0.000                                      max =         7
                    -------------------------------------------------------------------------------------
                                        |              Corrected
                            log_evshare |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                    --------------------+----------------------------------------------------------------
                            log_evshare |
                                    L1. |   .7541485   .0945691     7.97   0.000     .5687965    .9395005
                                        |
                      monetaryincentive |   .2217941   .1210076     1.83   0.067    -.0153766    .4589647
                    log_elecdieselratio |  -.6355796   .9527534    -0.67   0.505    -2.502942    1.231783
                    -------------------------------------------------------------------------------------
                    Instruments for first differences equation
                      Standard
                        D.(L2.charging 2010b.year 2011.year 2012.year 2013.year 2014.year
                        2015.year 2016.year 2017.year 2018.year 2019.year)
                      GMM-type (missing=0, separate instruments for each period unless collapsed)
                        L(1/3).(monetaryincentive log_elecdieselratio) collapsed
                        L(2/4).log_evshare collapsed
                    ------------------------------------------------------------------------------
                    Arellano-Bond test for AR(1) in first differences: z =  -1.88  Pr > z =  0.060
                    Arellano-Bond test for AR(2) in first differences: z =   0.65  Pr > z =  0.519
                    ------------------------------------------------------------------------------
                    Sargan test of overid. restrictions: chi2(14)   =  35.28  Prob > chi2 =  0.001
                      (Not robust, but not weakened by many instruments.)
                    Hansen test of overid. restrictions: chi2(14)   =  15.13  Prob > chi2 =  0.369
                      (Robust, but weakened by many instruments.)
                    
                    Difference-in-Hansen tests of exogeneity of instrument subsets:
                      gmm(log_evshare, collapse eq(diff) lag(2 4))
                        Hansen test excluding group:     chi2(11)   =  12.47  Prob > chi2 =  0.330
                        Difference (null H = exogenous): chi2(3)    =   2.66  Prob > chi2 =  0.447
                      gmm(monetaryincentive log_elecdieselratio, collapse lag(1 3))
                        Hansen test excluding group:     chi2(8)    =  11.73  Prob > chi2 =  0.164
                        Difference (null H = exogenous): chi2(6)    =   3.40  Prob > chi2 =  0.757
                      iv(L2.charging 2010b.year 2011.year 2012.year 2013.year 2014.year 2015.year 2016.year 2017.year 2018.year 2019.year)
                        Hansen test excluding group:     chi2(6)    =   7.31  Prob > chi2 =  0.293
                        Difference (null H = exogenous): chi2(8)    =   7.82  Prob > chi2 =  0.451


                    Code:
                    xtabond2 L(0/1).log_evshare monetaryincentive log_elecdieselratio, gmm(log_evshare, lag(2 4) e(d) collapse) gmm(monetary
                    > incentive log_elecdieselratio, lag (1 4) collapse) ivstyle(l2.charging i.year) nol twostep robust
                    Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
                    Warning: Two-step estimated covariance matrix of moments is singular.
                      Using a generalized inverse to calculate optimal weighting matrix for two-step estimation.
                      Difference-in-Sargan/Hansen statistics may be negative.
                    
                    Dynamic panel-data estimation, two-step difference GMM
                    ------------------------------------------------------------------------------
                    Group variable: countryid                       Number of obs      =       224
                    Time variable : year                            Number of groups   =        32
                    Number of instruments = 19                      Obs per group: min =         7
                    Wald chi2(3)  =    244.74                                      avg =      7.00
                    Prob > chi2   =     0.000                                      max =         7
                    -------------------------------------------------------------------------------------
                                        |              Corrected
                            log_evshare |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                    --------------------+----------------------------------------------------------------
                            log_evshare |
                                    L1. |   .7319743   .0905183     8.09   0.000     .5545617    .9093869
                                        |
                      monetaryincentive |   .2484793   .1118299     2.22   0.026     .0292968    .4676619
                    log_elecdieselratio |  -.4651986   .9336029    -0.50   0.618    -2.295027    1.364629
                    -------------------------------------------------------------------------------------
                    Instruments for first differences equation
                      Standard
                        D.(L2.charging 2010b.year 2011.year 2012.year 2013.year 2014.year
                        2015.year 2016.year 2017.year 2018.year 2019.year)
                      GMM-type (missing=0, separate instruments for each period unless collapsed)
                        L(1/4).(monetaryincentive log_elecdieselratio) collapsed
                        L(2/4).log_evshare collapsed
                    ------------------------------------------------------------------------------
                    Arellano-Bond test for AR(1) in first differences: z =  -1.86  Pr > z =  0.063
                    Arellano-Bond test for AR(2) in first differences: z =   0.56  Pr > z =  0.575
                    ------------------------------------------------------------------------------
                    Sargan test of overid. restrictions: chi2(16)   =  40.95  Prob > chi2 =  0.001
                      (Not robust, but not weakened by many instruments.)
                    Hansen test of overid. restrictions: chi2(16)   =  15.80  Prob > chi2 =  0.467
                      (Robust, but weakened by many instruments.)
                    
                    Difference-in-Hansen tests of exogeneity of instrument subsets:
                      gmm(log_evshare, collapse eq(diff) lag(2 4))
                        Hansen test excluding group:     chi2(13)   =  13.85  Prob > chi2 =  0.385
                        Difference (null H = exogenous): chi2(3)    =   1.96  Prob > chi2 =  0.582
                      gmm(monetaryincentive log_elecdieselratio, collapse lag(1 4))
                        Hansen test excluding group:     chi2(8)    =  11.79  Prob > chi2 =  0.161
                        Difference (null H = exogenous): chi2(8)    =   4.02  Prob > chi2 =  0.856
                      iv(L2.charging 2010b.year 2011.year 2012.year 2013.year 2014.year 2015.year 2016.year 2017.year 2018.year 2019.year)
                        Hansen test excluding group:     chi2(8)    =   7.61  Prob > chi2 =  0.473
                        Difference (null H = exogenous): chi2(8)    =   8.20  Prob > chi2 =  0.414
                    2. For what I understood, with system-GMM time dummies have to be specified under the ivstyle(yr*, e(l)) option. See https://www.statalist.org/forums/for...m-time-dummies With your previous message do you mean that I should do ivstyle(l2.charging) instead of ivstyle(l2.charging, e(l))?
                    I tried adding gmm(log_evshare, lag(1 1) eq(l)) as further instrument, together with the other modifications I applied to the model. The result seems more promising, although it's a bit chaotic.
                    Two considerations: (1) the fourth diff-Hansen test is a bit worrying and (2) as for diff-GMM, using lag(1 4) of other explanatory variables makes a whole difference (namely, with lag(1 3) the estimate of l.log_evshare is outside the range) . See below

                    3. I am actually having some second thoughts on including l2.charging as external IV instead of including it in a gmm(charging, lag(3 ...)) specification as predetermined variable, even though I am not including charging in the initial model. My main issue is that I have reverse causality between log_evshare and charging, so (at least in a FE OLS framework) it is suggested to include l.charging instead of charging as explanatory variable. In a GMM dynamic framework I then though it made sense to use the lags in the following order: l2.charging --> l.log_evshare --> log_evshare.
                    Would you include charging differently then how I did below?
                    Code:
                    xtabond2 L(0/1).log_evshare monetaryincentive log_elecdieselratio, gmm(log_evshare, lag(2 4) e(d) collapse) gmm(log_evsh
                    > are, lag(1 1) e(l) collapse) gmm(monetaryincentive log_elecdieselratio, lag (1 4) collapse) ivstyle(l2.charging) ivstyle
                    > (i.year, e(l)) twostep robust small
                    Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
                    Warning: Two-step estimated covariance matrix of moments is singular.
                      Using a generalized inverse to calculate optimal weighting matrix for two-step estimation.
                      Difference-in-Sargan/Hansen statistics may be negative.
                    
                    Dynamic panel-data estimation, two-step system GMM
                    ------------------------------------------------------------------------------
                    Group variable: countryid                       Number of obs      =       256
                    Time variable : year                            Number of groups   =        32
                    Number of instruments = 23                      Obs per group: min =         8
                    F(3, 31)      =    339.81                                      avg =      8.00
                    Prob > F      =     0.000                                      max =         8
                    -------------------------------------------------------------------------------------
                                        |              Corrected
                            log_evshare |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                    --------------------+----------------------------------------------------------------
                            log_evshare |
                                    L1. |   .7391902   .0586976    12.59   0.000     .6194757    .8589046
                                        |
                      monetaryincentive |   .0851341   .0348692     2.44   0.021     .0140178    .1562503
                    log_elecdieselratio |  -.1696784   .5096231    -0.33   0.741    -1.209061    .8697047
                                  _cons |  -1.752471    .877357    -2.00   0.055    -3.541853    .0369101
                    -------------------------------------------------------------------------------------
                    Instruments for first differences equation
                      Standard
                        D.L2.charging
                      GMM-type (missing=0, separate instruments for each period unless collapsed)
                        L(1/4).(monetaryincentive log_elecdieselratio) collapsed
                        L(2/4).log_evshare collapsed
                    Instruments for levels equation
                      Standard
                        2010b.year 2011.year 2012.year 2013.year 2014.year 2015.year 2016.year
                        2017.year 2018.year 2019.year
                        L2.charging
                        _cons
                      GMM-type (missing=0, separate instruments for each period unless collapsed)
                        D.(monetaryincentive log_elecdieselratio) collapsed
                        DL.log_evshare collapsed
                    ------------------------------------------------------------------------------
                    Arellano-Bond test for AR(1) in first differences: z =  -1.91  Pr > z =  0.057
                    Arellano-Bond test for AR(2) in first differences: z =   0.54  Pr > z =  0.591
                    ------------------------------------------------------------------------------
                    Sargan test of overid. restrictions: chi2(19)   =  56.28  Prob > chi2 =  0.000
                      (Not robust, but not weakened by many instruments.)
                    Hansen test of overid. restrictions: chi2(19)   =  18.65  Prob > chi2 =  0.479
                      (Robust, but weakened by many instruments.)
                    
                    Difference-in-Hansen tests of exogeneity of instrument subsets:
                      GMM instruments for levels
                        Hansen test excluding group:     chi2(16)   =  17.74  Prob > chi2 =  0.340
                        Difference (null H = exogenous): chi2(3)    =   0.92  Prob > chi2 =  0.821
                      gmm(log_evshare, collapse eq(diff) lag(2 4))
                        Hansen test excluding group:     chi2(16)   =  16.71  Prob > chi2 =  0.405
                        Difference (null H = exogenous): chi2(3)    =   1.95  Prob > chi2 =  0.583
                      gmm(log_evshare, collapse eq(level) lag(1 1))
                        Hansen test excluding group:     chi2(18)   =  18.28  Prob > chi2 =  0.438
                        Difference (null H = exogenous): chi2(1)    =   0.38  Prob > chi2 =  0.538
                      gmm(monetaryincentive log_elecdieselratio, collapse lag(1 4))
                        Hansen test excluding group:     chi2(9)    =  16.58  Prob > chi2 =  0.056
                        Difference (null H = exogenous): chi2(10)   =   2.08  Prob > chi2 =  0.996
                      iv(L2.charging)
                        Hansen test excluding group:     chi2(18)   =  18.65  Prob > chi2 =  0.413
                        Difference (null H = exogenous): chi2(1)    =   0.00  Prob > chi2 =  0.989
                      iv(2010b.year 2011.year 2012.year 2013.year 2014.year 2015.year 2016.year 2017.year 2018.year 2019.year, eq(level))
                        Hansen test excluding group:     chi2(12)   =  15.26  Prob > chi2 =  0.228
                        Difference (null H = exogenous): chi2(7)    =   3.39  Prob > chi2 =  0.846
                    Last edited by Flora Marchioro; 28 Oct 2020, 04:46.

                    Comment

                    Working...
                    X