IC: Compute Information Criteria

View source: R/basics.R

ICR Documentation

Compute Information Criteria

Description

Compute Information Criteria

Usage

IC(logL, K, n = NULL, method = c("AICc", "AIC", "BIC"))

Arguments

logL

log-likelihood

K

number of parameters

n

sample size

method

either "AIC", "AICc", or "BIC"

Value

the value of the specified information criterion

Note

This function is used internally by the model-fitting functions. It will not generally be called directly by the user.

Examples

ic1 <- IC(logL = 0, K = 2, method = "AIC") # plain AIC
ic2 <- IC(logL = 0, K = 2, n = 10, method = "AICc")
ic3 <- IC(logL = 0, K = 2, n = 1000, method = "AICc") # converges to AIC with increasing n
print(rbind(ic1, ic2, ic3))

paleoTS documentation built on Sept. 11, 2024, 9:18 p.m.