varimp.logistic: A function to report variable importance after glm() or...

Description Usage Arguments Value Methods (by class) Examples

View source: R/importance.R

Description

This function reports standardized coefficients and ranks variable by importance: The coefficients of continuous variables are standardized to a two standard deviation change of the variable. The coefficients for factor variables are left unchanged. This follows the procedure suggested by Andrew Gelman in "Scaling regression inputs by dividing by two standard deviations," Statistics in Medicine (2008), Vol. 27, pp. 2965-2873. The function takes as inputs models created by glm or caret using glm

Usage

1
2
3
4
5
6
7
varimp.logistic(modelFit)

## S3 method for class 'glm'
varimp.logistic(modelFit)

## S3 method for class 'train'
varimp.logistic(modelFit)

Arguments

modelFit

reguired: estimated/trained glm model

Value

A tibble with variable, var_imp, p_value, factor, OR_std, OR_sd_perc

Methods (by class)

Examples

1
2
varimp.logistic(logit1)
varimp.logistic(logitFit)

fzettelmeyer/mktg482 documentation built on May 26, 2020, 2:26 p.m.