Computes the Akaike Information Criterion for a basis representation. Lower AIC indicates better model (balancing fit and complexity).
basis.aic(
fdataobj,
nbasis,
type = c("bspline", "fourier"),
lambda = 0,
pooled = TRUE
)The AIC value (scalar).
An fdata object.
Number of basis functions.
Basis type: "bspline" (default) or "fourier".
Smoothing/penalty parameter (default 0).
Logical. If TRUE (default), compute a single AIC across all curves. If FALSE, compute AIC for each curve and return the mean.
AIC is computed as: $$AIC = n \log(RSS/n) + 2 \cdot edf$$
When pooled = TRUE, the criterion uses total observations and total
effective degrees of freedom (n_curves * edf). When pooled = FALSE,
the criterion is computed for each curve separately and the mean is returned.