Skip to Content

BIC {stats4}

Bayesian Information Criterion
Package: 
stats4
Version: 
R 2.12.1

Description

This generic function calculates the Bayesian information criterion, also known as Schwarz's Bayesian criterion (SBC), for one or several fitted model objects for which a log-likelihood value can be obtained, according to the formula -2*log-likelihood + npar*log(nobs), where npar represents the number of parameters and nobs the number of observations in the fitted model.

Usage

BIC(object, ...)

Arguments

object
An object of a suitable class for the BIC to be calculated - usually a "logLik" object or an object for which a logLik method exists.
...
optionally more fitted model objects.

Values

If just one object is provided, returns a numeric value with the corresponding BIC; if multiple objects 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 BIC.

References

Schwarz, G. (1978) "Estimating the Dimension of a Model", Annals of Statistics, 6, 461--464.

See Also

logLik-methods, AIC-methods

Examples

lm1 <- lm(Fertility ~ . , data = swiss)
AIC(lm1)
BIC(lm1)
 
## with two models:
lm1. <- update(lm1, . ~ . -Examination)
AIC(lm1, lm1.)
BIC(lm1, lm1.)

Documentation reproduced from R 2.12.1. License: GPL-2.