Say I have a dataset that is uniquely identified by country and year. Then, I run a fixed effects regression with country and year fixed effects. How do I interpret the result of the regression coefficient? Surely I cannot say that it is the average correlation of X on Y controlling for countries and years, because each country and each year uniquely identify my observations!
And yet commands such as areg
in STATA claim that they are able to do just that. Perhaps I am misunderstanding something. Somebody please help.
1 Answer
The expected value in your model is
$$E[y_i \vert x_i,c_i,t]=\beta \times x_i + \gamma_{ci}+ \eta_t $$
You can think of the $\gamma_{ci}$ as a country-specific intercept that does not vary across time. It captures all the time-invariant factors for each country (like longitude). $\eta_t$ is a time effect that is constant across countries but is not time-invariant (like oil prices). These two effects will shift the y-x curve up or down, leaving the slope with respect to $x$ alone.
The interpretation of $\beta$ is the change in the expected value of $y_i$ associated with a 1 unit increase in $x_i$. In this case, it is the same for all countries and time periods. It's the marginal effect of $x$ adjusting for differences in time-invariant characteristics across countries and for time effects that impact all countries in the same way.
-
$\begingroup$ Thanks dimitriy. Hard to know where cross-validated would be without you. $\endgroup$– DaycentCommented Jan 27, 2022 at 17:42
webuse pig, clear reg weight i.id i.week reg weight i.id##i.week
$\endgroup$