Learn R Programming

tornado (version 0.1.3)

importance.survreg: Create a variable importance plot for a survreg model

Description

Create a variable importance plot for a survreg model

Usage

# S3 method for survreg
importance(model_final, model_data, dict = NA, nperm = 500, ...)

Value

an object of type importance_plot

type

the type of importance plot

data

the importance data required for the plot

Arguments

model_final

a model object

model_data

the data used to fit the model

dict

a plotting dictionary for models terms

nperm

the number of permutations used to calculate the importance

...

arguments passed to other methods

See Also

importance

Examples

Run this code
model_final <- survival::survreg(survival::Surv(futime, fustat) ~ ecog.ps*rx + age,
                       data = survival::ovarian,
                       dist = "weibull")
imp <- importance(model_final, survival::ovarian, nperm = 50)
plot(imp)

Run the code above in your browser using DataLab