MUNDLAK SPECIFICATION TEST

Use the new estat mundlak postestimation command after xtreg to choose between random-effects (RE) and fixed-effects (FE) or correlated random-effects (CRE) models, even with cluster–robust, bootstrap, or jackknife standard errors.


We often use a Hausman specification test to decide between a more efficient RE model or an FE model. But this test cannot be performed after estimation using cluster–robust, bootstrap, or jackknife standard errors. In that case, we can use a fully robust Mundlak specification test. Unlike a Hausman test, we do not need to fit both the RE and FE models to perform a Mundlak test.

 

We are interested in how the number of registrations of a dog breed with the American Kennel Club (AKC), registered, is affected by dogs being the protagonists in a movie, movie. We surmise that the number of registrations increases if the dog breed appears as the protagonist in a movie. We also think that registrations increase if the dog has won the Best in Show award, best, from the Westminster Kennel Club in the 10 years before 2034 and that we need to control for year effects.

 

We would like to determine whether the more efficient RE model is applicable to our data instead of the FE model that allows for correlation of the regressors with the unobserved panel-level effects. We believe we should use cluster–robust standard errors during estimation to control for heteroskedasticity and within-breed correlation. As such, we cannot use our traditional Hausman specification test, but we can use the new estat mundlak command to perform a Mundlak specification test.

 

We first fit an RE model:

 

 

© Copyright 1996–2026 StataCorp LLC. All rights reserved.

To perform a Mundlak specification test, we type

 

 

We reject the null hypothesis that regressors are uncorrelated with the breed-specific effects, which is assumed by an RE model. This suggests that fitting an FE model (xtreg, fe) or a CRE model (xtreg, cre) is more sensible.

 

We reject the null hypothesis that regressors are uncorrelated with the breed-specific effects, which is assumed by an RE model. This suggests that fitting an FE model (xtreg, fe) or a CRE model (xtreg, cre) is more sensible.