Hi, I'm doing panel regressions with growth rates but I want to try to visualise my problem with the invest2 dataset included in Stata.
I'm doing panel regressions (time/years: 1-20) in the form "xtgls invest market i.time, panels (hetero) corr(ar1)". I also want to look at different subperiods e.g. 1-10 and 11-20 and formal test whether e.g. the effect (beta_market) is significantly different between the two subperiods. If I understand correctly (from past statalist posts) I can do this by doing another regression for the full period (1-20) with an added subperiods dummy (0 for 1-10, 1 for 11-20) interaction term: "xtgls invest c.market##i.dummy i.time, panels(hetero) corr(ar1)". And then (if I understand correctly) if the beta for the interaction variable "c.market#i.dummy" (beta_dummy#c.market1 in output) is significant I can conclude that the beta from the subperiod 1-10 regression is different from the beta of the subperiod 11-20 regression.
The Stata commands for the example:
use
http://www.stata-press.com/data/r12/invest2.dta
gen dummy = 0 if inrange(time,1,20)
replace dummy = 1 if inrange(time,11,20)
xtset company time
xtgls invest c.market##i.dummy i.time, panels(hetero) corr(ar1)
xtgls invest market i.time if inrange(time, 1, 10), panels (hetero) corr(ar1)
xtgls invest market i.time if inrange(time, 11, 20), panels (hetero) corr(ar1)
In this case I would conclude that:
for subperiod 1-10 b_market = 0.0825664 is significant at 1% and
for subperiod 11-20 b_market=0.1122994 is significant at 1% and/but
because beta_dummy#c.market1 is not significant (p-value=0.323) the difference in the slopes is not significant.
(Is this a correct interpretation?)
Another problem I have is, I also discovered that "beta_market + beta_dummy#c.market1" from: "xtgls invest c.market##i.dummy i.time, panels(hetero) corr(ar1)" is not equal to beta_market from the subperiod 11-20 regression: "xtgls invest market i.time if inrange(time, 11, 20), panels (hetero) corr(ar1)", although it is equal when i do all regressions without the options: "panels (hetero) corr(ar1)". But - in the first case with both options used - which betas for the two subperiods would i choose/write about im my study? The two seperate betas from "xtgls invest market i.time if inrange(time, 1, 10), panels(hetero) corr(ar1)" and "xtgls invest market i.time if inrange(time, 11, 20), panels(hetero) corr(ar1)" or (if i want to also conclude whether there is a significant difference for the two subperiod betas) only the two resulting (but in comparison to the separate subperiod regressions slightly different) betas (beta_market and beta_market + beta_dummy#c.market1) from "xtgls invest c.market##i.dummy i.time, panels(heteroskedastic) corr(ar1)"? Thank you for your help!
The Stata commands I used for the second problem:
use
http://www.stata-press.com/data/r12/invest2.dta
gen dummy = 0 if inrange(time,1,20)
replace dummy = 1 if inrange(time,11,20)
xtset company time
xtgls invest c.market##i.dummy i.time, panels(hetero) corr(ar1)
xtgls invest market i.time if inrange(time, 1, 10), panels (hetero) corr(ar1)
xtgls invest market i.time if inrange(time, 11, 20), panels (hetero) corr(ar1)
di 0.0985778+0.0202642
// is not equal to beta_market from "xtgls invest market i.time if inrange(time, 11, 20), panels (hetero) corr(ar1)"
//same regressions without controlling for panels(hetero) corr(ar1):
xtgls invest c.market##i.dummy i.time
xtgls invest market i.time if inrange(time, 1, 10)
xtgls invest market i.time if inrange(time, 11, 20)
di 0.1060946+0.0858159
// is equal to beta_market from "xtgls invest market i.time if inrange(time, 11, 20)"