Announcement

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

  • Test estimated coefficient stability over time

    Hi everyone,

    Firstly, I run the two following models.
    Code:
    xtreg lev tan1 ebit1 size1 if d_bank== 1, fe vce(cluster id)
    xtreg lev tan1 ebit1 size1 if d_bank== 0, fe vce(cluster id)
    Secondly, I calculate predicted leverage (lev) of BANK and non-BANK by multiplying estimated coefficients by mean of each independent variables. I will use predicted leverage for my analyses.

    One of my reviewers said: they use fixed coefficient parameters from leverage regressions to calculate predicted leverage and then apply them for their analyses. The authors might consider estimate time-varying coefficient parameters.

    My questions are:
    - How can I test whether my coefficients are time-variant?
    - If my coefficients are time-variant, how can I estimate time-varying coefficient parameters?

    I would really appreciate all the help I can get.

    Best regards
    --------------------
    (Stata 15.1 MP)

  • #2
    The tests for coefficients' stability are roughly separated in
    i) Chow tests, where the structural break point is assumed to be known
    ii) Quandt test and their modern offsprings where the break point is assumed to be unknown.

    Read this article by Bruce Hansen for an accessible introduction on tests for structural stability:

    Hansen, Bruce E. "The new econometrics of structural change: dating breaks in US labour productivity." Journal of Economic perspectives 15, no. 4 (2001): 117-128.

    Comment


    • #3
      Hi Joro, thanks for your information.

      Hansen provides Gauss and Matlab programs which I don't know how to use. Do you have any Stata codes of these tests?

      And do you know whether these test work on a panel data?
      Last edited by Linh Nguyen; 10 Dec 2018, 07:22.
      --------------------
      (Stata 15.1 MP)

      Comment


      • #4
        I see no reason why these tests cannot be applied to panel data.

        Chow test is very easy, no need for special program.

        Say I am regressing

        xtreg y x, fe

        over years 2000 to 2018. I suspect that there was a structural break in the coefficient on x in year 2010 and after.

        I generate a dummy

        gen after2010 = year>=2010

        and then I regress

        xtreg y x after2010 after2010*x, fe

        test after2010 after2010*x

        If the test rejects, then I have a structural break in the constant and the slope parameter. Distribution of the test statistic is standard, everything is normal.

        The Quandt family of tests are similar, but you need to repeat the test for each and every suspected break point. Say if the suspected break points are all years between 2003 and 2015, then I repeat the above Chow procedure for each and every year. Then I take the maximum of the F or Wald test statistics over the set of years.

        The problem with the Quandt test here is that the distribution of Max F is not standard. If I were to do this, I would simply use bootstrap to establish the null distribution of the statistic, like I did in
        Kolev, Gueorgui I., and Rasa Karapandza. "Out-of-sample equity premium predictability and sample split–invariant inference." Journal of Banking & Finance 84 (2017): 188-201.

        (the reference is not entirely useful for your panel data context, I am just tossing it in to show that these things are doable, they are not overly complicated).





        Comment


        • #5
          Hi Joro,

          This is my code and results

          HTML Code:
          . // Chow test: Assuming that there was a structural break in coefficients in year 1939 (WW II)
          . webuse grunfeld, clear
          . mark prewar_years if year < 1939
          . foreach var of varlist mvalue kstock{
               gen pre_`var' = prewar_years*`var'
               }
          
          . xtreg invest mvalue kstock pre* , fe
          
          Fixed-effects (within) regression               Number of obs     =        200
          Group variable: company                         Number of groups  =         10
          
          R-sq:                                           Obs per group:
               within  = 0.7919                                         min =         20
               between = 0.8247                                         avg =       20.0
               overall = 0.8155                                         max =         20
          
                                                          F(5,185)          =     140.81
          corr(u_i, Xb)  = -0.1973                        Prob > F          =     0.0000
          
          ------------------------------------------------------------------------------
                invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
                mvalue |   .1212653   .0116824    10.38   0.000     .0982174    .1443132
                kstock |   .2973909   .0189875    15.66   0.000     .2599309    .3348508
          prewar_years |   41.61573   14.65261     2.84   0.005     12.70804    70.52343
            pre_mvalue |  -.0313951   .0073579    -4.27   0.000    -.0459113   -.0168789
            pre_kstock |   .0477195   .1032902     0.46   0.645    -.1560586    .2514976
                 _cons |  -70.26626   12.40839    -5.66   0.000     -94.7464   -45.78612
          -------------+----------------------------------------------------------------
               sigma_u |  85.346247
               sigma_e |  50.244224
                   rho |  .74262208   (fraction of variance due to u_i)
          ------------------------------------------------------------------------------
          F test that all u_i=0: F(9, 185) = 52.22                     Prob > F = 0.0000
          
          . testparm pre*
          
           ( 1)  prewar_years = 0
           ( 2)  pre_mvalue = 0
           ( 3)  pre_kstock = 0
          
                 F(  3,   185) =    7.45
                      Prob > F =    0.0001
          
          . 
          . // The Quandt family of tests: Assuming that there was a structural break in years 1939 1940
          . * 1939
          . webuse grunfeld, clear
          . mark prewar_years if year < 1939
          . mark war_years if year > 1938
          . 
          . foreach var of varlist mvalue kstock{
               gen pre_`var' = prewar_years*`var'
               }
          .   
          . foreach var of varlist mvalue kstock{
               gen war_`var' = war_years*`var'
               }
          . 
          . xtreg invest mvalue kstock pre* war* , fe  vce(bootstrap)
          note: war_years omitted because of collinearity
          note: war_mvalue omitted because of collinearity
          note: war_kstock omitted because of collinearity
          (running xtreg on estimation sample)
          
          Bootstrap replications (50)
          ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
          ..................................................    50
          
          Fixed-effects (within) regression               Number of obs     =        200
          Group variable: company                         Number of groups  =         10
          
          R-sq:                                           Obs per group:
               within  = 0.7919                                         min =         20
               between = 0.8247                                         avg =       20.0
               overall = 0.8155                                         max =         20
          
                                                          Wald chi2(5)      =     109.31
          corr(u_i, Xb)  = -0.1973                        Prob > chi2       =     0.0000
          
                                          (Replications based on 10 clusters in company)
          ------------------------------------------------------------------------------
                       |   Observed   Bootstrap                         Normal-based
                invest |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
                mvalue |   .1212653   .0214886     5.64   0.000     .0791484    .1633822
                kstock |   .2973909   .0708302     4.20   0.000     .1585662    .4362156
          prewar_years |   41.61573   23.25335     1.79   0.074    -3.959984    87.19145
            pre_mvalue |  -.0313951   .0079311    -3.96   0.000    -.0469397   -.0158505
            pre_kstock |   .0477195   .1615917     0.30   0.768    -.2689944    .3644334
             war_years |          0  (omitted)
            war_mvalue |          0  (omitted)
            war_kstock |          0  (omitted)
                 _cons |  -70.26626   35.44124    -1.98   0.047    -139.7298   -.8027153
          -------------+----------------------------------------------------------------
               sigma_u |  85.346247
               sigma_e |  50.244224
                   rho |  .74262208   (fraction of variance due to u_i)
          ------------------------------------------------------------------------------
          
          . testparm pre* war*
           ( 1)  prewar_years = 0
           ( 2)  pre_mvalue = 0
           ( 3)  pre_kstock = 0
          
                     chi2(  3) =   21.89
                   Prob > chi2 =    0.0001
          
          . 
          . * 1940
          . webuse grunfeld, clear
          . mark prewar_years if year < 1940
          . mark war_years if year > 1939
           
          . foreach var of varlist mvalue kstock{
               gen pre_`var' = prewar_years*`var'
               }
          .   
          . foreach var of varlist mvalue kstock{
               gen war_`var' = war_years*`var'
               }
          . 
          . xtreg invest mvalue kstock pre* war* , fe  vce(bootstrap)
          note: war_years omitted because of collinearity
          note: war_mvalue omitted because of collinearity
          note: war_kstock omitted because of collinearity
          (running xtreg on estimation sample)
          
          Bootstrap replications (50)
          ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
          ..................................................    50
          
          Fixed-effects (within) regression               Number of obs     =        200
          Group variable: company                         Number of groups  =         10
          
          R-sq:                                           Obs per group:
               within  = 0.8088                                         min =         20
               between = 0.8335                                         avg =       20.0
               overall = 0.8263                                         max =         20
          
                                                          Wald chi2(5)      =     106.88
          corr(u_i, Xb)  = -0.1971                        Prob > chi2       =     0.0000
          
                                          (Replications based on 10 clusters in company)
          ------------------------------------------------------------------------------
                       |   Observed   Bootstrap                         Normal-based
                invest |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
                mvalue |    .129179   .0197874     6.53   0.000     .0903964    .1679616
                kstock |   .2717813   .0582996     4.66   0.000     .1575162    .3860464
          prewar_years |   48.60227   22.63586     2.15   0.032       4.2368    92.96775
            pre_mvalue |  -.0404927    .011734    -3.45   0.001    -.0634909   -.0174945
            pre_kstock |  -.0730218   .1777294    -0.41   0.681    -.4213651    .2753214
             war_years |          0  (omitted)
            war_mvalue |          0  (omitted)
            war_kstock |          0  (omitted)
                 _cons |  -68.72996   32.31637    -2.13   0.033    -132.0689   -5.391047
          -------------+----------------------------------------------------------------
               sigma_u |  83.171778
               sigma_e |  48.167649
                   rho |  .74884109   (fraction of variance due to u_i)
          ------------------------------------------------------------------------------
          
          
          
          . testparm pre* war*
           ( 1)  prewar_years = 0
           ( 2)  pre_mvalue = 0
           ( 3)  pre_kstock = 0
          
                     chi2(  3) =   21.14
                   Prob > chi2 =    0.0001
          . 
          end of do-file
          I have two questions:
          - Following Chow test, I have a structural break in panel. Should I split our sample and run two regressions?
          - Following Quandt test, Wald chi2(5) = 109.31 for the year of 1939 and Wald chi2(5) = 106.88 for 1940. Should I split my sample in the year of 1939?
          --------------------
          (Stata 15.1 MP)

          Comment


          • #6
            Hi Linh,

            What you have done for the Chow test is correct. I would say that based on your test outcome, yes, you should split the sample and run and report two separate regressions for the two subsamples.

            The idea of the Chow test is that you choose the break year to be tested based on prior knowledge, say you know that the war started in 1939, so then you test 1939 for a break point (not 1940, not 1941, etc. based on your prior knowledge of when the war started you know that either there is a break in 1939, or there is no break).

            Hence you should split the sample at year 1939.

            Your execution of the Quandt tests is all wrong, starting from

            Code:
             
             . // The Quandt family of tests: Assuming that there was a structural break in years 1939 1940
            what follows is wrong.

            The referee does not ask you explicitly for Quandt tests with unknown break point. Do not go there if you do not have to. I argued before that doing Quandt tests is doable, but what I meant is that if you put a couple of months of work, you can do it. I did not mean that it is doable in 15min.

            Comment


            • #7
              Thank you so much Joro.
              --------------------
              (Stata 15.1 MP)

              Comment


              • #8
                Hi everyone,

                Following this thread (https://www.statalist.org/forums/for...ith-panel-data), Chow tests may not apply to a panel-data.

                I test this statement by using the following example:

                HTML Code:
                webuse grunfeld, clear
                 mark prewar_years if year < 1937
                
                foreach var of varlist mvalue kstock {
                        gen pre_`var' = prewar_years*`var'
                        }
                
                . xtreg invest mvalue kstock pre* , fe
                
                Fixed-effects (within) regression               Number of obs     =        200
                Group variable: company                         Number of groups  =         10
                
                R-sq:                                           Obs per group:
                     within  = 0.7785                                         min =         20
                     between = 0.8142                                         avg =       20.0
                     overall = 0.8046                                         max =         20
                
                                                                F(5,185)          =     130.08
                corr(u_i, Xb)  = -0.1701                        Prob > F          =     0.0000
                
                ------------------------------------------------------------------------------
                      invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                -------------+----------------------------------------------------------------
                      mvalue |   .1110953   .0117678     9.44   0.000      .087879    .1343116
                      kstock |    .319237   .0181144    17.62   0.000     .2834996    .3549744
                prewar_years |   25.13938   20.87353     1.20   0.230    -16.04137    66.32014
                  pre_mvalue |  -.0113949   .0108107    -1.05   0.293     -.032723    .0099331
                  pre_kstock |   .2439368   .1826352     1.34   0.183    -.1163787    .6042523
                       _cons |   -65.4871   12.78814    -5.12   0.000    -90.71643   -40.25778
                -------------+----------------------------------------------------------------
                     sigma_u |  87.288795
                     sigma_e |   51.83278
                         rho |  .73931256   (fraction of variance due to u_i)
                ------------------------------------------------------------------------------
                F test that all u_i=0: F(9, 185) = 50.95                     Prob > F = 0.0000
                
                . testparm pre*
                
                 ( 1)  prewar_years = 0
                 ( 2)  pre_mvalue = 0
                 ( 3)  pre_kstock = 0
                
                       F(  3,   185) =    3.28
                            Prob > F =    0.0221
                
                
                // I replace the year of 1937 with 1938, 1939, 1940, 1950, 1951, 1952, F- tests are as follow:
                
                // 1938:
                       F(  3,   185) =    6.72
                            Prob > F =    0.0002
                
                // 1939
                       F(  3,   185) =    7.45
                            Prob > F =    0.0001
                
                // 1940
                        F(  3,   185) =   13.54
                            Prob > F =    0.0000
                
                // 1950
                       F(  3,   185) =    9.21
                            Prob > F =    0.0000
                
                // 1951
                       F(  3,   185) =   10.19
                            Prob > F =    0.0000
                
                // 1952
                      F(  3,   185) =   13.46
                            Prob > F =    0.0000
                These tests indicate that there are many break years.

                Is there anyone who knows any paper that test structual break in panel data?

                Best.
                --------------------
                (Stata 15.1 MP)

                Comment

                Working...
                X