ols_step_all_possible: All possible regression

Description Usage Arguments Value Deprecated Function References See Also Examples

Description

Fits all regressions involving one regressor, two regressors, three regressors, and so on. It tests all possible subsets of the set of potential independent variables.

Usage

1
2
3
4
ols_step_all_possible(model, ...)

## S3 method for class 'ols_step_all_possible'
plot(x, model = NA, ...)

Arguments

model

An object of class lm.

...

Other arguments.

x

An object of class ols_best_subset.

Value

ols_step_all_possible returns an object of class "ols_step_all_possible". An object of class "ols_step_all_possible" is a data frame containing the following components:

n

model number

predictors

predictors in the model

rsquare

rsquare of the model

adjr

adjusted rsquare of the model

predrsq

predicted rsquare of the model

cp

mallow's Cp

aic

akaike information criteria

sbic

sawa bayesian information criteria

sbc

schwarz bayes information criteria

gmsep

estimated MSE of prediction, assuming multivariate normality

jp

final prediction error

pc

amemiya prediction criteria

sp

hocking's Sp

Deprecated Function

ols_all_subset() has been deprecated. Instead use ols_step_all_possible().

References

Mendenhall William and Sinsich Terry, 2012, A Second Course in Statistics Regression Analysis (7th edition). Prentice Hall

See Also

Other variable selection procedures: ols_step_backward_aic, ols_step_backward_p, ols_step_best_subset, ols_step_both_aic, ols_step_forward_aic, ols_step_forward_p

Examples

1
2
3
4
5
6
model <- lm(mpg ~ disp + hp, data = mtcars)
k <- ols_step_all_possible(model)
k

# plot
plot(k)

cmlopera/olsrr documentation built on May 26, 2019, 10:34 a.m.