[R] R/Splus code for PRESS?
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
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.
> 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......
> Mai Z
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide!
More information about the R-help