Daniel Weitzenfeld
2010-Oct-22 22:17 UTC
[R] cv.lm() broken; cross validation vs. predict(interval="prediction")
<< 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
Uwe Ligges
2010-Oct-23 15:47 UTC
[R] cv.lm() broken; cross validation vs. predict(interval="prediction")
On 23.10.2010 00:17, Daniel Weitzenfeld wrote:> << 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.Please report to the package maintainer. Best, Uwe Ligges> 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 > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.