Learn R Programming

olsrr (version 0.4.0)

ols_hsp: Hocking's Sp

Description

Average prediction mean squared error

Usage

ols_hsp(model)

Arguments

model

an object of class lm

Value

Hocking's Sp

Details

Hocking's Sp criterion is an adjustment of the residual sum of Squares. Minimize this criterion.

$$MSE / (n - p - 1)$$

where \(MSE = SSE / (n - p)\), n is the sample size and p is the number of predictors including the intercept

References

Hocking, R. R. (1976). <U+201C>The Analysis and Selection of Variables in a Linear Regression.<U+201D> Biometrics 32:1<U+2013>50.

Examples

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

Run the code above in your browser using DataLab