Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
The leave-one-out cross-validation statistic is given by
where
It turns out that for linear models, we do not actually have to estimate the model
Suppose we have a linear regression model
where
I am teaching my second year forecasting class about this result tomorrow, and I thought my students might like to see the proof. What follows is the simplest proof I know (adapted from Seber and Lee, 2003).
Proof
Let
be the estimate of
Now
Also note that
Thus
and the result follows.
This result is implemented in the CV()
function from the forecast package for R.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.