Hausman Test: Fixed vs Random Effects
The Hausman test compares fixed and random effects estimates. If they differ systematically, the entity effects are correlated with the regressors and only the fixed effects estimator is consistent.
Updated · By Bibin XavierData 480 × 8
| Firmtext · 60 levels | Yearnumeric | Industrytext · 3 levels | ROAnumeric | Leveragenumeric | Log_Sizenumeric | RnD_Intensitynumeric | GDP_Growthnumeric |
|---|---|---|---|---|---|---|---|
| F01 | 2016 | Manufacturing | 11.28 | 0.67 | 8.45 | 0.08 | 1.63 |
| F01 | 2017 | Manufacturing | 14.97 | 0.56 | 7.91 | 0.12 | 1.8 |
| F01 | 2018 | Manufacturing | 12.24 | 0.63 | 7.78 | 0.1 | 2.39 |
| F01 | 2019 | Manufacturing | 11.1 | 0.78 | 7.44 | 0.08 | 1.93 |
| F01 | 2020 | Manufacturing | 11.04 | 0.75 | 7.65 | 0.09 | 2.13 |
| F01 | 2021 | Manufacturing | 11.33 | 0.68 | 7.88 | 0.09 | 1.18 |
| F01 | 2022 | Manufacturing | 13.01 | 0.66 | 7.84 | 0.11 | 1.28 |
| F01 | 2023 | Manufacturing | 13.76 | 0.69 | 8.1 | 0.1 | 1.9 |
Variables and options
Results
480 rows · example dataPanel regression estimates
| Variable | Pooled OLS | Fixed effects | Random effects | Two-way FE | First differences |
|---|---|---|---|---|---|
| Leverage | -3.4302*** (0.6655) | -5.9077*** (0.6979) | -3.4921*** (0.6664) | -5.9668*** (0.7027) | -6.7783*** (0.7118) |
| Log_Size | 2.3195*** (0.1332) | 0.7130*** (0.2126) | 2.2820*** (0.1358) | 0.6164** (0.2285) | 0.8298*** (0.2328) |
| RnD_Intensity | 35.1346*** (4.2753) | 16.2880*** (4.6237) | 34.7101*** (4.2868) | 15.4763** (4.6829) | 19.1418*** (4.6011) |
| GDP_Growth | 0.4235*** (0.1189) | 0.4327*** (0.1081) | 0.4280*** (0.1169) | 0.2014 (0.3335) | 0.4490** (0.1548) |
| R² (within) | — | .206 | — | .218 | — |
| R² (overall) | .747 | — | .695 | — | .229 |
Note. Standard errors in parentheses (conventional). * p < .05, ** p < .01, *** p < .001. Random effects: Swamy–Arora, σu = 0.280, σe = 1.339. Constant terms omitted.
Model selection tests
| Test | Comparison | Statistic | p | Preferred model |
|---|---|---|---|---|
| F test for entity effects | Pooled OLS vs fixed effects | F(59, 416) = 2.824 | < .001 | Fixed effects |
| Breusch-Pagan LM | Pooled OLS vs random effects | χ²(1) = 0.636 | .425 | Pooled OLS |
| Hausman | Random vs fixed effects | χ²(4) = 89.361 | < .001 | Fixed effects |
Note. The Hausman test uses conventional covariance matrices; a negative statistic is set to zero. When it rejects, entity effects are correlated with the regressors and only fixed effects are consistent.
Hausman test details
| Variable | b (fixed) | B (random) | b − B | sqrt(diag(Vb − VB)) |
|---|---|---|---|---|
| Leverage | -5.9077 | -3.4921 | -2.4156 | 0.2073 |
| Log_Size | 0.7130 | 2.2820 | -1.5690 | 0.1637 |
| RnD_Intensity | 16.2880 | 34.7101 | -18.4220 | 1.7326 |
| GDP_Growth | 0.4327 | 0.4280 | 0.0047 | — |
Note. Variances in the last column use the standard errors selected above.
Interpretation
The tests point to the fixed effects model (Hausman p < .001). In that model, significant regressors are Leverage (-5.908), Log_Size (0.713), RnD_Intensity (16.288), GDP_Growth (0.433).
How to cite this tool
Using these results in a thesis, journal article, report or class assignment? Please cite this free tool so others can find it. It keeps the site free.
APA 7
Xavier, B. (2026). Hausman Test: Fixed vs Random Effects [Web application]. FreeStatisticalTools.com. https://freestatisticaltools.com/hausman-test-fixed-vs-random-effects/
BibTeX
@software{xavier_hausmantest_2026,
author = {Xavier, Bibin},
title = {Hausman Test: Fixed vs Random Effects},
publisher = {FreeStatisticalTools.com},
year = {2026},
url = {https://freestatisticaltools.com/hausman-test-fixed-vs-random-effects/},
note = {Web application}
}Suggested sentence for your methods section: “The analysis was carried out with the free Hausman Test: Fixed vs Random Effects tool on FreeStatisticalTools.com (Xavier, 2026).”
What is the Hausman test?
The Hausman specification test compares the fixed effects and random effects estimates of a panel model. Under the null hypothesis both are consistent and random effects is efficient; a significant difference means only fixed effects is consistent.
When to use the Hausman test
Run it whenever you must justify fixed or random effects in a panel study.
Assumptions
- Random effects must be efficient under the null for the classic test; with heteroskedasticity, prefer clustered inference and a robust (Mundlak) test.
How to use this tool
- Enter your data. Paste columns from Excel, Google Sheets or SPSS with variable names in the first row, or upload a CSV or Excel file. The example data shows the expected layout.
- Choose the variables. Select the entity (panel) identifier, time variable, dependent variable and regressors.
- Set the options. Fill in standard errors.
- Read the results. Results update automatically. Read the plain-English interpretation, then use Copy table to paste APA-style tables into Word and Copy for the results sentence.
How to report the Hausman test in APA style
“The Hausman test rejected random effects, χ²(4) = 31.2, p < .001, so fixed effects were used.”
Frequently asked questions
How do I interpret the Hausman test?
A p-value below .05 rejects random effects in favour of fixed effects; a larger p-value means random effects can be used.
What if the Hausman statistic is negative?
This can happen in finite samples when the variance difference is not positive definite; the statistic is then set to zero and random effects is not rejected.
Is the Hausman test valid with clustered errors?
The classic test assumes random effects is fully efficient. With heteroskedastic or serially correlated errors, a cluster-robust Mundlak test is preferred.
Related tools
Browse all categories
Data cleaning and preparation · Describe and explore · Compare means · Nonparametric tests · Correlation and regression · Bayesian statistics · Categorical data · Reliability and agreement · Multivariate analysis · Structural equation modeling · Econometrics and time series · Panel data and causal inference · Marketing and decision research · Survival, clinical and meta-analysis · Study planning and calculators · PLS-SEM