plotImp: Generic method for plotting variable importance of various...

View source: R/postsurvplots.R

plotImpR Documentation

Generic method for plotting variable importance of various models

Description

Generic method for plotting variable importance of various models

Usage

plotImp(x, drop_zero = FALSE, label_size = 3, ...)

Arguments

x

a glmnetsurv object.

drop_zero

if TRUE only nonzero estimates are shown.

label_size

the size of text labels

...

for future implementations

See Also

varImp

Examples


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)


CYGUBICKO/glmnetpostsurv documentation built on Sept. 1, 2022, 7:26 p.m.