Announcement

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

  • Using slope dummy to test for significant effect difference between subperiods (compact version)

    Dear all,

    I had posted my question before but the post was very long so I want to write it in a more compact form. I'm interested in testing whether beta_market in my gls-panel-regression (for 20 periods) significantly differs between the subperiods 1-10 and 11-20. I have done 3 xtgls regressions without & 3 with the options panels(heteroskedastic) corr(ar1).
    In the first case (colums 1-3) I got b_market = 0.106 for the period 1-10 and b_market = 0.192 for the period 11-20, regardless if I look at the subperiods regressions (column 2-3) or the full pooled regression (1). Also - because beta_1.dummy#c is significant - i would conclude, that the subperiod beats are significantly different.
    This is not the case when i do the same 3 regressions with the options panels(heteroskedastic) corr(ar1)(column 3-6). Here the market betas depend on whether I look only at the pooled regression in column 4 or the subperiod regressions in column 5 and 6. So my question is: to which market betas the insignificant beta_1.dummy#c in column 4 refers, the ones resulting in column 4 -> 0.099 and 0.099 + 0.020 or the ones resulting from column 5 and 6-> 0.083 and 0.112.

    I tried to copy the table as CODE, but it looked very bad (in the preview) so I added a screenshot of the table.

    Code:
    . use http://www.stata-press.com/data/r12/invest2.dta
    
    . xtset company time
           panel variable:  company (strongly balanced)
            time variable:  time, 1 to 20
                    delta:  1 unit
    
    . 
    . gen dummy = 0 if inrange(time,1,20)
    
    . 
    . replace dummy = 1 if inrange(time,11,20)
    (50 real changes made)
    
    . 
    . quiet xtgls invest c.market##i.dummy i.time
    
    . 
    . estimates store full_wo_opt
    
    . 
    . quiet xtgls invest market i.time if inrange(time, 1, 10)
    
    . 
    . estimates store firstperiod_wo_opt
    
    . 
    . quiet xtgls invest market i.time if inrange(time, 11, 20)
    
    . 
    . estimates store secondperiod_wo_opt
    
    . 
    . quiet xtgls invest c.market##i.dummy i.time, panels(heteroskedastic) corr(ar1)
    
    . 
    . estimates store full_w_opt
    
    . 
    . quiet xtgls invest market i.time if inrange(time, 1, 10), panels(heteroskedastic) corr(ar1)
    
    . 
    . estimates store firstperiod_w_opt
    
    . 
    . quiet xtgls invest market i.time if inrange(time, 11, 20), panels(heteroskedastic) corr(ar1)
    
    . 
    . estimates store secondperiod_w_opt
    
    . 
    . estout full_wo_opt firstperiod_wo_opt secondperiod_wo_opt full_w_opt firstperiod_w_opt secondperiod_w_opt, cells(b(star fmt(3)) se(par fmt(2)))

    Attached Files

  • #2
    You didn't get a quick answer. As you appear to know, you'll increase your chances of a helpful answer if you follow the FAQ on asking questions: provide Stata code in code delimiters, readable Stata output (not screen shots), and sample data using dataex. Your question is still extremely long - can you generate the problem with all these variables and stuff? Why do we need to know about your estout or all your time dummies?

    You can test parameter equality across time periods several ways. It can be done in one regression by interacting a period dummy with the iv's. Then the standard tests work. xtgls, coefl will show you how to refer to the coefficients. It can be done with suest although I don't know if it works with xtgls. And it might be feasible with Hausman.

    Comment


    • #3
      Hello Phil,
      thank you for the answer. I try to simplify my question regarding the test of significant difference in the slopes (market variable) between two subperiods of the panel sample. E.g. if one does a "full period/pooled" regression (time: 1 to 20) and the two subperiod regressions (time: 1 to 10 and 11 to 20) in the following way:

      Code:
      use http://www.stata-press.com/data/r12/invest2.dta
      xtset company time
      gen dummy = 0 if inrange(time, 1, 20)
      replace dummy = 1 if inrange(time, 11,20)
      xtreg invest c.market##i.dummy, fe
      xtreg invest market if inrange(time,1,10), fe
      xtreg invest market if inrange(time,11,20), fe

      one can see that the main effect (market) (unlike Richard Williams describes here https://www3.nd.edu/~rwilliam/stats2/l51.pdf on p.12-13) differs between the result in the first full regression and the following first subperiod regression (.1091382 vs. .0669044). Because of this I assume that the significance of the interaction term (dummy#c.market1) refers only to the difference between the two coefficients resulting in the full regression and not the two coefficients from the separate subperiods regression?
      But the even bigger question for me here is actually which two subperiod market coefficients (1 to 10 and 11-20) are the "valid" ones, the two resulting from the full regression or the ones resulting from the separate subperiods regressions?

      Code:
      . use http://www.stata-press.com/data/r12/invest2.dta
      
      . xtset company time
             panel variable:  company (strongly balanced)
              time variable:  time, 1 to 20
                      delta:  1 unit
      
      . 
      . gen dummy = 0 if inrange(time, 1, 20)
      
      . 
      . replace dummy = 1 if inrange(time, 11,20)
      (50 real changes made)
      
      . 
      . xtreg invest c.market##i.dummy, fe
      
      Fixed-effects (within) regression               Number of obs      =       100
      Group variable: company                         Number of groups   =         5
      
      R-sq:  within  = 0.6745                         Obs per group: min =        20
             between = 0.8101                                        avg =      20.0
             overall = 0.7673                                        max =        20
      
                                                      F(3,92)            =     63.55
      corr(u_i, Xb)  = -0.0903                        Prob > F           =    0.0000
      
      --------------------------------------------------------------------------------
              invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      ---------------+----------------------------------------------------------------
              market |   .1091382   .0210614     5.18   0.000     .0673084    .1509681
             1.dummy |  -64.42433   30.02253    -2.15   0.035    -124.0517   -4.797003
                     |
      dummy#c.market |
                  1  |   .0917689   .0126907     7.23   0.000     .0665642    .1169737
                     |
               _cons |  -20.26988   40.87467    -0.50   0.621    -101.4505    60.91075
      ---------------+----------------------------------------------------------------
             sigma_u |  108.19548
             sigma_e |  88.731323
                 rho |  .59788329   (fraction of variance due to u_i)
      --------------------------------------------------------------------------------
      F test that all u_i=0:     F(4, 92) =    29.47               Prob > F = 0.0000
      
      . 
      . xtreg invest market if inrange(time,1,10), fe
      
      Fixed-effects (within) regression               Number of obs      =        50
      Group variable: company                         Number of groups   =         5
      
      R-sq:  within  = 0.2387                         Obs per group: min =        10
             between = 0.7370                                        avg =      10.0
             overall = 0.6683                                        max =        10
      
                                                      F(1,44)            =     13.79
      corr(u_i, Xb)  = 0.5082                         Prob > F           =    0.0006
      
      ------------------------------------------------------------------------------
            invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
            market |   .0669044   .0180144     3.71   0.001     .0305987    .1032102
             _cons |   57.73661   34.18043     1.69   0.098    -11.14951    126.6227
      -------------+----------------------------------------------------------------
           sigma_u |  110.07211
           sigma_e |  55.322106
               rho |  .79833594   (fraction of variance due to u_i)
      ------------------------------------------------------------------------------
      F test that all u_i=0:     F(4, 44) =    29.36               Prob > F = 0.0000
      
      . 
      . xtreg invest market if inrange(time,11,20), fe
      
      Fixed-effects (within) regression               Number of obs      =        50
      Group variable: company                         Number of groups   =         5
      
      R-sq:  within  = 0.5526                         Obs per group: min =        10
             between = 0.8488                                        avg =      10.0
             overall = 0.7754                                        max =        10
      
                                                      F(1,44)            =     54.35
      corr(u_i, Xb)  = -0.5346                        Prob > F           =    0.0000
      
      ------------------------------------------------------------------------------
            invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
            market |   .2422549   .0328613     7.37   0.000     .1760274    .3084825
             _cons |  -167.2835   67.43967    -2.48   0.017    -303.1992   -31.36776
      -------------+----------------------------------------------------------------
           sigma_u |  148.59661
           sigma_e |  109.48815
               rho |  .64813193   (fraction of variance due to u_i)
      ------------------------------------------------------------------------------
      F test that all u_i=0:     F(4, 44) =    13.16               Prob > F = 0.0000
      
      . 

      Comment

      Working...
      X