Fixed Effects Model

Econometrics
Introduced by
Mundlak (1978); Nerlove (1971); classical panel econometrics
Year
1971–1978
Type
Panel regression estimator
Family
Econometrics / time series

What does it do?

The fixed effects (FE) model is a standard estimator for panel data when unobserved unit-specific characteristics may be correlated with the regressors.

It gives each entity its own intercept, so the slope coefficients are identified only from changes within entities over time. Under strict exogeneity, stable unmeasured differences between units, such as institutional or cultural traits, cannot bias the estimated effects of the time-varying regressors.

The intuition behind the method

Imagine tracking 50 countries over 20 years and trying to estimate the effect of trade openness on GDP growth. Each country has its own culture, geography, and institutions that affect growth but are hard to measure. The fixed effects model assigns each country its own intercept, so each country is compared with its own past values. The estimates are driven by changes within a country, so unmeasured but stable country-level traits cannot be mistaken for the effect of trade. A pooled regression that ignores country identity would instead attribute between-country differences to trade.

History

Mundlak (1978), 'On the pooling of time series and cross section data' (Econometrica), is a formal treatment of pooling time-series and cross-section data, which is the panel setting this page addresses. Textbook treatments such as Using Econometrics: A Practical Guide (7th ed., p. 484) present the choice between fixed and random effects as a question of whether the unit-specific intercepts are correlated with the regressors, and they describe the Hausman test as a method many researchers use for this purpose.

When to use it

Use fixed effects when the panel contains entity-specific unobserved heterogeneity that may be correlated with the regressors, for example country culture, firm management quality, or individual ability. It is a common default in observational panel studies where stable confounders are a concern. A significant Hausman statistic favours FE over random effects. Do not use FE when the key regressor is time-invariant, such as gender or country of birth, because it is collinear with the entity effects and its coefficient cannot be identified. If the strict exogeneity assumption holds and the entity effects are uncorrelated with the regressors, random effects is more efficient. FE also does not apply to pure cross-sectional data, where there is no within-unit variation.

Limitations and considerations

  • Time-invariant regressors (gender, country, legal origin) are perfectly collinear with the entity dummies and drop out of the model, so their effects cannot be estimated.
  • When the exogeneity assumption holds, the model discards between-unit variation and is less efficient than random effects.
  • Within variation is limited when each entity has few time periods, so the estimates can be imprecise for short panels.
  • It does not address endogeneity from time-varying omitted variables or reverse causality; instrumental variables or dynamic panel methods are then needed.
  • In non-linear FE models such as the fixed-effects logit, the incidental parameters problem can bias the coefficients when the number of time periods is small.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Removes bias from time-constant unobserved confounders without requiring them to be measured or specified.
  • Gives consistent estimates of the slope coefficients when the entity effects are correlated with the regressors, which pooled OLS and standard random effects do not guarantee.
  • Implementable as demeaned OLS or as least squares with entity dummies (LSDV), so results can be reproduced with standard regression software.
  • Compares each unit only with its own history, so within-unit estimates are less exposed to between-unit confounding than cross-sectional comparisons.

Applications

  • Estimating the effect of labor market policies (e.g., minimum wage laws) on employment using state-level panel data, controlling for unobserved state characteristics.
  • Identifying the impact of firm-level investment in R&D on productivity growth, holding firm fixed effects constant across years.
  • Assessing how changes in exchange rates affect export volumes for a panel of countries, absorbing stable country-specific trade patterns.
  • Education research: estimating the effect of class size on student achievement using school-level panels, controlling for school quality factors.
  • Health economics: measuring how healthcare spending per capita affects population health outcomes across OECD countries over time.
  • Finance: analysing whether board composition changes within firms affect firm performance, exploiting within-firm variation.

How it works

How it works

1

The model posits that entity i at time t has outcome y determined by observed time-varying covariates X, a unit-specific intercept alpha_i capturing all stable unobserved heterogeneity, and an idiosyncratic error. The key assumption is strict exogeneity: the error is uncorrelated with X in all time periods, not only the current one.

Formula
y_{it} = \alpha_i + X_{it}\beta + \varepsilon_{it}
2

The within transformation subtracts each entity's time mean from both sides of the equation. Because the entity effect alpha_i is constant over time, it cancels exactly. The demeaned variables, denoted with double dots, contain only within-unit variation.

Formula
(y_{it} - \bar{y}_i) = (X_{it} - \bar{X}_i)\beta + (\varepsilon_{it} - \bar{\varepsilon}_i)
3

OLS applied to the demeaned system gives the within estimator. Under strict exogeneity it is consistent even when alpha_i is arbitrarily correlated with the regressors, because those effects have been removed. The estimator uses only variation within entities over time to identify beta.

Formula
\hat{\beta}_{FE} = \left(\sum_i \ddot{X}_i^{\top}\ddot{X}_i\right)^{-1}\sum_i \ddot{X}_i^{\top}\ddot{y}_i
4

To choose between fixed and random effects, the Hausman statistic compares the two coefficient vectors, scaled by the difference in their variance matrices. The null hypothesis is that the entity effects are uncorrelated with the regressors. Under this null both estimators are consistent but random effects is efficient, and the statistic is asymptotically chi-squared distributed with k degrees of freedom, where k is the number of time-varying coefficients being compared. A large statistic with a small p-value indicates that the random effects assumption is doubtful, and FE is preferred. In finite samples the difference in variance matrices may fail to be positive definite, in which case the test result should be interpreted with caution.

Formula
H = (\hat{\beta}_{FE}-\hat{\beta}_{RE})^{\top}\left[\text{Var}(\hat{\beta}_{FE})-\text{Var}(\hat{\beta}_{RE})\right]^{-1}(\hat{\beta}_{FE}-\hat{\beta}_{RE})

Common pitfalls

  • Including a time-invariant variable (e.g., a country's colonial history) in an FE model: the entity dummies absorb it and it returns no coefficient.
  • Skipping the Hausman test and defaulting to random effects when entity heterogeneity may be correlated with the regressors, which can bias the estimates.
  • Adding two-way FE (entity and time effects) by default without checking whether the time effects matter; unnecessary time dummies reduce degrees of freedom.
  • Clustering standard errors at the wrong level. Errors are often serially correlated within units, so clustering by entity is common practice, and failing to cluster can understate standard errors.
  • Reading the within R-squared, which is computed on demeaned data, as the overall fit of the model; it can be low even when the model describes the data well.

Frequently asked questions

What is the difference between fixed effects and random effects?

Fixed effects treats each entity's intercept as a parameter to be estimated, with no assumption about its relationship to the regressors. Random effects treats entity intercepts as random draws that are uncorrelated with the regressors. This is a stronger assumption but yields more efficient estimates when it holds. The Hausman test is the standard diagnostic for choosing between them.

Can I estimate the effect of a time-invariant variable with a fixed effects model?

No. Time-invariant variables such as gender, country of origin, or legal system are perfectly collinear with the entity fixed effects and cannot be separately identified. If these variables are of interest, random effects can estimate their coefficients, but only under its assumption that the entity effects are uncorrelated with the regressors.

Does fixed effects solve all endogeneity problems?

Only endogeneity arising from time-constant unobserved heterogeneity. Time-varying omitted variables, reverse causality, or measurement error in regressors are not addressed by FE. Instrumental variables or dynamic panel GMM estimators (Arellano-Bond) are needed in those situations.

Should I always cluster standard errors in a fixed effects model?

In most panel applications, clustering by entity is common practice, because errors are often serially correlated within units over time. Failing to cluster can understate standard errors and produce misleadingly small p-values.

What is two-way fixed effects?

Two-way fixed effects includes both entity fixed effects, which control for time-constant unit characteristics, and time fixed effects, which control for period-specific shocks common to all units, such as a global financial crisis. It is appropriate when both sources of heterogeneity are plausible confounders.

Related methods

Sources

  1. Baltagi, B. H. (2021). Econometric Analysis of Panel Data (6th ed.). Springer.

    ISBN: 978-3030538002
  2. Mundlak, Y. (1978). On the pooling of time series and cross section data. Econometrica, 46(1), 69–85.

    Open DOI reference
  3. Using Econometrics: A Practical Guide (7th Edition), p. 484