Why a Hausman Result Needs a Diagnostic Check
A Hausman test compares fixed-effects (FE) and random-effects (RE) estimates of the same slopes. Under its usual null hypothesis, both estimators are consistent and RE is efficient; under the alternative, RE may be inconsistent because the unit-specific effect is correlated with the regressors. A small p-value can therefore be evidence against the conventional RE exogeneity assumption. But the test is only as trustworthy as the covariance calculation and error assumptions that produce it.
Three warnings deserve particular attention. The estimated covariance difference may not be positive semidefinite, so the usual quadratic statistic can be negative or otherwise unusable. The error structure may make the conventional covariance estimates invalid, even when robust standard errors appear in the regression output. Or the test may have too little power to detect meaningful correlation. A correlated-random-effects (CRE) test can offer a useful alternative in some settings, but it too tests a specified model rather than every possible form of endogeneity.
The setup matters. The compared estimates must target the same slope parameters, use the same observations and regressor set, and have compatible specifications. The usual covariance-difference formula also relies on the null model’s efficiency relationship. It is not a general recipe for subtracting any two estimated covariance matrices.
Why the Covariance Difference Should Be Nonnegative
Under the null, both estimators are consistent for the same parameter, and RE is efficient among the estimators being compared. The efficiency result gives a useful covariance identity. In population terms, let \(V_{FE}\) and \(V_{RE}\) be the covariance matrices, and suppose that under the null \(\operatorname{Cov}(\hat{\beta}_{FE}-\hat{\beta}_{RE},\hat{\beta}_{RE})=0\). Then
The matrix on the left is a covariance matrix, so it is positive semidefinite: for every vector \(a\), \(a'\operatorname{Var}(\hat{\beta}_{FE}-\hat{\beta}_{RE})a\geq 0\). Consequently, the population covariance difference should also be positive semidefinite under these conditions. In finite samples, estimated matrices may deviate from this ideal because of sampling variation, numerical issues, or a failure of the assumptions. A non-positive difference is a diagnostic warning, not a reason to force the matrix into a form that produces a preferred result.
Worked Example: A Non-Positive Covariance Difference
Suppose, hypothetically, that an analyst compares two slope estimates on the same two regressors. The estimates are \(\hat{\beta}_{FE}=(1.10,\,0.60)'\) and \(\hat{\beta}_{RE}=(1.08,\,0.60)'\), in outcome units per unit of the respective regressors. The estimated covariance matrices are
Calculate the difference. Subtracting entry by entry gives
Its determinant is \(0.0004(0.0001)-(0.0003)^2=-0.00000005\), which is negative. Thus \(\widehat D\) is not positive semidefinite. The estimate difference is \(d=(0.02,\,0)'\), and the inverse, which exists here, is
A negative value cannot be interpreted as an ordinary chi-square test statistic. The calculation does not provide valid evidence either for or against RE. The analyst should investigate whether the estimates use the same specification and sample, whether the covariance estimates are appropriate, and whether numerical or model issues explain the failure. Reporting a chi-square p-value from \(H=-0.8\) would be misleading.
Misspecified Error Structures and Robust Covariances
The conventional test can also mislead when its covariance estimates rely on an error structure that is wrong. For example, heteroskedasticity across units or serial correlation within a unit can make conventional standard errors unreliable. Using robust standard errors for each estimator is important for inference about those estimators, but it does not automatically make the conventional Hausman subtraction valid.
In general, the variance of the difference between two estimates is
The conventional difference \(V_{FE}-V_{RE}\) follows only when the required null covariance relationship holds. Separately estimated robust covariance matrices do not generally establish that relationship. A robust comparison must account for the covariance between the two estimators—for example, through a suitable joint sandwich calculation—or use an appropriate auxiliary-regression test. A robust standard error for each coefficient, on its own, does not supply the missing cross-covariance.
Worked Example: Why Subtracting Robust Variances Can Fail
Consider a hypothetical one-slope comparison under clustered sampling. The FE and RE estimates differ by \(0.10\) outcome units per unit of the regressor. Suppose their robust estimated variances are \(0.0400\) and \(0.0300\), and a joint calculation estimates their covariance as \(0.0250\).
Naive subtraction. Subtracting the two marginal variances gives \(0.0400-0.0300=0.0100\). This would produce \(0.10^2/0.0100=1.00\).
Variance of the difference. The relevant variance, using the joint covariance, is
The corresponding squared standardized difference is \(0.10^2/0.0200=0.500\), not \(1.00\). If this were compared with a one-degree-of-freedom chi-square distribution under a valid test construction, the p-value for \(0.500\) would be about \(0.480\); the naive value \(1.00\) would give about \(0.317\). The arithmetic shows how ignoring the covariance changes the result. It does not, by itself, certify that a valid robust Hausman test has been constructed; that depends on the joint estimator and its assumptions.
A robust method also cannot repair a misspecified conditional mean or a failure of the substantive exogeneity assumptions. Robust covariance estimation addresses uncertainty under specified forms of dependence or heteroskedasticity; it does not turn an inconsistent estimator into a consistent one.
Weak Power: A Non-Rejection Is Not Reassurance
Even when the conventional statistic is well-defined and its assumptions are credible, it may have weak power. In particular, FE estimates can be imprecise when much of a regressor’s variation is between units rather than within units. Then the difference between FE and RE may be estimated imprecisely, and the test may fail to detect a meaningful violation of RE exogeneity.
Worked Example: A Small Hausman Statistic With an Imprecise Difference
Suppose, hypothetically, that FE estimates a slope as \(1.02\) outcome units per regressor unit, with estimated variance \(0.0400\), and RE estimates it as \(1.00\), with estimated variance \(0.0225\). Assume the conventional null covariance relationship is justified and the covariance difference is positive.
Difference and covariance difference. The estimate difference is \(1.02-1.00=0.02\), and the covariance difference is \(0.0400-0.0225=0.0175\). For one slope,
Compared with a chi-square distribution with one degree of freedom, this gives a p-value of about \(0.880\). At a significance level of \(0.05\), the test does not reject the null. That is not proof that the unit-specific effect is uncorrelated with the regressor. The small estimated difference is also imprecise relative to its variance, so this result may be consistent with limited power. The appropriate conclusion is that this test did not detect a difference, not that RE exogeneity has been established.
When a Correlated-Random-Effects Test Helps
A correlated-random-effects specification can make the relevant exogeneity restriction explicit. For time-varying regressors \(x_{it}\), a common Mundlak formulation includes each unit’s time average \(\bar{x}_i\) alongside the time-varying regressors:
Here \(a_i\) is a unit-specific component and \(u_{it}\) is the remaining error. In this specified linear formulation, testing \(H_0:\pi=0\) asks whether the included unit means jointly contribute, conditional on the included regressors. If the means capture the relevant correlation between the regressors and the unit-specific component, this test is informative about the conventional RE restriction. The test can be implemented as a joint Wald test using a covariance estimator appropriate to the error structure.
This is not an unrestricted test for every possible dependence between \(x_{it}\) and \(a_i\). Its interpretation depends on the CRE specification, the included means, and the assumptions about the remaining error. For example, nonlinear dependence or omitted relevant features of the regressor history may not be captured by a linear set of means. Time-invariant regressors also require care: their unit means are the regressors themselves, so they cannot be separately identified from the corresponding time-invariant component in this formulation.
Worked Example: A Joint Correlated-Random-Effects Test
Suppose a hypothetical panel regression models annual productivity using two time-varying regressors: training hours and equipment investment. The CRE specification includes both regressors and their unit means. Assume the estimated mean coefficients are \(\hat{\pi}_1=0.30\) and \(\hat{\pi}_2=-0.10\), in productivity units per unit of the corresponding regressor mean. A robust covariance estimate for these coefficients is
The joint null is \(H_0:\pi_1=\pi_2=0\). Using the stated covariance matrix, the Wald statistic is
Under the joint null and the stated large-sample conditions, \(W\) is compared with a chi-square distribution with \(2\) degrees of freedom. Its p-value is about \(0.0266\), so at \(\alpha=0.05\) the joint null is rejected. In this specified CRE model, the unit means provide evidence against the restriction that their coefficients are jointly zero. The result does not establish that every possible form of correlation has been modeled correctly, nor does it alone determine which estimator should be used for every purpose.
Common Pitfalls and a Practical Diagnosis
The most common mistake is to treat a Hausman p-value as an automatic choice between estimators. A reliable decision starts by checking whether the test was validly constructed and whether its result is informative for the question at hand.
- Wrong: “The covariance difference is indefinite, but software returned a number, so its chi-square p-value is usable.” Correction: An indefinite difference violates the usual covariance interpretation; investigate the specification, covariance calculation, and numerical stability before making an inference.
- Wrong: “I used robust standard errors for FE and RE, so their difference is a robust Hausman test.” Correction: Robust marginal covariance estimates do not generally provide the covariance of the difference. Use a test procedure that accounts for the joint covariance or a suitable CRE test.
- Wrong: “A large p-value proves the RE assumption.” Correction: Non-rejection means the test did not find sufficient evidence against its null. Weak power, especially with imprecise within-unit information, can also produce non-rejection.
- Wrong: “A CRE test is an omnibus test for any dependence between regressors and unit effects.” Correction: It tests restrictions implied by the specified included means and model; dependence not captured by that specification may remain undetected.
When a conventional Hausman result is questionable, report the reason rather than presenting a forced decision. Check that the slope vectors and samples match, inspect the covariance difference, and verify that the error assumptions support the covariance calculation. If the concern is heteroskedasticity or within-unit dependence, use an inference procedure designed for that structure. If a CRE formulation is substantively plausible, a joint test of the unit-mean coefficients can provide a useful, explicit diagnostic. In all cases, distinguish evidence against a restriction from proof that an alternative is correct.
Check Your Understanding
Answer each question by identifying the assumption or calculation that matters.
- Why should the covariance difference in the conventional Hausman statistic be positive semidefinite under its null conditions?
- A calculated Hausman statistic is negative. What does this tell you, and what should you avoid reporting?
- Why are two robust covariance matrices, one for FE and one for RE, not generally enough to calculate a robust variance for their difference?
- A Hausman test has a large p-value. Give two reasons this should not be described as proof of RE exogeneity.
- In a CRE model, what null is tested by a joint test of the unit-mean coefficients, and what kind of dependence might that test fail to capture?