Compute the \(AIC\) based on \(SSE\)
Arguments
- fitobj
Output of the
fitfunction.
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