Announcement

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

  • xtabond2: two way clustering-dynamic panel

    Hello all.
    For my master thesis I am trying analyse what are the determinants of Non Performing Loans on a sample of banks taken from the Bankscope database.
    I have decide to to use both difference GMM and system GMM with the xtabond2. I still have try to use the command since I am making some preliminary consideration and then decide how tu run the model.

    My dependent variable is the percentage of NPLs at individual bank's level. As regressor I have the lagged dependent variables plus other individual bank variable and some macroeconomic variables for each country, that are equal for all bank's in a given country (such as the GDP growth)

    As I have read from Roodman's paper, one of the key assumption of both estimators is that the errors are not correlated among individuals in the panel. However, given that we are talking about banks, "individuals" that by their very nature are widely interconnected, I think that this assumption is not reliable.

    Given the variables included into the regression, I am thinkg about a two-way clustering, at individual level (bank_id) and country level (ISO). When I will run this regression, I will only consider country for which I have AT LEAST 5 banks.

    1)Is the two-clustering a correct way to proceed?
    2) How can I implement two-way clustering in the xtabond2 syntax? (I am using Stata 14)



  • #2
    Any SUggestion?

    Comment


    • #3
      I believe that the best way to do this is to use the gmm option within ivreghdfe. See https://github.com/sergiocorreia/ivreghdfe for installation instructions and documentation.

      Comment


      • #4
        Hi, Antonio, Please see the examples in the help of (ssc install) xtabond2, e.g.,
        Code:
        use http://www.stata-press.com/data/r7/abdata.dta, clear
        ivreg2 n cap (w = k ys rec) [pw=_n], cluster(id year) orthog(rec)
        xtabond2 n w cap [pw=_n], iv(cap k ys, eq(level)) iv(rec, eq(level)) cluster(id year) h(1)
        Ho-Chuan (River) Huang
        Stata 19.0, MP(4)

        Comment


        • #5
          Code:
          xtdpdgmm L(0/1).npl  gdp l.avg_roa l.cap_ad l.cw, model(fod) collapse twostep gmm(npl, lag( 2 4))  ///
          > gmm(l.avg_roa, lag(2 4)) gmm(gdp, lag (0 2)) gmm(l.cap_ad, lag(2 4)) nocons  gmm(l.cw, lag(1 3))  ///
          vce(r) nofootnote 
          
          Generalized method of moments estimation
          
          Fitting full model:
          Step 1         f(b) =   .0134212
          Step 2         f(b) =  .06552015
          
          Group variable: bank_id                      Number of obs         =      1202
          Time variable: year                          Number of groups      =       124
          
          Moment conditions:     linear =      15      Obs per group:    min =         2
                              nonlinear =       0                        avg =  9.693548
                                  total =      15                        max =        11
          
                                        (Std. Err. adjusted for 124 clusters in bank_id)
          ------------------------------------------------------------------------------
                       |              WC-Robust
                   npl |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
                   npl |
                   L1. |   .8959096   .0479667    18.68   0.000     .8018966    .9899226
                       |
                   gdp |  -.0251397   .0070996    -3.54   0.000    -.0390546   -.0112247
                       |
               avg_roa |
                   L1. |  -.0952828   .0452509    -2.11   0.035    -.1839728   -.0065927
                       |
                cap_ad |
                   L1. |  -.0369772   .0087481    -4.23   0.000    -.0541232   -.0198311
                       |
                    cw |
                   L1. |   .0091486   .0042538     2.15   0.032     .0008112    .0174859
          ------------------------------------------------------------------------------
          
          . 
          . estat ser, ar(1/3)
          
          Arellano-Bond test for autocorrelation of the first-differenced residuals
          H0: no autocorrelation of order 1:     z =   -4.1316   Prob > |z|  =    0.0000
          H0: no autocorrelation of order 2:     z =   -0.5999   Prob > |z|  =    0.5486
          H0: no autocorrelation of order 3:     z =    1.1248   Prob > |z|  =    0.2607
          
          . estat overid 
          
          Sargan-Hansen test of the overidentifying restrictions
          H0: overidentifying restrictions are valid
          
          2-step moment functions, 2-step weighting matrix       chi2(10)    =    8.1245
                                                                 Prob > chi2 =    0.6167
          
          2-step moment functions, 3-step weighting matrix       chi2(10)    =    8.2303
                                                                 Prob > chi2 =    0.6064
          
          . 
          . xtabond2 L(0/1).npl gdp l.avg_roa l.cap_ad l.cw, noleveleq twostep orthogonal ///
          > gmm(npl l.avg_roa l.cap_ad, lag(2 4) collapse) gmm(l.cw, lag(1 3) collapse) ///
          > gmm(gdp, lag(0 2) collapse) cluster(bank_id) robust small nodiffsargan
          Favoring speed over space. To switch, type or click on mata: mata set matafavor space, perm.
          
          Dynamic panel-data estimation, two-step difference GMM
          ------------------------------------------------------------------------------
          Group variable: bank_id                         Number of obs      =      1078
          Time variable : year                            Number of groups   =       124
          Number of instruments = 15                      Obs per group: min =         1
          F(5, 124)     =    100.40                                      avg =      8.69
          Prob > F      =     0.000                                      max =        10
                                          (Std. Err. adjusted for clustering on bank_id)
          ------------------------------------------------------------------------------
                       |              Corrected
                   npl |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
                   npl |
                   L1. |   .8625673    .055654    15.50   0.000     .7524124    .9727222
                       |
                   gdp |  -.0273336   .0068125    -4.01   0.000    -.0408175   -.0138497
                       |
               avg_roa |
                   L1. |  -.0327565   .0321317    -1.02   0.310    -.0963542    .0308412
                       |
                cap_ad |
                   L1. |  -.0446552   .0083086    -5.37   0.000    -.0611003   -.0282101
                       |
                    cw |
                   L1. |   .0006349   .0014361     0.44   0.659    -.0022076    .0034774
          ------------------------------------------------------------------------------
          Instruments for orthogonal deviations equation
            GMM-type (missing=0, separate instruments for each period unless collapsed)
              L(0/2).gdp collapsed
              L(1/3).L.cw collapsed
              L(2/4).(npl L.avg_roa L.cap_ad) collapsed
          ------------------------------------------------------------------------------
          Arellano-Bond test for AR(1) in first differences: z =  -4.23  Pr > z =  0.000
          Arellano-Bond test for AR(2) in first differences: z =  -0.30  Pr > z =  0.764
          ------------------------------------------------------------------------------
          Sargan test of overid. restrictions: chi2(10)   =  18.23  Prob > chi2 =  0.051
            (Not robust, but not weakened by many instruments.)
          Hansen test of overid. restrictions: chi2(10)   =  14.14  Prob > chi2 =  0.167
            (Robust, but weakened by many instruments.)
          
          
          . 
          . 
          . 
          . 
          . 
          . xtabond2 L(0/1).npl gdp l.avg_roa l.cap_ad l.cw, noleveleq twostep orthogonal ///
          > gmm(npl l.avg_roa l.cap_ad, lag(2 4) collapse) gmm(l.cw, lag(1 3) collapse) ///
          > gmm(gdp, lag(0 2) collapse) cluster(bank_id ISO) robust small nodiffsargan
          Favoring speed over space. To switch, type or click on mata: mata set matafavor space, perm.
          
          Dynamic panel-data estimation, two-step difference GMM
          ------------------------------------------------------------------------------
          Group variable: bank_id                         Number of obs      =      1078
          Time variable : year                            Number of groups   =       124
          Number of instruments = 15                      Obs per group: min =         1
          F(5, 18)      =     84.94                                      avg =      8.69
          Prob > F      =     0.000                                      max =        10
                                      (Std. Err. adjusted for clustering on bank_id ISO)
          ------------------------------------------------------------------------------
                       |              Corrected
                   npl |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
                   npl |
                   L1. |   .8785734   .1017221     8.64   0.000     .6648631    1.092284
                       |
                   gdp |  -.0293904   .0095084    -3.09   0.006    -.0493667    -.009414
                       |
               avg_roa |
                   L1. |  -.0539805   .0445712    -1.21   0.242    -.1476211    .0396601
                       |
                cap_ad |
                   L1. |  -.0395886   .0093966    -4.21   0.001    -.0593301   -.0198471
                       |
                    cw |
                   L1. |   .0005479   .0012399     0.44   0.664    -.0020571    .0031529
          ------------------------------------------------------------------------------
          Instruments for orthogonal deviations equation
            GMM-type (missing=0, separate instruments for each period unless collapsed)
              L(0/2).gdp collapsed
              L(1/3).L.cw collapsed
              L(2/4).(npl L.avg_roa L.cap_ad) collapsed
          ------------------------------------------------------------------------------
          Arellano-Bond test for AR(1) in first differences: z =  -3.73  Pr > z =  0.000
          Arellano-Bond test for AR(2) in first differences: z =  -0.44  Pr > z =  0.659
          ------------------------------------------------------------------------------
          Sargan test of overid. restrictions: chi2(10)   =  18.23  Prob > chi2 =  0.051
            (Not robust, but not weakened by many instruments.)
          Hansen test of overid. restrictions: chi2(10)   =  10.42  Prob > chi2 =  0.405
            (Robust, but weakened by many instruments.)
          These are my results, I don't understand why I have different results for what I think is the same model (the first two, one with xtdpdgmm the othe with xtabond2).
          Also, in some cases, when I do two-way clustering the p-value of the Hansen statistics becomes 1!

          Comment


          • #6
            Assuming that banks are nested within countries, there is no need for two-way clustering. You would just cluster at the country level (assuming you have sufficiently many countries).

            The output differs because there is a bug in xtabond2 when used with forward-orthogonal deviations. Please see slides 70 and 71 of my 2019 London Stata Conference presentation.
            https://www.kripfganz.de/stata/

            Comment


            • #7
              Hi Sebastian,

              Adding the option "cluster(ISO)" changes the coefficients and the Hansen statistics of my results. I believe it should not be the case as we are just adjusting the standard errors. Can you please help?

              Thanks,
              Hyejin

              Comment


              • #8
                Hi Sebastian,

                Adding the option "cluster(ISO)" changes the coefficients and the Hansen statistics of my results. I believe it should not be the case as we are just adjusting the standard errors. Can you please help?

                Thanks,
                Hyejin

                Comment

                Working...
                X