compare_predictors | R Documentation |
This function fits a set of linear models to the data, where each model includes only one predictor. It then fits a full model with all predictors. The function returns a data frame with the coefficients for each model, as well as the full model.
compare_predictors(data, outcome, predictors, conf.level = 0.95)
data |
The data frame to use |
outcome |
The name of the outcome variable. Must be numeric. |
predictors |
A character vector of predictors to use. |
conf.level |
The confidence level to use. Default is .95. |
A data frame with the coefficients for each model
compare_predictors(iris, names(iris)[1], names(iris)[-1])
compare_predictors(mpg, names(mpg)[3], names(mpg)[-3])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.