CV | R Documentation |
Computes the leave-one-out cross-validation statistic (the mean of PRESS – prediction residual sum of squares), AIC, corrected AIC, BIC and adjusted R^2 values for a linear model.
CV(obj)
obj |
output from |
Numerical vector containing CV, AIC, AICc, BIC and AdjR2 values.
Rob J Hyndman
AIC
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(fit2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.