Skip to contents

Compute the \(AIC\) based on \(SSE\)

Usage

aic(fitobj)

Arguments

fitobj

Output of the fit function.

Value

Numeric denoting the \(AIC\)

Examples

# Generate a dataset
data <- dataset(Y = rnorm(100), X = rnorm(100)) |>
  suppressWarnings()

# Estimate the exponential discounting model on these data
fitobj <- fit(
  exponential(),
  data,
  itermax = 50,
  trace = FALSE
)

# Compute the AIC based on this fitobj
aic(fitobj)
#> [1] 13.41917