[R] R/Splus code for PRESS?

Liaw, Andy andy_liaw at merck.com
Fri Apr 9 04:53:46 CEST 2004


[I thought this has been covered before, but I can't find it in the
archive...]

PRESS = sum of squares of deletion residuals

Any good book on regression will show you that deletion residual for
multiple regression fitted by least squares is just the raw residual divided
by one minus the hat values (or `leverage values').  And there is a
hatvalues() function in R.  With that, the computation of PRESS should be
fairly straight forward.

Andy

> From: Mai Zhou
> 
> Dear R-help, 
> Does anybody know where can I find R/Splus code for computing
> PREdiction Sum of Squares (PRESS)
> in a linear regression model?
> 
> I have a large regression model (~100 predictors, ~30,000 cases)
> and good prediction is the main goal.
> 
> I remember there is a faster way to compute it (no need to
> repeatedly fit models), but if there is existing code......
> 
> Thanks.
> 
> Mai Z
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
>




More information about the R-help mailing list