[R] cv.lm() broken; cross validation vs. predict(interval="prediction")

Daniel Weitzenfeld dweitzenfeld at gmail.com
Sat Oct 23 00:17:31 CEST 2010


<< repost because previous attempt was not plain text, sorry! >>

Hi Folks,
I have a pretty simple problem: after building a multivariate linear model,
I need to report my 95% confidence interval for predictions based on future
observations.

I know that one option is to use predict(interval="prediction") but
I'm curious about less parametric ways to get an estimate.

I tried doing K-fold cross validation using cv.lm() from the DAAG package,
but it currently only uses the first independent variable in the provided
linear model.  No warnings or anything.  There was a thread about this here
about 3 years ago but the person got no response.  Does anyone know of a
working alternative?

Thanks,
Dan



More information about the R-help mailing list