Helper function compute AICc from a gam or lm object

AICc(object)

Arguments

object

A model returned by a gam or lm fit

Value

an AICc value

Examples

# some simulated data with one cov library(mgcv) dat <- gamSim(6,n=20,scale=.5)[,1:2]
#> 4 term additive + random effectGu & Wahba 4 term additive model
m <- gam(y~s(x0), data=dat) AICc(m)
#> [1] 112.361