nlme (version 3.1-18)

AIC.logLik: AIC of a logLik Object

Description

This function calculates the Akaike information criterion for an object inheriting from class logLik, according to the formula $-2 \mbox{log-likelihood} + 2 n_{par}$, where $n_{par}$ represents the number of parameters in the fitted model. When comparing fitted objects, the smaller the AIC, the better the fit.

Usage

AIC(object)

Arguments

Value

a numeric value with the corresponding AIC.

References

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

See Also

AIC, logLik, BIC

Examples

Run this code
data(Orthodont)
fm1 <- lm(distance ~ age, data = Orthodont) 
AIC(logLik(fm1))

Run the code above in your browser using DataLab