Learn R Programming

paleoTS (version 0.6.2)

IC: Compute Information Criteria

Description

Compute Information Criteria

Usage

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

Value

the value of the specified information criterion

Arguments

logL

log-likelihood

K

number of parameters

n

sample size

method

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

Examples

Run this code
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))

Run the code above in your browser using DataLab