<p>Suppose I have a regression of the form:
<span class="math-container">$$
Y_{it}=\beta X_{it}+\beta_{2}X_{it}\times D_{i}+\alpha_{i}+\epsilon_{it}
$$</span>
 In the above, we have information by country-year on <span class="math-container">$Y_{it}$</span> and
two regressors: <span class="math-container">$X_{it}$</span> and <span class="math-container">$D_{i}$</span>. <span class="math-container">$X_{it}$</span> is time varying,
but <span class="math-container">$D_{i}$</span> is fixed for each country over time. <span class="math-container">$\alpha_{i}$</span> measures
the country fixed effect. </p>

<p>My question is: can <span class="math-container">$\beta_{2}$</span> be identified?
As a fixed effects procedure uses only within-country variation, and
as <span class="math-container">$D_{i}$</span> does not vary over time, how is <span class="math-container">$\beta_{2}$</span> separately
identified from <span class="math-container">$\beta?$</span> I ran the regression and did find that
it was identified. Am I missing something?</p>

CC BY-SA 4.0
2019-03-03T19:40:51.837Z
They don't have the same values. For countries where  D=1, they are the same, but for countries where D=0, they are not.
ChinG
CC BY-SA 4.0
2019-03-03T20:03:31.140Z
Hi: It does seems identifiable to me intuitively. because the effect of $D_i$ is additive to the effect of X_it. The coefficient  on $X_{it}$ is either $\beta$ or $\beta + \beta_{2}$ depending the value of $D_{i}$ so yes, you can get estimates and the $\beta_2$ will representing the change in the slope of the regression line due to a country having a $D_i$ equal to 1. But let's not  trust me. Let's wait for another answer..
mark leeds
CC BY-SA 4.0
2019-03-04T18:50:16.597Z
I was thinking about this more and perhaps a clearer way to write the model is to use Dit except that Dit=Di for a given i and all t.. To me, this makes the identifiability of the model more straightforward.. –
mark leeds
CC BY-SA 4.0
2019-03-05T17:07:35.987Z
Hi @markleeds . Yes it will be identified if cross sectional variation. However, if the fixed effects is used, then only within country varition is used, and D does not change within country. So for countries where D=1, the two variables are exactly collinear, and for countries where D=0, the interaction term=0.
ChinG
CC BY-SA 4.0
2019-03-05T17:36:34.307Z
Hi ChinG: You wrote $\epsilon_{it}$ in the expression, but, for classical OLS ( which is I think you might mean by fixed effects ), $\epsilon_{it}$ might as well be $\epsilon_t$. A classical OLS regression won't know the difference so  the error term in your model represents the variation over the full sample. So, you do have variation in D_i but it's variation between countries rather than within.  If that's not what you want, then I think there's a different model required along the lines of a mixed model. That's not my thing so I  hope for another more insightful comment or solution.
mark leeds
CC BY-SA 4.0
2019-03-05T17:42:48.207Z
Not that I can say more anyway, but, out of curiousity, what language and call  are you using to estimate that model. R has the lmer4 package ( and other one whose name I forget ) for mixed models but I've never dealt with it.
mark leeds
CC BY-SA 4.0
2019-03-05T22:35:25.413Z
also, if you use R and are not already using it, check out the systemfit package. It's quite powerful for the type of thing I think you're looking for, although I'm not certain. I don't think you want the lm  call in R is my point.
mark leeds
CC BY-SA 4.0
2019-03-05T23:25:30.300Z
Did more research and it seems to  be that the use of the term "fixed effects" is referring to a systems model type of fit, so I mis-understood. So I take back everything I said and my apologies for noise. I checked and, if you define it that way and use systemfit in R, it will choke. So, yes, I think it's not identifiable.
mark leeds
CC BY-SA 4.0
2019-03-06T17:10:18.233Z
Just a heads up to future R-econometrics readers of this thread that it can also be done using A) factors in the call to lm or B) plm package. So many, many implementation methods available. See link here for more details.  https://www.princeton.edu/~otorres/Panel101R.pdf
mark leeds
<paneldata>
Fixed Effects: Identifying coefficient for interaction term with a constant
ChinG
# Fixed Effects: Identifying coefficient for interaction term with a constant

(Asked by: username_0 on 2019-03-03)

Suppose I have a regression of the form:
$$
Y\_{it}=\beta X\_{it}+\beta\_{2}X\_{it}\times D\_{i}+\alpha\_{i}+\epsilon\_{it}
$$
In the above, we have information by country-year on $Y\_{it}$ and
two regressors: $X\_{it}$ and $D\_{i}$. $X\_{it}$ is time varying,
but $D\_{i}$ is fixed for each country over time. $\alpha\_{i}$ measures
the country fixed effect.

My question is: can $\beta\_{2}$ be identified?
As a fixed effects procedure uses only within-country variation, and
as $D\_{i}$ does not vary over time, how is $\beta\_{2}$ separately
identified from $\beta?$ I ran the regression and did find that
it was identified. Am I missing something?

**Tags:** paneldata
> **Comments:**
> **username_0**: They don't have the same values. For countries where  D=1, they are the same, but for countries where D=0, they are not.  
> **username_1**: Hi: It does seems identifiable to me intuitively. because the effect of $D_i$ is additive to the effect of X_it. The coefficient  on $X_{it}$ is either $\beta$ or $\beta + \beta_{2}$ depending the value of $D_{i}$ so yes, you can get estimates and the $\beta_2$ will representing the change in the slope of the regression line due to a country having a $D_i$ equal to 1. But let's not  trust me. Let's wait for another answer..  
> **username_1**: I was thinking about this more and perhaps a clearer way to write the model is to use Dit except that Dit=Di for a given i and all t.. To me, this makes the identifiability of the model more straightforward.. –  
> **username_0**: Hi @markleeds . Yes it will be identified if cross sectional variation. However, if the fixed effects is used, then only within country varition is used, and D does not change within country. So for countries where D=1, the two variables are exactly collinear, and for countries where D=0, the interaction term=0.  
> **username_1**: Hi ChinG: You wrote $\epsilon_{it}$ in the expression, but, for classical OLS ( which is I think you might mean by fixed effects ), $\epsilon_{it}$ might as well be $\epsilon_t$. A classical OLS regression won't know the difference so  the error term in your model represents the variation over the full sample. So, you do have variation in D_i but it's variation between countries rather than within.  If that's not what you want, then I think there's a different model required along the lines of a mixed model. That's not my thing so I  hope for another more insightful comment or solution.  
> **username_1**: Not that I can say more anyway, but, out of curiousity, what language and call  are you using to estimate that model. R has the lmer4 package ( and other one whose name I forget ) for mixed models but I've never dealt with it.  
> **username_1**: also, if you use R and are not already using it, check out the systemfit package. It's quite powerful for the type of thing I think you're looking for, although I'm not certain. I don't think you want the lm  call in R is my point.  
> **username_1**: Did more research and it seems to  be that the use of the term "fixed effects" is referring to a systems model type of fit, so I mis-understood. So I take back everything I said and my apologies for noise. I checked and, if you define it that way and use systemfit in R, it will choke. So, yes, I think it's not identifiable.  
> **username_1**: Just a heads up to future R-econometrics readers of this thread that it can also be done using A) factors in the call to lm or B) plm package. So many, many implementation methods available. See link here for more details.  https://www.princeton.edu/~otorres/Panel101R.pdf  

---

## 0 answers

