- Introduced by
- Manuel Arellano
- Year
- 1987
- Type
- Panel regression with robust inference
- Family
- Econometrics / time series
What does it do?
The robust fixed effects model estimates a panel regression with unit fixed effects using the within-group estimator, and reports standard errors that allow for heteroscedasticity and arbitrary correlation of errors within each cross-sectional unit.
The cluster-robust variance for within-groups estimators is commonly attributed to Arellano (1987). It is widely used in applied economics and the social sciences when observations within the same unit are not independent over time.
The intuition behind the method
The fixed effects estimator removes time-invariant unit characteristics by demeaning within each individual, isolating within-unit variation to estimate within-unit effects. However, economic panel data routinely exhibit errors that are correlated over time within the same unit and have non-constant variance. These features violate standard assumptions and can make ordinary standard errors too small. Robust standard errors correct this by letting the data show how variable the estimates actually are, without imposing any rigid structure on the error covariance, so that hypothesis tests and confidence intervals remain reliable in large samples even when residuals are messy.
History
The within-group (fixed effects) estimator is a long-standing method in panel econometrics. The cluster-robust variance for within-groups estimators is commonly attributed to Arellano (1987). Wooldridge (2010) provides a standard textbook treatment of panel methods.
When to use it
Use this model when your data form a panel, with several observations for each unit over time, and you want to estimate how time-varying regressors relate to the outcome while removing unit characteristics that are constant over time and unobserved. It is a common choice when a Hausman test favours fixed over random effects, or when the within-unit correlation of errors is unknown and cannot be modelled credibly. Do not rely on standard cluster-robust errors when the number of units is small, because the variance estimator becomes unreliable; in that case consider a small-sample correction such as a wild cluster bootstrap or a CR2 adjustment, or bootstrapped standard errors. Driscoll-Kraay standard errors address a different problem, dependence across units in long panels. If unit effects are plausibly uncorrelated with the regressors and the sample is large, random effects GLS is more efficient. The model cannot estimate coefficients on regressors that do not vary within units.
Limitations and considerations
- The within transformation removes every regressor that is constant within units, so effects of characteristics such as sex, race, or country of origin cannot be estimated.
- With few clusters, cluster-robust standard errors understate sampling uncertainty and can produce spurious rejections. The number of clusters at which this becomes a problem depends on the design and should be checked.
- In short panels, demeaning leaves little within-unit variation. With two periods per unit, each unit contributes effectively one first difference, so precision falls sharply.
- Time-varying confounders correlated with both the regressor and the outcome are not removed; instrumental variables or a difference-in-differences design with a parallel trends assumption are needed for that problem.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Removes time-invariant unobserved unit characteristics through the within transformation, so the slope estimates do not require those characteristics to be measured or modelled.
- Slope estimates remain consistent when unit effects are correlated with the regressors, under strict exogeneity of the idiosyncratic errors. This is the main contrast with random effects.
- Cluster-robust standard errors allow arbitrary correlation of errors within each unit and heteroscedasticity without specifying the error covariance structure, and their justification is asymptotic in the number of units.
- Coefficients describe within-unit association between time-varying regressors and the outcome. A causal reading also requires that the remaining time-varying variation is unrelated to the errors, so the research design, not the estimator alone, carries the identifying argument.
Applications
- Estimating the effect of minimum wage laws on employment using state-level panel data, controlling for persistent state characteristics.
- Assessing how corporate governance changes affect firm profitability in a firm-year panel, with standard errors clustered by firm.
- Studying the effect of trade liberalisation on productivity using country-industry panels, with inference allowing for within-country serial correlation.
- Political economy research on how legislative changes affect policy outcomes across districts observed over several terms.
- Health economics panels examining how changes in insurance coverage affect healthcare use within individuals over time.
How it works
How it works
Each variable is demeaned within its unit, ÿ_it = y_it − ȳ_i, which removes all unit-level components that do not change over time. This within (demeaning) transformation is what eliminates unobserved unit-level heterogeneity from the estimation.
Formula
\ddot{y}_{it} = \ddot{x}_{it}\beta + \ddot{\varepsilon}_{it}The fixed effects (within) estimator regresses demeaned outcomes on demeaned regressors. Under strict exogeneity of the idiosyncratic errors, it is consistent for β even when unobserved unit effects are correlated with the regressors, which the random effects estimator does not guarantee.
Formula
\hat{\beta}_{FE} = \left(\sum_i \ddot{X}_i^{\top}\ddot{X}_i\right)^{-1}\sum_i \ddot{X}_i^{\top}\ddot{y}_iThe covariance matrix of β̂_FE is a sandwich estimator, V̂ = B̂⁻¹Φ̂B̂⁻¹, where B̂ = Σ_i Ẍ_i'Ẍ_i is the bread. The form does not require the error covariance to be specified, and in large-sample terms it remains valid under within-unit error correlation and heteroscedasticity. The expression shown is the uncorrected asymptotic cluster sandwich. Software typically multiplies it by a small-sample factor, so reported standard errors can differ slightly from the bare formula.
Formula
\hat{V}_{robust} = \hat{B}^{-1}\hat{\Phi}\hat{B}^{-1}The meat Φ̂ sums, over units, the outer products of each unit's score contributions. Because each unit enters as a single block, arbitrary correlation of errors over time within a unit is allowed. This is the cluster-robust correction associated with Arellano (1987).
Formula
\hat{\Phi} = \sum_{i=1}^{N}\ddot{X}_i^{\top}\hat{\varepsilon}_i\hat{\varepsilon}_i^{\top}\ddot{X}_iCoefficient t-tests use the coefficient divided by its cluster-robust standard error, and joint F-tests use the cluster-robust covariance matrix. Degrees of freedom are usually based on the number of clusters, G − 1, rather than NT − k. Software often applies a finite-sample scaling factor to the cluster-robust covariance matrix; the exact factor differs across packages, so the documentation of the software in use should be checked. When G is small, a small-sample method such as the wild cluster bootstrap or CR2 is advisable, since the asymptotic approximation is then poor.
Common pitfalls
- Using heteroscedasticity-only robust errors (HC1 or HC3) without clustering by unit. These ignore within-unit serial correlation and can be too small in panels.
- Reading fixed effects coefficients as causal when treatment assignment is correlated with time-varying unobservables, not only with the time-invariant ones that the model removes.
- Applying cluster-robust standard errors with few clusters and no small-sample correction such as the wild cluster bootstrap or CR2. False rejections are common in that setting.
- Omitting unit or time effects that belong in the model. Omitting unit effects biases slopes when unit-level unobservables are correlated with the regressors, and omitting time effects biases slopes when common time shocks are correlated with the regressors.
- Treating 'robust' (heteroscedasticity-consistent) and 'cluster-robust' standard errors as interchangeable. Only the cluster-robust version allows for within-unit correlation over time.
Frequently asked questions
What is the difference between heteroscedasticity-robust and cluster-robust standard errors in a fixed effects model?
Heteroscedasticity-robust (HC) standard errors allow error variance to differ across observations but still assume independence across observations within the same unit. Cluster-robust standard errors allow both heteroscedasticity and arbitrary correlation of errors within the same cross-sectional unit over time. In panel data, within-unit serial correlation is common, so cluster-robust SEs are usually the appropriate choice.
How do I choose between fixed effects and random effects?
The Hausman test compares the two estimators: if unobserved unit effects are correlated with the regressors, random effects is inconsistent and fixed effects should be used. Many applied analyses use fixed effects when the aim is to avoid that correlation, and then apply cluster-robust standard errors to handle within-unit serial correlation.
What should I do if I have very few clusters?
Standard cluster-robust standard errors become unreliable when the number of clusters is small, and the threshold depends on the design, so the number of clusters should be reported and judged case by case. Small-sample options include the wild cluster bootstrap and the CR2 bias-reduced variance estimator.
Can I include time fixed effects alongside unit fixed effects?
Yes. Two-way fixed effects (unit and time dummies) control for both time-invariant unit heterogeneity and common time shocks. With two-way FE, cluster-robust standard errors should still be computed, and you may cluster at the unit level or, if cross-sectional dependence is also a concern, use Driscoll-Kraay standard errors instead.
Does the robust fixed effects model handle endogeneity from time-varying confounders?
No. It only removes time-invariant endogeneity. If a time-varying unobserved variable is correlated with both the regressor and the outcome, estimates remain biased. Instrumental variables (IV-FE) or a well-designed difference-in-differences design with parallel trends is needed in those cases.
Related methods
Sources
Arellano, M. (1987). Computing robust standard errors for within-groups estimators. Oxford Bulletin of Economics and Statistics, 49(4), 431–434.
Open publication referenceWooldridge, J. M. (2010). Econometric Analysis of Cross Section and Panel Data (2nd ed.). MIT Press.
ISBN: 978-0262232586