Computes the leave-one-out cross-validation statistic (also known as PRESS -- prediction residual sum of squares), AIC, corrected AIC, BIC and adjusted R^2 values for a linear model.

CV(obj)

Arguments

obj

output from lm or tslm

Value

Numerical vector containing CV, AIC, AICc, BIC and AdjR2 values.

See also

AIC

Examples

y <- ts(rnorm(120,0,3) + 20*sin(2*pi*(1:120)/12), frequency=12) fit1 <- tslm(y ~ trend + season) fit2 <- tslm(y ~ season) CV(fit1)
#> CV AIC AICc BIC AdjR2 #> 7.368574 240.049806 244.049806 279.074691 0.970244
CV(fit2)
#> CV AIC AICc BIC AdjR2 #> 7.2697275 238.7597324 242.1936947 274.9971251 0.9703446