Learn R Programming

tornado (version 0.1.3)

importance.lm: Linear Model variable importance plot

Description

Linear Model variable importance plot

Usage

# S3 method for lm
importance(model_final, model_null, dict = NA, ...)

Value

an object of type importance_plot

type

the type of importance plot

data

the importance data required for the plot

Arguments

model_final

a model object

model_null

a lm object for the null model

dict

a dictionary to translate the model variables to plotting variables

...

arguments passed to other methods

See Also

importance

Examples

Run this code
gtest <- lm(mpg ~ cyl*wt*hp + gear + carb, data=mtcars)
gtestreduced <- lm(mpg ~ 1, data=mtcars)
imp <- importance(gtest, gtestreduced)
plot(imp)

gtest <- lm(mpg ~ cyl + wt + hp + gear + carb, data=mtcars)
gtestreduced <- lm(mpg ~ 1, data=mtcars)
imp <- importance(gtest, gtestreduced)
plot(imp)

Run the code above in your browser using DataLab