Announcement

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

  • System GMM Xtabond2 model specification (FDI determinants)

    Dear Stata users,

    I have been trying to estimate the effects of the different FDI determinants:
    Regressors Unit
    lagged FDI net inflows, BoP, current US$
    electricity prices usc/kWh, taxes incl.
    GDP growth rate
    trade % of GDP
    tax % of commercial profits
    country risk 0-100, 0 = most risky
    logarithm of gross fixed capital formation constant 2010 US$
    logarithm of labor productivity output per worker, GDP constant 2011 international $ in PPP
    on FDI using GMM with xtabond2. The data I'm using is a panel data across 90 countries from 2004-2015 (12 years).

    I ran 3 different types of regressions and these were the results:
    Type of Data/Time frame Coefficients + Significance Difference-in-Hansen
    (Prob > chi2)
    Notes
    1. 3-year period averages from 2004-2015, using period dummies as instruments
    • most of the coefficient signs are not what we predicted and are insignificant
    sometimes .3 < X < 1
    • AR(2) value not present
    • GDP most of the time has a negative coefficient wrt to FDI
    2. Annual figures from 2004-2015, using year dummies as instruments
    • correct signs
    • sometimes significant
    • instruments are greater than the no. of groups
    most of the time 1
    • I tried dropping variables to see whether our regressions would have better results (possibility of solving for endogeneity, autocorrelation, etc.)
    3. Annual figures from 2004-2015 but using the dummies of 3-year period averages as instruments
    (in order to decrease the instrument count)
    • some correct signs
    • usually insignificant
    • instrument count decreased by a bit
    most of the time 1
    Attached is my regression for #2:



    Am I conducting the regressions correctly? Is it actually possible to have years with period dummies (the 3rd type of regression I ran)? Also, would you suggest a specific type of data I should focus among the 3? Or is the method not fit for our type of data?

    Any help would be greatly appreciated.

    Thank you!

  • #2
    Some comments:
    • The Arellano-Bond AR(2) test for your first specification is not available because after forming 3-year averages you do not have enough time-series observations any more to compute this test.
    • In all of your regressions, you have way too many instruments which causes a lot of trouble. You should reduce your number of lags by utilizing the laglimits() and collapse suboptions of the gmmstyle() option. See help xtabond2 for details and the Roodman's article on how to do xtabond2 for useful additional information and references.
    • I would use your second specification as a starting point.
    https://twitter.com/Kripfganz

    Comment


    • #3
      Noted. Thanks so much Sebastian!

      Regarding your suggestion on utilizing lag limits & collapse, I tried it and this is what I got:

      1. Incorporating lag limits
      Code:
      . xtabond2 fdi L.fdi elec lngdp_pc trade tax cr lnlaborprod L.lngfcf i.year, gmm
      
      > (L.fdi, lag(2 6)) iv(i.year, equation(level)) 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 robust weighting matrix for Hansen te
      
      > st.
      
       Difference-in-Sargan/Hansen statistics may be negative.
      
      
      Dynamic panel-data estimation, one-step system GMM
      
      ------------------------------------------------------------------------------
      
      Group variable: ctry                            Number of obs      =       778
      
      Time variable : year                            Number of groups   =        85
      
      Number of instruments = 48                      Obs per group: min =         4
      
      F(20, 84)     =      6.34                                      avg =      9.15
      
      Prob > F      =     0.000                                      max =        10
      
      ------------------------------------------------------------------------------
      
                  |               Robust
      
              fdi |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      
      -------------+----------------------------------------------------------------
      
              fdi |
      
              L1. |   .3264675   .1858893     1.76   0.083    -.0431937    .6961287
      
                  |
      
             elec |  -5.43e+09   1.18e+10    -0.46   0.646    -2.88e+10    1.80e+10
      
         lngdp_pc |   2.19e+11   1.84e+11     1.19   0.236    -1.46e+11    5.85e+11
      
            trade |  -1.82e+08   7.49e+08    -0.24   0.809    -1.67e+09    1.31e+09
      
              tax |  -3.08e+09   3.47e+09    -0.89   0.377    -9.99e+09    3.83e+09
      
               cr |  -1.48e+09   1.08e+10    -0.14   0.891    -2.29e+10    1.99e+10
      
      lnlaborprod |  -4.02e+11   2.79e+11    -1.44   0.153    -9.57e+11    1.52e+11
      
                  |
      
           lngfcf |
      
              L1. |   3.36e+10   2.48e+10     1.35   0.180    -1.57e+10    8.29e+10
      
                  |
      
             year |
      
            2004  |          0  (empty)
      
            2005  |   6.81e+10   1.23e+11     0.55   0.581    -1.76e+11    3.12e+11
      
            2006  |   6.11e+10   1.12e+11     0.55   0.586    -1.61e+11    2.83e+11
      
            2007  |   4.41e+10   8.83e+10     0.50   0.619    -1.32e+11    2.20e+11
      
            2008  |   8.89e+09   4.90e+10     0.18   0.856    -8.85e+10    1.06e+11
      
            2009  |  -8.11e+08   3.64e+10    -0.02   0.982    -7.32e+10    7.15e+10
      
            2010  |   1.09e+10   3.26e+10     0.33   0.740    -5.40e+10    7.57e+10
      
            2011  |   7.68e+09   1.95e+10     0.39   0.695    -3.11e+10    4.65e+10
      
            2012  |   3.99e+09   1.05e+10     0.38   0.705    -1.69e+10    2.49e+10
      
            2013  |  -4.79e+08   8.14e+09    -0.06   0.953    -1.67e+10    1.57e+10
      
            2014  |          0  (omitted)
      
            2015  |          0  (omitted)
      
                  |
      
            _cons |   1.74e+12   1.57e+12     1.11   0.272    -1.39e+12    4.87e+12
      
      ------------------------------------------------------------------------------
      
      Instruments for first differences equation
      
       GMM-type (missing=0, separate instruments for each period unless collapsed)
      
         L(2/6).L.fdi
      
      Instruments for levels equation
      
       Standard
      
         2004b.year 2005.year 2006.year 2007.year 2008.year 2009.year 2010.year
      
         2011.year 2012.year 2013.year 2014.year 2015.year
      
         _cons
      
       GMM-type (missing=0, separate instruments for each period unless collapsed)
      
         DL.L.fdi
      
      ------------------------------------------------------------------------------
      
      Arellano-Bond test for AR(1) in first differences: z =  -1.94  Pr > z =  0.052
      
      Arellano-Bond test for AR(2) in first differences: z =   0.00  Pr > z =  0.996
      
      ------------------------------------------------------------------------------
      
      Sargan test of overid. restrictions: chi2(27)   = 277.95  Prob > chi2 =  0.000
      
       (Not robust, but not weakened by many instruments.)
      
      Hansen test of overid. restrictions: chi2(27)   = 282.18  Prob > chi2 =  0.000
      
       (Robust, but weakened by many instruments.)
      
      
      Difference-in-Hansen tests of exogeneity of instrument subsets:
      
       GMM instruments for levels
      
         Hansen test excluding group:     chi2(19)   = 155.86  Prob > chi2 =  0.000
      
         Difference (null H = exogenous): chi2(8)    = 126.32  Prob > chi2 =  0.000
      
       iv(2004b.year 2005.year 2006.year 2007.year 2008.year 2009.year 2010.year 2011
      
      > .year 2012.year 2013.year 2014.year 2015.year, eq(level))
      
         Hansen test excluding group:     chi2(18)   = 168.97  Prob > chi2 =  0.000
      
         Difference (null H = exogenous): chi2(9)    = 113.21  Prob > chi2 =  0.000
      2. Incorporated lag limits & collapse
      Code:
      xtabond2 fdi L.fdi elec lngdp_pc trade tax cr lnlaborprod L.lngfcf i.year, gmm
      
      > (L.fdi, lag(2 6)) gmm(L.lngdp_pc, collapse) iv(i.year, equation(level)) 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 robust weighting matrix for Hansen te
      
      > st.
      
       Difference-in-Sargan/Hansen statistics may be negative.
      
      
      Dynamic panel-data estimation, one-step system GMM
      
      ------------------------------------------------------------------------------
      
      Group variable: ctry                            Number of obs      =       778
      
      Time variable : year                            Number of groups   =        85
      
      Number of instruments = 58                      Obs per group: min =         4
      
      F(20, 84)     =     10.86                                      avg =      9.15
      
      Prob > F      =     0.000                                      max =        10
      
      ------------------------------------------------------------------------------
      
                  |               Robust
      
              fdi |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      
      -------------+----------------------------------------------------------------
      
              fdi |
      
              L1. |   .3492869   .1277196     2.73   0.008     .0953025    .6032713
      
                  |
      
             elec |  -2.74e+09   3.16e+09    -0.87   0.388    -9.03e+09    3.55e+09
      
         lngdp_pc |   1.59e+11   1.04e+11     1.54   0.128    -4.69e+10    3.66e+11
      
            trade |   7.66e+07   3.96e+08     0.19   0.847    -7.11e+08    8.65e+08
      
              tax |  -1.25e+09   1.70e+09    -0.74   0.463    -4.63e+09    2.13e+09
      
               cr |  -3.13e+09   3.83e+09    -0.82   0.416    -1.07e+10    4.49e+09
      
      lnlaborprod |  -2.58e+11   1.42e+11    -1.82   0.072    -5.40e+11    2.40e+10
      
                  |
      
           lngfcf |
      
              L1. |   2.83e+10   1.07e+10     2.65   0.010     7.08e+09    4.95e+10
      
                  |
      
             year |
      
            2004  |          0  (empty)
      
            2005  |          0  (omitted)
      
            2006  |  -5.41e+09   4.52e+09    -1.20   0.234    -1.44e+10    3.57e+09
      
            2007  |  -1.71e+10   1.18e+10    -1.45   0.151    -4.06e+10    6.35e+09
      
            2008  |  -4.98e+10   2.97e+10    -1.68   0.097    -1.09e+11    9.26e+09
      
            2009  |  -6.04e+10   3.24e+10    -1.86   0.066    -1.25e+11    4.09e+09
      
            2010  |  -4.98e+10   3.34e+10    -1.49   0.140    -1.16e+11    1.66e+10
      
            2011  |  -5.51e+10   3.44e+10    -1.60   0.114    -1.24e+11    1.34e+10
      
            2012  |  -6.19e+10   3.77e+10    -1.64   0.104    -1.37e+11    1.31e+10
      
            2013  |  -6.61e+10   3.91e+10    -1.69   0.095    -1.44e+11    1.18e+10
      
            2014  |  -6.73e+10   3.98e+10    -1.69   0.094    -1.46e+11    1.18e+10
      
            2015  |          0  (omitted)
      
                  |
      
            _cons |   9.42e+11   7.24e+11     1.30   0.197    -4.97e+11    2.38e+12
      
      ------------------------------------------------------------------------------
      
      Instruments for first differences equation
      
       GMM-type (missing=0, separate instruments for each period unless collapsed)
      
         L(1/11).L.lngdp_pc collapsed
      
         L(2/6).L.fdi
      
      Instruments for levels equation
      
       Standard
      
         2004b.year 2005.year 2006.year 2007.year 2008.year 2009.year 2010.year
      
         2011.year 2012.year 2013.year 2014.year 2015.year
      
         _cons
      
       GMM-type (missing=0, separate instruments for each period unless collapsed)
      
         D.L.lngdp_pc collapsed
      
         DL.L.fdi
      
      ------------------------------------------------------------------------------
      
      Arellano-Bond test for AR(1) in first differences: z =  -2.24  Pr > z =  0.025
      
      Arellano-Bond test for AR(2) in first differences: z =   0.09  Pr > z =  0.925
      
      ------------------------------------------------------------------------------
      
      Sargan test of overid. restrictions: chi2(37)   = 327.16  Prob > chi2 =  0.000
      
       (Not robust, but not weakened by many instruments.)
      
      Hansen test of overid. restrictions: chi2(37)   = 657.41  Prob > chi2 =  0.000
      
       (Robust, but weakened by many instruments.)
      
      
      Difference-in-Hansen tests of exogeneity of instrument subsets:
      
       GMM instruments for levels
      
         Hansen test excluding group:     chi2(28)   = 298.82  Prob > chi2 =  0.000
      
         Difference (null H = exogenous): chi2(9)    = 358.59  Prob > chi2 =  0.000
      
       gmm(L.lngdp_pc, collapse lag(1 .))
      
         Hansen test excluding group:     chi2(27)   = 424.14  Prob > chi2 =  0.000
      
         Difference (null H = exogenous): chi2(10)   = 233.27  Prob > chi2 =  0.000
      
       iv(2004b.year 2005.year 2006.year 2007.year 2008.year 2009.year 2010.year 2011
      
      > .year 2012.year 2013.year 2014.year 2015.year, eq(level))
      
         Hansen test excluding group:     chi2(28)   = 528.81  Prob > chi2 =  0.000
      
         Difference (null H = exogenous): chi2(9)    = 128.60  Prob > chi2 =  0.000
      May I know if I was able to do it correctly? I noticed most of my regressors are insignificant and the diagnostic tests prove that my hypothesis should be rejected. Would you have any advice on how to improve the results of my runs?

      Again, thank you so much!



      Comment


      • #4
        I also tried conducting both one-step & two-step GMM, kindly see my regressions:

        Code:
        . xtabond2 fdi L.fdi elec lngdp_pc trade tax cr lnlaborprod L.lngfcf i.year, gmm
        
        > (L.(L.fdi)) iv(i.year, equation(level)) 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 robust weighting matrix for Hansen te
        
        > st.
        
         Difference-in-Sargan/Hansen statistics may be negative.
        
        
        Dynamic panel-data estimation, one-step system GMM
        
        ------------------------------------------------------------------------------
        
        Group variable: ctry                            Number of obs      =       778
        
        Time variable : year                            Number of groups   =        85
        
        Number of instruments = 54                      Obs per group: min =         4
        
        F(20, 84)     =      5.05                                      avg =      9.15
        
        Prob > F      =     0.000                                      max =        10
        
        ------------------------------------------------------------------------------
        
                    |               Robust
        
                fdi |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        
        -------------+----------------------------------------------------------------
        
                fdi |
        
                L1. |   .3482453   .2136625     1.63   0.107     -.076646    .7731367
        
                    |
        
               elec |  -6.25e+09   1.28e+10    -0.49   0.626    -3.16e+10    1.91e+10
        
           lngdp_pc |   2.17e+11   1.95e+11     1.11   0.268    -1.70e+11    6.04e+11
        
              trade |  -3.20e+08   6.93e+08    -0.46   0.645    -1.70e+09    1.06e+09
        
                tax |  -3.21e+09   3.76e+09    -0.85   0.396    -1.07e+10    4.26e+09
        
                 cr |  -2.50e+08   1.06e+10    -0.02   0.981    -2.14e+10    2.09e+10
        
        lnlaborprod |  -4.08e+11   3.03e+11    -1.35   0.182    -1.01e+12    1.95e+11
        
                    |
        
             lngfcf |
        
                L1. |   3.16e+10   2.66e+10     1.19   0.238    -2.13e+10    8.46e+10
        
                    |
        
               year |
        
              2004  |          0  (empty)
        
              2005  |   5.65e+10   1.26e+11     0.45   0.655    -1.94e+11    3.07e+11
        
              2006  |   5.08e+10   1.14e+11     0.45   0.657    -1.76e+11    2.78e+11
        
              2007  |   3.53e+10   8.93e+10     0.40   0.694    -1.42e+11    2.13e+11
        
              2008  |   3.09e+09   4.91e+10     0.06   0.950    -9.46e+10    1.01e+11
        
              2009  |  -5.67e+09   3.64e+10    -0.16   0.877    -7.81e+10    6.68e+10
        
              2010  |   6.74e+09   3.29e+10     0.20   0.838    -5.87e+10    7.22e+10
        
              2011  |   5.78e+09   1.96e+10     0.29   0.769    -3.32e+10    4.48e+10
        
              2012  |   3.40e+09   1.13e+10     0.30   0.764    -1.91e+10    2.59e+10
        
              2013  |  -5.79e+08   8.96e+09    -0.06   0.949    -1.84e+10    1.72e+10
        
              2014  |          0  (omitted)
        
              2015  |          0  (omitted)
        
                    |
        
              _cons |   1.82e+12   1.73e+12     1.05   0.296    -1.62e+12    5.25e+12
        
        ------------------------------------------------------------------------------
        
        Instruments for first differences equation
        
         GMM-type (missing=0, separate instruments for each period unless collapsed)
        
           L(1/11).L2.fdi
        
        Instruments for levels equation
        
         Standard
        
           2004b.year 2005.year 2006.year 2007.year 2008.year 2009.year 2010.year
        
           2011.year 2012.year 2013.year 2014.year 2015.year
        
           _cons
        
         GMM-type (missing=0, separate instruments for each period unless collapsed)
        
           D.L2.fdi
        
        ------------------------------------------------------------------------------
        
        Arellano-Bond test for AR(1) in first differences: z =  -1.77  Pr > z =  0.076
        
        Arellano-Bond test for AR(2) in first differences: z =   0.13  Pr > z =  0.897
        
        ------------------------------------------------------------------------------
        
        Sargan test of overid. restrictions: chi2(33)   = 274.45  Prob > chi2 =  0.000
        
         (Not robust, but not weakened by many instruments.)
        
        Hansen test of overid. restrictions: chi2(33)   = 345.59  Prob > chi2 =  0.000
        
         (Robust, but weakened by many instruments.)
        
        
        Difference-in-Hansen tests of exogeneity of instrument subsets:
        
         GMM instruments for levels
        
           Hansen test excluding group:     chi2(25)   = 232.91  Prob > chi2 =  0.000
        
           Difference (null H = exogenous): chi2(8)    = 112.68  Prob > chi2 =  0.000
        
         iv(2004b.year 2005.year 2006.year 2007.year 2008.year 2009.year 2010.year 2011
        
        > .year 2012.year 2013.year 2014.year 2015.year, eq(level))
        
           Hansen test excluding group:     chi2(24)   = 201.39  Prob > chi2 =  0.000
        
           Difference (null H = exogenous): chi2(9)    = 144.19  Prob > chi2 =  0.000
        Code:
        . xtabond2 fdi L.fdi elec lngdp_pc trade tax cr lnlaborprod L.lngfcf i.year, gmm
        
        > (L.(L.fdi)) iv(i.year, equation(level)) robust two 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: ctry                            Number of obs      =       778
        
        Time variable : year                            Number of groups   =        85
        
        Number of instruments = 54                      Obs per group: min =         4
        
        F(20, 84)     =      7.58                                      avg =      9.15
        
        Prob > F      =     0.000                                      max =        10
        
        ------------------------------------------------------------------------------
        
                    |              Corrected
        
                fdi |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        
        -------------+----------------------------------------------------------------
        
                fdi |
        
                L1. |   .3186533   .2637287     1.21   0.230    -.2058002    .8431068
        
                    |
        
               elec |  -6.89e+09   2.85e+09    -2.42   0.018    -1.26e+10   -1.22e+09
        
           lngdp_pc |          0  (omitted)
        
              trade |  -3.73e+08   2.02e+09    -0.18   0.854    -4.39e+09    3.65e+09
        
                tax |  -1.60e+09   4.07e+09    -0.39   0.696    -9.70e+09    6.50e+09
        
                 cr |   1.97e+09   4.87e+09     0.40   0.687    -7.72e+09    1.16e+10
        
        lnlaborprod |          0  (omitted)
        
                    |
        
             lngfcf |
        
                L1. |   4.32e+09   1.05e+10     0.41   0.682    -1.65e+10    2.52e+10
        
                    |
        
               year |
        
              2004  |          0  (empty)
        
              2005  |          0  (omitted)
        
              2006  |   2.82e+09   1.57e+10     0.18   0.858    -2.84e+10    3.41e+10
        
              2007  |   5.72e+09   2.95e+10     0.19   0.846    -5.28e+10    6.43e+10
        
              2008  |   7.37e+09   2.87e+10     0.26   0.798    -4.98e+10    6.45e+10
        
              2009  |  -9.91e+09   4.02e+10    -0.25   0.806    -8.98e+10    7.00e+10
        
              2010  |  -1.20e+10   1.42e+10    -0.84   0.402    -4.03e+10    1.63e+10
        
              2011  |  -4.64e+09   1.68e+10    -0.28   0.783    -3.81e+10    2.88e+10
        
              2012  |  -5.40e+09   1.55e+10    -0.35   0.728    -3.61e+10    2.54e+10
        
              2013  |          0  (omitted)
        
              2014  |   3.45e+09   5.84e+09     0.59   0.556    -8.16e+09    1.51e+10
        
              2015  |          0  (omitted)
        
                    |
        
              _cons |          0  (omitted)
        
        ------------------------------------------------------------------------------
        
        Instruments for first differences equation
        
         GMM-type (missing=0, separate instruments for each period unless collapsed)
        
           L(1/11).L2.fdi
        
        Instruments for levels equation
        
         Standard
        
           2004b.year 2005.year 2006.year 2007.year 2008.year 2009.year 2010.year
        
           2011.year 2012.year 2013.year 2014.year 2015.year
        
           _cons
        
         GMM-type (missing=0, separate instruments for each period unless collapsed)
        
           D.L2.fdi
        
        ------------------------------------------------------------------------------
        
        Arellano-Bond test for AR(1) in first differences: z =  -1.31  Pr > z =  0.192
        
        Arellano-Bond test for AR(2) in first differences: z =   0.15  Pr > z =  0.881
        
        ------------------------------------------------------------------------------
        
        Sargan test of overid. restrictions: chi2(33)   = 274.45  Prob > chi2 =  0.000
        
         (Not robust, but not weakened by many instruments.)
        
        Hansen test of overid. restrictions: chi2(33)   = 345.59  Prob > chi2 =  0.000
        
         (Robust, but weakened by many instruments.)
        
        
        Difference-in-Hansen tests of exogeneity of instrument subsets:
        
         GMM instruments for levels
        
           Hansen test excluding group:     chi2(25)   = 232.91  Prob > chi2 =  0.000
        
           Difference (null H = exogenous): chi2(8)    = 112.68  Prob > chi2 =  0.000
        
         iv(2004b.year 2005.year 2006.year 2007.year 2008.year 2009.year 2010.year 2011
        
        > .year 2012.year 2013.year 2014.year 2015.year, eq(level))
        
           Hansen test excluding group:     chi2(24)   = 201.39  Prob > chi2 =  0.000
        
           Difference (null H = exogenous): chi2(9)    = 144.19  Prob > chi2 =  0.000
        Would you have any recommendations/suggestions on how to go about our method?

        Thank you!

        Comment


        • #5
          /
          Last edited by Nikuo Tai; 27 Mar 2017, 22:40.

          Comment

          Working...
          X