Mundlak Specification Test
Background
Classical panel econometrics uses the Mundlak specification test (also
called the Chamberlain–Mundlak test) to decide whether random effects (RE) or
fixed effects (FE) should be preferred. Stata 19 implements this as
estat mundlak — a Wald test on the auxiliary Mundlak γ coefficients:
- H₀: RE is consistent (γ = 0 jointly), so the simpler RE model is adequate.
- H₁: RE is inconsistent (γ ≠ 0), so CRE or FE is needed.
This test is the cluster-robust-compatible replacement for the classical Hausman test, which breaks under heteroskedasticity or within-cluster correlation.
Why It Does Not Apply to Abacus
Abacus is a fully Bayesian MMM framework. The Mundlak specification test is a frequentist hypothesis test and does not translate directly:
-
No frequentist rejection framework. There is no Wald statistic or asymptotic chi-squared distribution. Bayesian inference does not produce p-values or binary accept/reject decisions.
-
The posterior already answers the question. When
use_mundlak_cre=True, the Mundlak γ coefficients receive priors and are estimated jointly with all other model parameters. If the posteriors of γ are concentrated near zero, the baseline panel specification was adequate. If they are clearly non-zero, the CRE correction is absorbing meaningful between-group confounding. You read the posterior — you do not need a separate test. -
Bayesian pooling is a continuum, not a binary choice. In Abacus, hierarchical shrinkage only appears when you encode it in the priors. Default
PanelMMMpanel priors are indexed by the panel coordinates, not automatically hierarchical. Once you choose hierarchical priors, there is no clean “pure RE” versus “pure FE” dichotomy to test between.
What to Do Instead
Inspect the γ posteriors directly
After fitting with use_mundlak_cre=True, examine the Mundlak coefficients:
If the 94% HDI includes zero for all channels, the CRE correction is doing little. If the HDI excludes zero, the correction is absorbing real between-group correlation.
The diagnostics surface also reports these:
Bayesian model comparison (optional, not currently in scope)
The formal Bayesian analog of the specification test is model comparison via LOO-CV (leave-one-out cross-validation using Pareto-smoothed importance sampling):
- Fit with
use_mundlak_cre=False. - Fit with
use_mundlak_cre=True. - Compare ELPD (expected log predictive density) via
az.compare().
This is currently out of scope for Abacus. LOO/WAIC were explicitly deferred in the project backlog. If formal Bayesian model comparison is needed later, it would be a separate feature.
Prior predictive checks
Verify that the prior on γ is not dominating the posterior. This is standard
Bayesian workflow and is already supported via mmm.sample_prior_predictive().
Summary
| Approach | Framework | Available in Abacus |
|---|---|---|
Mundlak specification test (estat mundlak) |
Frequentist | No — does not apply |
| Posterior inspection of γ | Bayesian | Yes — az.summary() / mmm.diagnostics |
| LOO-CV model comparison | Bayesian | Not yet — deferred in backlog |
| Prior predictive check | Bayesian | Yes — sample_prior_predictive() |
The recommendation is to inspect the γ posteriors rather than implement a frequentist specification test. The Bayesian posterior provides a richer and more directly interpretable answer than a binary reject/fail-to-reject decision.
References
- Mundlak, Y. (1978). “On the Pooling of Time Series and Cross Section Data.” Econometrica, 46(1), 69–85.
- Stata 19: Mundlak specification test
- Vehtari, A., Gelman, A., & Gabry, J. (2017). “Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC.” Statistics and Computing, 27(5), 1413–1432.