Learn R Programming

nlme (version 3.1-31)

anova.lme: Compare Likelihoods of Fitted Objects

Description

When only one fitted model object is present, a data frame with the sums of squares, numerator degrees of freedom, denominator degrees of freedom, F-values, and P-values for Wald tests for the terms in the model (when 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.

Usage

## S3 method for class 'lme':
anova(object, ..., test, type, adjustSigma, Terms, L, verbose)

Arguments

Value

a data frame inheriting from class anova.lme.

See Also

gls, gnls, nlme, lme, AIC, BIC, print.anova.lme

Examples

Run this code
data(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