View source: R/effective_functions.r
glmImp | R Documentation |
Calculates importance along the lines of Greenwell et al (2018) using partial dependence plots.
glmImp(obj, varname, data, level = 0.95, ci_method = c("perc", "norm"), ...)
obj |
Model object, must be able to use |
varname |
Character string giving the name of the variable whose importance will be calculated. |
data |
A data frame used to estiamte the model. |
level |
Cofidence level used for the confidence interval. |
ci_method |
Character string giving the method for calculating the confidence interval - normal or percentile. |
... |
Other arguments being passed down to |
A data frame of importance measures with optimal bootstrapped confidence intervals.
Greenwell, Brandon M., Bradley C. Boehmke and Andrew J. McCarthy. (2018). “A Simple and Effective Model-Based Variable Importance Measure.” arXiv1805.04755 [stat.ML]
data(gss) mod <- glm(childs ~ sei10 + sex + educ + age, data=gss, family=poisson) g_imp1 <- glmImp(mod, "age", gss)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.