- Introduced by
- Jerry A. Hausman
- Year
- 1978
- Type
- Specification test for panel data models
What does it do?
The Hausman test is a specification test, introduced by Jerry A. Hausman in 1978, that helps choose between the fixed-effects (FE) and random-effects (RE) estimators in panel data models.
Its null hypothesis is that the random-effects estimator is consistent and efficient. Rejecting the null points to FE, because RE is then inconsistent; one important reason is that the unit-specific effects are correlated with the explanatory variables. Failing to reject is consistent with RE, but it does not by itself establish that RE is correct, since the test may have low power.
The intuition behind the method
Both FE and RE estimate the same coefficients (where both models can identify them) but trade off differently. Random effects is efficient (has smaller variance), but it stays consistent only if the individual effects are unrelated to the regressors. Fixed effects remains consistent in either case but discards between-unit variation and is less efficient. The Hausman test asks whether the two sets of coefficient estimates are close enough to be explained by sampling variation. If they differ by more than chance would allow, the RE estimator is likely inconsistent, and the FE estimates are the safer basis for inference.
History
The test was introduced by Jerry A. Hausman in his 1978 Econometrica paper Specification Tests in Econometrics. That paper set out a general principle: compare an estimator that is efficient under the null with one that is consistent more broadly, and use their difference to test the specification. Its use for choosing between random and fixed effects in panel data later became a common step in applied econometric work.
When to use it
Use the Hausman test on panel data once you have estimated both a fixed-effects and a random-effects model on the same specification (same regressors and same sample), and you need a formal basis for choosing between them. The test assumes both models are correctly specified with no omitted variables. Under the null, RE is consistent and efficient; FE is consistent in both cases but less efficient. Because the test relies on an asymptotic chi-square approximation, it is less dependable in short panels or small samples. Adequacy depends on the number of units and time periods in the panel rather than on a single sample-size threshold. In small samples, a bootstrap version of the test is one option. Do not use the test to compare models whose coefficient vectors are not defined over the same regressors, because the difference between the estimates then has no meaning.
Limitations and considerations
- Relies on an asymptotic approximation, so it can be unreliable in small samples, where a bootstrap version is one option to consider.
- Assumes both models are correctly specified with no omitted variables. A rejection can therefore reflect general misspecification as well as correlated unit effects.
- The covariance difference in the denominator may fail to be positive definite in finite samples. In that case its inverse cannot be computed and the statistic is undefined.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Provides a formal decision rule for the fixed-effects versus random-effects choice, which is a common question in applied panel analysis.
- Built directly on two estimators you already compute, comparing their coefficient vectors without requiring an additional model.
- Has a stated asymptotic chi-square distribution with k degrees of freedom, so the statistic and its p-value can be reported and interpreted in a standard way.
Applications
- Deciding whether to report fixed-effects or random-effects estimates in panel regressions of economic, social, or business outcomes.
- Checking whether unobserved individual heterogeneity is correlated with the explanatory variables before interpreting panel coefficients.
- Serving as a general specification check that compares an efficient estimator against a consistent but less efficient one.
How it works
How it works
Under the null hypothesis the systematic difference between the random-effects and fixed-effects coefficient vectors is zero in the limit. In the standard case this means the unit effects are uncorrelated with the regressors, so random effects is both consistent and efficient. Under the alternative this difference is non-zero, for example because the unit effects correlate with the explanatory variables, which leaves random effects inconsistent.
Formula
H_0:\ \operatorname{plim}(\hat{\beta}_{RE}-\hat{\beta}_{FE}) = 0The test forms the vector of differences between the FE and RE coefficient estimates. It weights this vector by the inverse of the difference between the two covariance matrices and combines the pieces into a single quadratic (Wald-type) statistic. Under the null, FE is consistent but inefficient while RE is efficient, which is what makes the variance difference in the formula meaningful. The statistic is asymptotically chi-square distributed with k degrees of freedom, where k is the number of elements of the coefficient vector being compared. Only coefficients estimated by both models enter the comparison: the FE estimator cannot estimate coefficients on time-invariant regressors, so those drop out of the test. A large statistic (small p-value) rejects RE in favour of FE. If the covariance difference is not positive definite in a finite sample, its inverse cannot be computed and the full statistic is undefined; a test on a subset of the coefficients is then an alternative.
Formula
H = (\hat{\beta}_{FE}-\hat{\beta}_{RE})^{\top}\big[\operatorname{Var}(\hat{\beta}_{FE})-\operatorname{Var}(\hat{\beta}_{RE})\big]^{-1}(\hat{\beta}_{FE}-\hat{\beta}_{RE}) \sim \chi^2_kCommon pitfalls
- Treating a rejection as proof of correlated unit effects when it may instead signal omitted variables or other misspecification in either model.
- Applying the standard asymptotic test to a short panel where the chi-square approximation is poor, without considering alternatives such as a bootstrap version.
- Ignoring an undefined test statistic that arises when the difference of covariance matrices is not positive definite, so that its inverse cannot be computed. In that case a test on a subset of the coefficients is an option.
- Reading a failure to reject as confirmation that random effects is correct. The test may simply lack power in a small panel to detect correlated unit effects.
Frequently asked questions
What does it mean if the Hausman test rejects the null?
Rejecting the null means the random-effects estimator is inconsistent. A common reason is that the unit-specific effects are correlated with the regressors, although other forms of misspecification can also cause rejection. In that case the fixed-effects estimates are generally preferred, since they remain consistent when that correlation is present.
Why choose random effects if fixed effects is always consistent?
Fixed effects is consistent but discards between-unit variation and is less efficient. When the null holds, random effects is consistent and efficient, giving smaller standard errors and allowing estimation of time-invariant regressors. The Hausman test provides evidence on whether that efficiency is safe to use, though it is not conclusive on its own.
Is the test reliable in small samples?
Not always. The statistic follows a chi-square distribution only asymptotically, so in short panels the approximation can be poor. A bootstrap version of the test is one option when the sample is small.
What if the Hausman statistic cannot be computed?
The statistic is undefined when the difference between the FE and RE covariance matrices is not positive definite in a finite sample, because its inverse cannot be computed. A test on a subset of the coefficients is one alternative, and a bootstrap version is another option to consider.
Related methods
Sources
Hausman, J. A. (1978). Specification Tests in Econometrics. Econometrica, 46(6), 1251–1271.
Open DOI referenceA guide to modern econometrics, 5th Edition, p. 395