Learn R Programming

olsrr (version 0.4.0)

ols_fpe: Final Prediction Error

Description

Final prediction error

Usage

ols_fpe(model)

Arguments

model

an object of class lm

Value

Final Prediction Error

Details

Computes the estimated mean square error of prediction for each model selected assuming that the values of the regressors are fixed and that the model is correct.

$$MSE((n + p) / n)$$

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

References

Akaike, H. (1969). <U+201C>Fitting Autoregressive Models for Prediction.<U+201D> Annals of the Institute of Statistical Mathematics 21:243<U+2013>247.

Judge, G. G., Griffiths, W. E., Hill, R. C., and Lee, T.-C. (1980). The Theory and Practice of Econometrics. New York: John Wiley & Sons.

Examples

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

Run the code above in your browser using DataLab