- Introduced by
- Mundlak (1978); classical treatment in Wooldridge (2010) and Baltagi (2021)
- Year
- 1978
- Type
- Panel regression estimator
- Family
- Econometrics / time series
What does it do?
The panel fixed effects (FE) model removes time-invariant, unit-specific unobserved heterogeneity by giving each unit its own intercept, which the within transformation then eliminates.
Under strict exogeneity of the time-varying regressors, it yields consistent estimates of their effects even when these unit-level characteristics are correlated with the regressors. It does not correct for time-varying confounders, which remain a source of bias.
The intuition behind the method
Suppose you track 50 firms over 10 years and want to know how investment responds to revenue. Each firm has its own culture, governance quality, or founding history that you cannot measure. The fixed effects model handles this by asking: for each firm, how does investment move relative to that firm's own average when revenue shifts? By comparing each unit only to itself across time, the unobserved but constant firm characteristics cancel out entirely, leaving a cleaner estimate of the within-firm revenue effect.
History
The fixed effects (within) approach is classical. It is treated in detail in Wooldridge (2010) and Baltagi (2021), the standard references for the model and its estimation.
When to use it
Choose the panel FE model when you have repeated observations on the same units (individuals, firms, countries) and suspect that stable unit characteristics you cannot measure are correlated with your regressors; the Hausman test is one formal check on that suspicion. FE is the usual choice when omitted stable confounders are the main concern and the question concerns time-varying regressors. Do not use it to estimate effects of time-invariant regressors, such as gender or country, because the within transformation removes all their variation; a random-effects or hybrid estimator is needed for those. FE is also a poor fit for short panels that include a lagged dependent variable, where Nickell bias arises, and difference or system GMM are preferred in that setting.
Limitations and considerations
- Time-invariant variables, such as gender or country, are absorbed by the unit effects, and their coefficients cannot be identified.
- With a lagged dependent variable and a short time dimension, the within estimator is biased (Nickell bias, of order 1/T), so its coefficients should not be read at face value in that case. The bias can remain sizeable even at moderate T; Judson and Owen (1999) found it could reach as much as 20 percent of the true coefficient at T equal to 30.
- Requires within-unit variation in the regressors over time; a regressor that barely changes within units yields imprecise FE estimates.
- The unit intercepts are nuisance parameters that are removed rather than estimated. When T is short, the individual effects themselves cannot be estimated consistently (the incidental-parameters problem), so they should not be interpreted as precise quantities.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Removes all time-invariant unit-level unobserved heterogeneity, including characteristics correlated with the regressors, which is the main source of omitted-variable bias the model targets.
- Requires strict exogeneity of the regressors with respect to the idiosyncratic errors. It does not require the unit effects to be uncorrelated with the regressors, unlike pooled OLS and random effects.
- Coefficients on time-varying regressors are estimated from within-unit variation alone, so they are not contaminated by stable differences between units.
- Simple to compute: the within transformation reduces estimation to OLS on demeaned data, as the fe-estimator formula shows.
- The Hausman test gives a formal, data-based check for choosing FE over RE.
Applications
- Estimating the causal effect of corporate investment on firm value while controlling for stable firm culture or governance quality.
- Assessing the impact of trade policy changes on country-level exports, holding constant fixed geographic and institutional characteristics.
- Evaluating the effect of minimum wage legislation on employment using state-level panel data, with state fixed effects absorbing cross-state economic differences.
- Analysing how individual earnings respond to job training, controlling for stable individual ability that is unobserved.
- Measuring the effect of environmental regulations on industry output, netting out industry-specific constants such as technology and resource endowments.
- Studying the relationship between public health expenditure and health outcomes across countries while absorbing fixed cross-national differences.
How it works
How it works
The baseline model posits that outcome y for unit i at time t is driven by a unit-specific intercept (fixed effect) alpha_i, observed time-varying regressors X_it, and an idiosyncratic error. The fixed effect absorbs all stable unobserved characteristics of the unit.
Formula
y_{it} = \alpha_i + X_{it}\beta + \varepsilon_{it}The within (demeaning) transformation subtracts each unit's time average from every observation. This operation eliminates alpha_i entirely because the unit mean of alpha_i equals alpha_i itself, leaving only time variation within each unit. Because the stable unit heterogeneity is removed, it cannot bias the within estimates.
Formula
\tilde{y}_{it} = y_{it} - \bar{y}_{i}, \quad \tilde{X}_{it} = X_{it} - \bar{X}_{i}OLS applied to the demeaned data yields the within estimator beta_FE. It is unbiased when strict exogeneity holds, meaning the regressors are uncorrelated with the idiosyncratic errors in all time periods. Contemporaneous exogeneity alone is not enough, because errors from other periods can feed back into the regressors. The estimator requires linearity in parameters and full column rank of the within-transformed regressors, so each regressor must vary over time within units. Time-invariant regressors have no within-transformed variation and cannot be estimated.
Formula
\hat{\beta}_{FE} = \left(\sum_i \tilde{X}_i^{\top}\tilde{X}_i\right)^{-1}\sum_i \tilde{X}_i^{\top}\tilde{y}_iThe Hausman specification test compares the FE and random effects (RE) estimates using the quadratic form shown, which is chi-squared distributed with k degrees of freedom under the null. The test is valid only when the variance difference is positive definite and RE is consistent and efficient under the null. A statistically significant statistic rejects the null that the unit effects are uncorrelated with the regressors. In that case FE is consistent while RE is not, so FE is the appropriate choice.
Formula
H = (\hat{\beta}_{FE}-\hat{\beta}_{RE})^{\top}[\widehat{\text{Var}}(\hat{\beta}_{FE})-\widehat{\text{Var}}(\hat{\beta}_{RE})]^{-1}(\hat{\beta}_{FE}-\hat{\beta}_{RE}) \sim \chi^2(k)Common pitfalls
- Including a lagged dependent variable in a short panel and estimating it by within OLS without correcting for Nickell bias. Dynamic specifications call for Arellano-Bond first-difference GMM or Blundell-Bond system GMM instead.
- Choosing FE by default rather than checking with the Hausman test. When unit effects are uncorrelated with the regressors, RE is more efficient, and the test is the standard way to check this.
- Including unit effects but omitting time effects. Common shocks that hit all units in the same period can leave serial correlation or spurious trends in the residuals; time effects or trends address this.
- Using conventional standard errors that ignore within-unit serial correlation. Cluster standard errors at the unit level, and consider clustering by time as well (two-way clustering) when a common time structure is expected.
- Treating FE as a remedy for all endogeneity. It removes time-invariant confounders only; time-varying confounders and reverse causality remain, and the within transformation does not address them.
Frequently asked questions
What is the difference between the fixed effects model and pooled OLS on panel data?
Pooled OLS ignores the panel structure and treats all observations as independent; it is biased when unit-level unobserved heterogeneity is correlated with the regressors. The FE model explicitly allows for such correlation by giving each unit its own intercept, eliminating this bias.
How do I decide between fixed effects and random effects?
Run the Hausman test. If it rejects the null (p < 0.05), the unit effects are correlated with the regressors, FE is consistent while RE is not, and FE should be used. If it does not reject, this does not prove that RE is valid, and the test has limited power in finite samples. RE may be more efficient, but choose it only when theory supports the assumption that unit effects are uncorrelated with the regressors, and report robust standard errors.
Can I include time dummies together with unit fixed effects?
Yes. Adding time fixed effects (two-way FE) controls for time-period shocks that affect all units simultaneously, such as global recessions or regulatory changes. This is strongly recommended in macroeconomic or policy-evaluation panels to avoid attributing common time trends to your regressors.
My regressor of interest barely varies within units. Is FE still appropriate?
FE identifies effects only from within-unit variation, so a regressor with little temporal variation will yield very imprecise estimates even in a large panel. Consider reporting both FE and RE results, or use a Mundlak random-effects specification that partially exploits between-unit variation while still controlling for correlation between unit effects and regressors.
How do I handle a dynamic panel model with the lagged dependent variable and FE?
Naive FE with a lagged dependent variable introduces Nickell bias, which is of order 1/T. The bias can remain sizeable even at moderate T; one Monte Carlo study (Judson and Owen, 1999) found it could reach about 20 percent of the true coefficient at T equal to 30. For dynamic specifications, use the Arellano-Bond first-difference GMM or the Blundell-Bond system GMM instead, which instrument the lagged dependent variable with its own lags to achieve consistent estimation.
Related methods
Sources
Wooldridge, J. M. (2010). Econometric Analysis of Cross Section and Panel Data (2nd ed.). MIT Press.
ISBN: 978-0262232586Baltagi, B. H. (2021). Econometric Analysis of Panel Data (6th ed.). Springer.
ISBN: 978-3030534875