var_select: Select the 'best' variables to include in a linear model

Description Usage Arguments Value

View source: R/var_select.R

Description

This is an implementation of a simple algorithm that selects the 'best' variables as the predictors in a linear regression model. The selection is based on choosing the variables that give the highest adjusted R-squared value.

Usage

1
var_select(data, y, stopat = Inf)

Arguments

data

A data frame containing the predictor variables (X) and the dependent variable (Y).

y

The name of the dependent variable.

stopat

The total number of variables to include in the model. Default is Inf which means using all the variables in the data frame.

Value

A nested tibble with the lm models and stats.


MohoWu/ricardor documentation built on March 6, 2021, 4:17 p.m.