GLM variable importance plot
Usage
# S3 method for glm
importance(model_final, model_null, dict = NA, ...)
Arguments
- model_final
a model object
- model_null
a glm object for the null model
- dict
a dictionary to translate the model variables to plotting variables
- ...
arguments passed to other methods
Value
an object of type importance_plot
- type
the type of importance plot
- data
the importance data required for the plot
Examples
gtest <- glm(mpg ~ cyl*wt*hp + gear + carb, data=mtcars, family=gaussian)
gtestreduced <- glm(mpg ~ 1, data=mtcars, family=gaussian)
imp <- importance(gtest, gtestreduced)
plot(imp)
gtest <- glm(mpg ~ cyl + wt + hp + gear + carb, data=mtcars, family=gaussian)
gtestreduced <- glm(mpg ~ 1, data=mtcars, family=gaussian)
imp <- importance(gtest, gtestreduced)
plot(imp)
gtest <- glm(vs ~ wt + disp + gear, data=mtcars, family=binomial(link="logit"))
gtestreduced <- glm(vs ~ 1, data=mtcars, family=binomial(link="logit"))
imp <- importance(gtest, gtestreduced)
plot(imp)