Learn R Programming

olsrr (version 0.4.0)

ols_press: PRESS (Prediction Sum of Squares)

Description

PRESS tells you how well the model will predict new data.

Usage

ols_press(model)

Arguments

model

an object of class lm

Value

Predicted Sum of Squares

Details

The prediction sum of squares (PRESS) is the sum of squares of the prediction error. Each fitted value for PRESS is obtained from the remaining n <U+2013> 1 observations, then using the fitted regression function to obtain the predicted value for the ith observation. Use PRESS to assess your model's predictive ability. Usually, the smaller the PRESS value, the better the model's predictive ability.

References

Kutner, MH, Nachtscheim CJ, Neter J and Li W., 2004, Applied Linear Statistical Models (5th edition). Chicago, IL., McGraw Hill/Irwin.

Examples

Run this code
# NOT RUN {
model <- lm(mpg ~ disp + hp + wt + qsec, data = mtcars)
ols_press(model)
# }

Run the code above in your browser using DataLab