Learn R Programming

olsrr (version 0.4.0)

ols_mallows_cp: Mallow's Cp

Description

Mallow's Cp

Usage

ols_mallows_cp(model, fullmodel)

Arguments

model

an object of class lm

fullmodel

an object of class lm

Value

Mallow's Cp

Details

Mallows' Cp statistic estimates the size of the bias that is introduced into the predicted responses by having an underspecified model. Use Mallows' Cp to choose between multiple regression models. Look for models where Mallows' Cp is small and close to the number of predictors in the model plus the constant (p).

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.

Mallows, C. L. (1973). <U+201C>Some Comments on Cp.<U+201D> Technometrics 15:661<U+2013>675.

Examples

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

Run the code above in your browser using DataLab