AIC {nlme}R Documentation

Akaike Information Criterion

Description

This generic function calculates the Akaike information criterion for one or several fitted model objects for which a log-likelihood value can be obtained, according to the formula -2*log-likelihood + 2*npar, where npar represents the number of parameters in the fitted model. When comparing fitted objects, the smaller the AIC, the better the fit.

Usage

AIC(object, ..., k)

Arguments

object a fitted model object, for which there exists a logLik method to extract the corresponding log-likelihood, or an object inheriting from class logLik.
... optional fitted model objects.
k numeric, the ``penalty'' per parameter to be used; the default k = 2 is the classical AIC.

Value

if just one object is provided, returns a numeric value with the corresponding AIC; if more than one object are provided, returns a data.frame with rows corresponding to the objects and columns representing the number of parameters in the model (df) and the AIC.

Author(s)

Jose Pinheiro Jose.Pinheiro@pharma.novartis.com and Douglas Bates bates@stat.wisc.edu

References

Sakamoto, Y., Ishiguro, M., and Kitagawa G. (1986) "Akaike Information Criterion Statistics", D. Reidel Publishing Company.

See Also

logLik, BIC, AIC.logLik

Examples

data(Orthodont)
fm1 <- lm(distance ~ age, data = Orthodont) # no random effects
AIC(fm1)
fm2 <- lme(distance ~ age, data = Orthodont) # random is ~age
AIC(fm1, fm2)

[Package Contents]