LinearMixedModel
computes the deviance of modelMas minus two times the loglikelihood of that model. LetLMdenote the maximum value of the likelihood function for modelM. Then, the deviance of modelMis
A lower value of deviance indicates a better fit. SupposeM1andM2are two different models, whereM1is nested inM2. Then, the fit of the models can be assessed by comparing the deviancesDev1andDev2of these models. The difference of the deviances is
Usually, the asymptotic distribution of this difference has a chi-square distribution with degrees of freedomvequal to the number of parameters that are estimated in one model but fixed (typically at 0) in the other. That is, it is equal to the difference in the number of parameters estimated in M1and M2. You can get thep-value for this test using1 – chi2cdf(Dev,V)
, whereDev=Dev2–Dev1.
However, in mixed-effects models, when some variance components fall on the boundary of the parameter space, the asymptotic distribution of this difference is more complicated. For example, consider the hypotheses
H0:
Dis aq-by-qsymmetric positive semidefinite matrix.
H1:Dis a (q+1)-by-(q+1) symmetric positive semidefinite matrix.
That is,H1states that the last row and column ofDare different from zero. Here, the bigger modelM2hasq+ 1 parameters and the smaller modelM1hasqparameters. AndDevhas a 50:50 mixture ofχ2qandχ2(q+ 1)distributions (Stram and Lee, 1994).