FreeStatisticalTools.com
Panel data and causal inference

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.

Free · No sign-upReplaces Stata hausmanWorks with your data
Updated · By Bibin Xavier

Data 480 × 8

Paste from Excel, or drop a CSV, TSV or Excel file here.
Example data 480 rows, 8 variables. Data stays in this browser tab.
Firmtext · 60 levelsYearnumericIndustrytext · 3 levelsROAnumericLeveragenumericLog_SizenumericRnD_IntensitynumericGDP_Growthnumeric
F012016Manufacturing11.280.678.450.081.63
F012017Manufacturing14.970.567.910.121.8
F012018Manufacturing12.240.637.780.12.39
F012019Manufacturing11.10.787.440.081.93
F012020Manufacturing11.040.757.650.092.13
F012021Manufacturing11.330.687.880.091.18
F012022Manufacturing13.010.667.840.111.28
F012023Manufacturing13.760.698.10.11.9

Variables and options

Regressors 4 selected · min 1
Results update automatically when you change an option.

Results

480 rows · example data
Entities / observations60 / 480
Time periods per entity8balanced panel
Hausman test< .001fixed effects preferred
ρ (share of variance from entity effects).042
Table 1

Panel regression estimates

VariablePooled OLSFixed effectsRandom effectsTwo-way FEFirst differences
Leverage-3.4302***
(0.6655)
-5.9077***
(0.6979)
-3.4921***
(0.6664)
-5.9668***
(0.7027)
-6.7783***
(0.7118)
Log_Size2.3195***
(0.1332)
0.7130***
(0.2126)
2.2820***
(0.1358)
0.6164**
(0.2285)
0.8298***
(0.2328)
RnD_Intensity35.1346***
(4.2753)
16.2880***
(4.6237)
34.7101***
(4.2868)
15.4763**
(4.6829)
19.1418***
(4.6011)
GDP_Growth0.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.

Table 2

Model selection tests

TestComparisonStatisticpPreferred model
F test for entity effectsPooled OLS vs fixed effectsF(59, 416) = 2.824< .001Fixed effects
Breusch-Pagan LMPooled OLS vs random effectsχ²(1) = 0.636.425Pooled OLS
HausmanRandom vs fixed effectsχ²(4) = 89.361< .001Fixed 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.

Table 3

Hausman test details

Variableb (fixed)B (random)b − Bsqrt(diag(Vb − VB))
Leverage-5.9077-3.4921-2.41560.2073
Log_Size0.71302.2820-1.56900.1637
RnD_Intensity16.288034.7101-18.42201.7326
GDP_Growth0.43270.42800.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).

A Hausman test favoured fixed effects, χ²(4) = 89.36, p < .001.

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

  1. 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.
  2. Choose the variables. Select the entity (panel) identifier, time variable, dependent variable and regressors.
  3. Set the options. Fill in standard errors.
  4. 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