View source: R/postsurvplots.R
plotImp | R Documentation |
Generic method for plotting variable importance of various models
plotImp(x, drop_zero = FALSE, label_size = 3, ...)
x |
a |
drop_zero |
if |
label_size |
the size of text labels |
... |
for future implementations |
varImp
data(veteran, package="survival") # glmnet gfit1 <- glmnetsurv(Surv(time, status) ~ factor(trt) + karno + diagtime + age + prior , data = veteran , lambda = 0.02 , alpha = 0.8 ) imp1 <- varImp(gfit1, type = "param") plotImp(imp1) imp2 <- varImp(gfit1, type = "variable", newdata = veteran) plotImp(imp2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.