1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lm.R
\name{CV}
\alias{CV}
\title{Cross-validation statistic}
\usage{
CV(obj)
}
\arguments{
\item{obj}{output from \code{\link[stats]{lm}} or \code{\link{tslm}}}
}
\value{
Numerical vector containing CV, AIC, AICc, BIC and AdjR2 values.
}
\description{
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.
}
\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(fit2)
}
\seealso{
\code{\link[stats]{AIC}}
}
\author{
Rob J Hyndman
}
\keyword{models}
|