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*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) 

REQUIRED ARGUMENTS:

object
an object inheriting from class logLik, usually resulting from applying a logLik method to a fitted model object.

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:

, ,

EXAMPLES:

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