data("smart")
x <- as.matrix(smart[, -c(1, 2)])[1:120, ]
time <- smart$TEVENT[1:120]
event <- smart$EVENT[1:120]
y <- survival::Surv(time, event)
fit <- fit_flasso(
x, y,
lambda1 = c(1, 10), lambda2 = c(0.01),
nfolds = 3, seed = 11
)
nom <- as_nomogram(
fit, x, time, event,
pred.at = 365 * 2,
funlabel = "2-Year Overall Survival Probability"
)
plot(nom)
Run the code above in your browser using DataLab