Construct nomogram ojects for high-dimensional Cox models
Construct nomograms ojects for high-dimensional Cox models
as_nomogram( object, x, time, event, pred.at = NULL, fun.at = NULL, funlabel = NULL )
object
: Model object fitted by hdnom::fit_*()
functions.x
: Matrix of training data used for fitting the model.time
: Survival time. Must be of the same length with the number of rows as x
.event
: Status indicator, normally 0 = alive, 1 = dead. Must be of the same length with the number of rows as x
.pred.at
: Time point at which to plot nomogram prediction axis.fun.at
: Function values to label on axis.funlabel
: Label for fun
axis.The nomogram visualizes the model under the automatically selected "optimal" hyperparameters (e.g. lambda, alpha, gamma).
data(smart) x <- as.matrix(smart[, -c(1, 2)]) time <- smart$TEVENT event <- smart$EVENT y <- survival::Surv(time, event) fit <- fit_lasso(x, y, nfolds = 5, rule = "lambda.1se", seed = 11) nom <- as_nomogram( fit, x, time, event, pred.at = 365 * 2, funlabel = "2-Year Overall Survival Probability" ) print(nom) plot(nom)
Useful links