nlme (version 3.1-86)

BIC.logLik: BIC of a logLik Object

Description

This function calculates the Bayesian information criterion, also known as Schwarz's Bayesian criterion (SBC) for an object inheriting from class logLik, according to the formula $-2 \mbox{log-likelihood} + n_{par} \log(n_{obs})$, where $n_{par}$ represents the number of parameters and $n_{obs}$ the number of observations in the fitted model. When comparing fitted objects, the smaller the BIC, the better the fit.

Usage

## S3 method for class 'logLik':
BIC(object, \dots)

Arguments

Value

a numeric value with the corresponding BIC.

References

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

See Also

BIC, logLik, AIC.

Examples

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

Run the code above in your browser using DataLab