Learn R Programming

olsrr (version 0.4.0)

ols_msep: MSEP

Description

Estimated error of prediction, assuming multivariate normality

Usage

ols_msep(model)

Arguments

model

an object of class lm

Value

MSEP

Details

Computes the estimated mean square error of prediction assuming that both independent and dependent variables are multivariate normal.

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

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

References

Stein, C. (1960). <U+201C>Multiple Regression.<U+201D> In Contributions to Probability and Statistics: Essays in Honor of Harold Hotelling, edited by I. Olkin, S. G. Ghurye, W. Hoeffding, W. G. Madow, and H. B. Mann, 264<U+2013>305. Stanford, CA: Stanford University Press.

Darlington, R. B. (1968). <U+201C>Multiple Regression in Psychological Research and Practice.<U+201D> Psychological Bulletin 69:161<U+2013>182.

Examples

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

Run the code above in your browser using DataLab