Using maximum likelihood, any of these can be compared with AIC, and any that are nested can be compared with the likelihood ratio test. Using REML,AIC; if the fixed effects must beare the same; you havesame (m1
to usem4
), using either REML or ML to compare modelsis fine, with REML usually preferred, but if they are different fixed effects, only ML can be used. However, interpretation is usually difficult when both fixed effects and random effects are changing, so in practice, most recommend changing only one or the other at a time.
Using the likelihood ratio test is possible but messy because the usual chi-squared approximation doesn't hold when testing if a variance component is zero. See Aniko's answer for details. (Kudos to Aniko for both reading the question more carefully than I did and reading my original answer carefully enough to notice that it missed this point. Thanks!)
Pinhiero/Bates is the classic reference; it describedescribes the nlme
package, but the theory is the same. Well, mostly the same; Doug Bates has changed his recommendations on inference since writing that book and the new recommendations are reflected in the lme4
package. But that's more than I want to get into here. A more readable reference is Weiss (2005), Modeling Longitudinal Data.