Terms and L are NULL), a combination
of model terms (when Terms in not NULL), or linear
combinations of the model coefficients (when L is not
NULL). Otherwise, when multiple fitted objects are being
compared, a data frame with the degrees of freedom, the (restricted)
log-likelihood, the Akaike Information Criterion (AIC), and the
Bayesian Information Criterion (BIC) of each object is returned. If
test=TRUE, whenever two consecutive objects have different
number of degrees of freedom, a likelihood ratio statistic, with the
associated p-value is included in the returned data frame.anova(object, ..., test, type, adjustSigma, Terms, L, verbose)lme,
representing a mixed-effects model.gls, gnls, lm, lme,
lmList, nlme, nlsList, or nls.object and the objects in .... Defaults to
TRUE."sequential", the sequential sum of squares obtained by
including the terms in the order they appear in the modeTRUE and the
estimation method used to obtain object was maximum
likelihood, the residual standard error is multiplied by
$\sqrt{n_{obs}/(n_{obs} - n_{par})}$,
converting it to a REML-likTRUE, the calling
sequences for each fitted model object are printed with the rest of
the output, being omitted if verbose = FALSE. Defaults to
FALSE.anova.lme.gls, gnls, nlme,
lme, AIC, BIC,
print.anova.lmedata(Orthodont)
fm1 <- lme(distance ~ age, Orthodont, random = ~ age | Subject)
anova(fm1)
fm2 <- update(fm1, random = pdDiag(~age))
anova(fm1, fm2)Run the code above in your browser using DataLab