glmImp: Importace Measure for Generalized Linear Models

View source: R/effective_functions.r

glmImpR Documentation

Importace Measure for Generalized Linear Models

Description

Calculates importance along the lines of Greenwell et al (2018) using partial dependence plots.

Usage

glmImp(obj, varname, data, level = 0.95, ci_method = c("perc", "norm"), ...)

Arguments

obj

Model object, must be able to use predict(obj, type="terms").

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 aveEffPlot from the DAMisc package.

Value

A data frame of importance measures with optimal bootstrapped confidence intervals.

References

Greenwell, Brandon M., Bradley C. Boehmke and Andrew J. McCarthy. (2018). “A Simple and Effective Model-Based Variable Importance Measure.” arXiv1805.04755 [stat.ML]

Examples

 
data(gss)
mod <- glm(childs ~ sei10 + sex + educ + age, 
            data=gss, family=poisson)
g_imp1 <- glmImp(mod, "age", gss)


psre documentation built on Aug. 8, 2022, 5:05 p.m.

Related to glmImp in psre...