Fixed effects estimation

Overview
In econometrics and statistics the fixed effects estimator (also known as the within estimator) is an estimator for the coefficients in panel data analysis. If we assume fixed effects, we impose time independent effects for each individual.

Qualitative description
Such models assist in controlling for unobserved heterogeneity, when this heterogeneity is constant over time: typically the ethnicity, the year and location of birth are heterogeneous variables a fixed effect model can control for. This constant heterogeneity is the fixed effect for this individual. This constant can be removed from the data, for example by subtracting each individual's means from each of his observations before estimating the model.

A random effects model makes the additional assumption that the individual effects are randomly distributed. It is thus not the opposite of a fixed effects model, but a special case. If the random effects assumption holds, the random effects model is more efficient than the fixed effects model. However, if this additional assumption does not hold (ie, if the Hausman test fails), the random effects model is not consistent.

Quantitative description
Formally the model is


 * $$y_{it}=x_{it}\beta+\alpha_{i}+u_{it},$$

where $$y_{it}$$ is the dependent variable observed for individual i at time t, $$\beta$$ is the vector of coefficients, $$x_{it}$$ is a vector of regressors, $$\alpha_{i}$$ is the individual effect and $$u_{it}$$ is the error term.

and the estimator is


 * $$\widehat{\beta}=\left(\sum_{i,t}^{I}\widehat{x_{it}}'\widehat{x_{it}} \right)^{-1}\left(\sum_{i,t}^{I}\widehat{x_{it}}'\widehat{y_{it}} \right),$$

where $$\widehat{x_{it}}=x_{it}-\bar{x_{it}}$$ is the demeaned regressor, and $$\widehat{y_{it}}=y_{it}-\bar{y_{it}}$$ is the demeaned dependent variable.