# Mixed model comparison - do the random effects need to be identical for ML comparison?

When models fitted using REML are compared, the fixed structure needs to be the same between all models. However, when models are fit using ML (to compare fixed effects), does the random structure need to be the same?

from Zuur et al. (2009; PAGE 122):

To compare models with nested fixed effects (but with the same random structure), ML estimation must be used and not REML.

This suggests to me that yes, the random effects need to be the same. [Zuur et al. 2009. Mixed Effect Models and Extensions in Ecology with R. Springer.]

however, from Doug Bates SASmixed vignette:

When models are fit by maximum likelihood, ...these quality-of-fit criteria can be used to evaluate different fixed-effects specifications or different random-effects specifications or different specifications of both fixed effects and random effects

Am I misinterpreting the Zuur et al (2009) quote?

Zuur is describing but one setting for testing mixed models. For the case that models have nested fixed effects and identical random effect structure(s), the likelihood ratio statistic can be compared to a $\chi^2_{d}$ distribution ($d$ the difference in the number of parameters of the "big" model and of the "smaller" model). Zuur did not say there are no tests for the class of models Bates describes.
Bates is right that you can test for one or more random effects. The issue is that they aren't the type of tests you're used to. Say you're just testing the presence of a random intercept; the distribution of the likelihood ratio statistic is not even asymptotically $\chi^2_1$, but rather it is a mixture of $\chi^2_1$ random variables. This has nothing to do with whether the model is fit with REML or ML.