Arte SheetsLearn. Try. Understand.

Panel Data & Econometrics

Hausman Fixed-vs-Random-Effects Specification Test Formula

Test correlation between unobserved unit effects alpha_i and regressors X_it using Hausman’s (1978) H = (b_FE - b_RE)^2 / (SE_FE^2 - SE_RE^2) chi-square statistic.

Understand why Var(b_FE - b_RE) simplifies cleanly to SE_FE^2 - SE_RE^2 under H0

In longitudinal panel regressions Y_it = alpha_i + beta * X_it + eps_it, Random Effects (RE) is efficient if unobserved unit heterogeneity alpha_i is uncorrelated with X_it, whereas Fixed Effects (FE within-estimator) remains consistent even when alpha_i correlates with X_it! Hausman (1978) proved a remarkable covariance lemma: under H0 (RE is efficient), Cov(b_RE, b_FE - b_RE) = 0, so the exact asymptotic variance of their difference is simply Var(b_FE) - Var(b_RE) = SE_FE^2 - SE_RE^2!

Check by hand for a single time-varying regressor (df = 1, 5% chi-square critical value = 3.8415): within-estimator b_FE = 0.4200 with SE_FE = 0.0500 (B2, B3) vs GLS random-effects b_RE = 0.5600 with SE_RE = 0.0300 (B4, B5). Variance difference is 0.0500^2 - 0.0300^2 = 0.0025 - 0.0009 = 0.0016 (SE_diff = 0.0400), coefficient gap is -0.1400, and Hausman H = (-0.1400)^2 / 0.0016 = 0.0196 / 0.0016 = 12.2500 (> 3.8415 -> reject Random Effects and adopt Fixed Effects!).

Hausman Panel Diagnostic (df = 1)Formula ExpressionSample Output
FE - RE Slope Differenceb_FE - b_RE = 0.4200 - 0.5600-0.1400
Asymptotic Variance DifferenceSE_FE^2 - SE_RE^2 = 0.0025 - 0.00090.0016 (SE_diff = 0.0400)
Hausman Chi-Square Statistic H(b_FE - b_RE)^2 / (SE_FE^2 - SE_RE^2)12.2500 (Z = -3.5000)
5% Specification Decision (3.8415)IF(H >= 3.8415, "Reject RE: Use FE", "Retain RE")Reject RE: Use FE

Hausman Chi-Square Specification Statistic H (df = 1) Formula

In finite samples with clustered or heteroscedastic errors, SE_FE^2 - SE_RE^2 can occasionally turn non-positive (demonstrating failure of non-robust RE efficiency assumptions — use a Mundlak correlated-random-effects test in that case!). Guard v_diff <= 0 explicitly.

=LET(b_fe, B2, se_fe, B3, b_re, B4, se_re, B5, v_dif, (se_fe^2) - (se_re^2), IF(OR(se_fe <= 0, se_re <= 0, v_dif <= 0), "Non-Positive Variance Diff (Use Mundlak)", ROUND(((b_fe - b_re)^2) / v_dif, 4)))

5% Chi-Square (df = 1) Estimator Selection Rule Formula

Verify orthogonality: when b_FE = 0.5300 sits close to b_RE = 0.5600 (set B2 = 0.53), H drops to (-0.03)^2 / 0.0016 = 0.5625 < 3.8415, retaining efficient Random Effects.

=IF(ISNUMBER(E4), IF(E4 >= 3.8415, "Reject RE: Use FE", "Retain RE"), E4)

Try the example

Use the original values or change them to test your understanding.

Further reading