Hi everyone,
I am working with a panel data IV regression using ivregress. My objective is to split the sample into two periods (pre-2008 and post-2008) to examine the structural break and compare the coefficients between these sub-samples.
Initially, I ran the regressions separately for each sub-sample. Then, to formally test the differences in coefficients, I attempted to replicate these results using a fully interacted model (interacting the regressors and instruments with a post2008 dummy).
However, my specification requires the inclusion of year fixed effects. Here is the simplified logic of my code:
As expected, in the fully interacted model, Stata drops one of the year fixed effects (in addition to the base year) to resolve perfect collinearity with the post2008 dummy. However, I observed that the coefficients for the variables of interest match those obtained from the separate split-sample regressions. Given that my primary goal is to compare the slopes between the two periods, is this interaction approach considered methodologically correct despite the collinearity issue with the year fixed effects?
Thank you!
I am working with a panel data IV regression using ivregress. My objective is to split the sample into two periods (pre-2008 and post-2008) to examine the structural break and compare the coefficients between these sub-samples.
Initially, I ran the regressions separately for each sub-sample. Then, to formally test the differences in coefficients, I attempted to replicate these results using a fully interacted model (interacting the regressors and instruments with a post2008 dummy).
However, my specification requires the inclusion of year fixed effects. Here is the simplified logic of my code:
Code:
ivregress 2sls y x i.year (z=a b), cluster(id) // Full sample ivregress 2sls y x i.year if year > 2008 (z=a b), cluster(id) // Post-2008 ivregress 2sls y x i.year if year < 2008 (z=a b), cluster(id) // Pre-2008 gen zpost2008 = z * post2008 gen apost2008 = a * post2008 gen bpost2008 = b * post2008 ivregress 2sls y c.x##i.post2008 i.year (z zpost2008 = a b apost2008 bpost2008), cluster(id)
Thank you!

Comment