varImp.glmnetsurv: Compute variable importance of glmnetsurv object

varImp.glmnetsurvR Documentation

Compute variable importance of glmnetsurv object

Description

Compute variable importance of glmnetsurv object

Usage

## S3 method for class 'glmnetsurv'
varImp(object, show_sign = FALSE, scale = FALSE, ...)

Arguments

object

fitted glmnetsurv object.

show_sign

if FALSE, the absolute value of coefficients are used. If TRUE estimated model estimated coefficients are used.

scale

if TRUE the scores are divided by the absolute sum of the coefficients.

...

not implemented.

Details

If show_sign = FALSE the absolute value of the coefficients corresponding the tuned model are used otherwise, the estimated coefficients are used.

See Also

plot.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)
print(imp1)
imp2 <- varImp(gfit1, show_sign = TRUE, scale = TRUE)
print(imp2)


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