Let's say I have panel data for the period 2000-2009 and I run a pre-post OLS regression analysis where the pre-period is 2000-2004 and the post-period 2005-2009. Does it make sense to use year*period fixed effects? Or in other words, does it make sense to control for heterogeneity across years WITHIN the pre- and the post-period, respectively? What are reasons not to do this?


The question is a bit vague to me but if I understand correctly you want to estimate something like $$y_{it} = \alpha + \delta \text{post}_t + \sum^T_{t=1}\gamma_t \text{year}_t + \sum^T_{t=1}\psi_t (\text{year}_t \cdot \text{post}_t) + \epsilon_{it}$$

where $\text{post}_t$ is the post period indicator, $\text{year}_t$ are the year dummies from 2001 to 2009, and then you have their interaction. This won't work because the $(\text{year}_t \cdot \text{post}_t)$ interaction will be perfectly collinear with the year dummies.

If you regress instead $$y_{it} = \alpha + \delta \text{post}_t + \sum^T_{t=1}\psi_t (\text{year}_t \cdot \text{post}_t) + \epsilon_{it}$$ this won't be any good either because you make the assumption that the time effect is linear in the first period and then is allowed to change by year in the post period.

To illustrate these two examples with Stata code:

// use an example data set from the web
webuse nlswork

// generate the post period indicator and year dummies
gen post = (year>=78)
qui tab year, gen(dyear)

// generate the post*year_dummy interactions
forval i = 1(1)15 {
     gen dyear`i'_post = dyear`i'*post

// regression with year dummies and post*year_dummy interactions
reg ln_wage post i.year dyear2_post- dyear15_post

// regression with post*year_dummy interactions
reg ln_wage post dyear2_post- dyear15_post

The inclusion of year dummies already quite flexibly controls for year fixed effects. Unless you are interested in a difference in differences type setting (for which you also need two groups besides the two periods), using a post period dummy does not change anything.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.