For whatever reason I am struggling to understand how to model the following scenario. Suppose that I have a panel data set covering some arbitrary number of individuals over the period 2000-2020. Moreover suppose that there exists some economic relationship that can be modelled as follows:

$$ y_{it}=\beta x_{it}+\mu_i+\eta_t+\epsilon_{it} $$

So far so good. However, let's assume that in 2010 some event happens in the country of interest, and we have reasons to suspect that the economic relationship changes in the above equation. That is for the period 2000-2010, $\ \beta_{2000-2010}=50$, and, after the event, in the years 2011-2020 it takes a different value say $\ \beta_{2011-2020}=75$. How would I model this change?

One solution could be to run two different regressions for each time interval. This is a simple solution.

However, my question is: is it possible to to see this change using a dummy interaction term that takes the value $\ 0$ in the period 2000-2010 and $\ 1$ in the period 2011-2020? So something like this?:

$$ y_{it}=D_t\beta x_{it}+\beta x_{it}+\mu_i+\eta_t+\epsilon_{it} $$

My suspicion is that it will lead to multicollinearity, but for some reason, I am just a little confused. Obviously, I could get what I want by running two separate regression, but is there a way to do it in one? Any help would be appreciated!


1 Answer 1


I presume that $\mu_i$ are supposed to be individual-dependent offsets and $\eta_t$ time-dependent offsets.

You could run two separate regressions, but using the dummy variable (in interaction terms) and thus fitting one formula for both situations would result in $\mu_i$ being the same for both intervals; when running two separate regressions, you would end up with two different $\mu_i$ per individual i. This might or might not be what you want.

Here is what the formula would look like in R:

y ~ d:x + mu + eta

Here, y is your response variable, d the binary dummy you suggested (you must use a factor here), x your x-covariate, and mu and eta your corresponding individual- and time-dependent offsets.

And you don't have to worry about collinearity here.

  • $\begingroup$ I thought that this could work. However, I have a bit worry that it will eliminate the marginal effect of the first period completely. In the first time interval the dummy will equal 0, meaning that I will be left just with the offsets without a marginal effect of my covariate (in the hypothetical example it was equal to 50). Or am I misunderstanding something? $\endgroup$ Jul 25, 2022 at 11:12
  • $\begingroup$ Don't worry: If you make d a factor, then R will correctly handle this, independent of the actual label (0 or 1) you use (you could also call them red and blue). You can check with the model.matrix() function, that R creates two columns: one column d0:x which contains all the x values in the rows where d is zero (all other rows of d0:x are zero) and a column d1:x which contains all the x values in the rows where d is one (all other rows of d1:x are zero). $\endgroup$
    – frank
    Jul 25, 2022 at 11:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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