MachineShop (version 2.8.0)

varimp: Variable Importance

Description

Calculate measures of the relative importance of predictors in a model.

Usage

varimp(object, scale = TRUE, ...)

Arguments

object

model fit result.

scale

logical indicating whether importance measures should be scaled to range from 0 to 100.

...

arguments passed to model-specific variable importance functions.

Value

VarImp class object.

See Also

plot

Examples

Run this code
# NOT RUN {
## Requires prior installation of suggested package gbm to run

## Survival response example
library(survival)

gbm_fit <- fit(Surv(time, status) ~ ., data = veteran, model = GBMModel)
(vi <- varimp(gbm_fit))
plot(vi)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab