compare_by_validate {hdnom} | R Documentation |
Compare high-dimensional Cox models by model validation
Description
Compare high-dimensional Cox models by model validation
Usage
compare_by_validate(
x,
time,
event,
model.type = c("lasso", "alasso", "flasso", "enet", "aenet", "mcp", "mnet", "scad",
"snet"),
method = c("bootstrap", "cv", "repeated.cv"),
boot.times = NULL,
nfolds = NULL,
rep.times = NULL,
tauc.type = c("CD", "SZ", "UNO"),
tauc.time,
seed = 1001,
trace = TRUE
)
Arguments
x |
Matrix of training data used for fitting the model; on which to run the validation. |
time |
Survival time.
Must be of the same length with the number of rows as |
event |
Status indicator, normally 0 = alive, 1 = dead.
Must be of the same length with the number of rows as |
model.type |
Model types to compare. Could be at least two
of |
method |
Validation method.
Could be |
boot.times |
Number of repetitions for bootstrap. |
nfolds |
Number of folds for cross-validation and repeated cross-validation. |
rep.times |
Number of repeated times for repeated cross-validation. |
tauc.type |
Type of time-dependent AUC.
Including |
tauc.time |
Numeric vector. Time points at which to evaluate the time-dependent AUC. |
seed |
A random seed for cross-validation fold division. |
trace |
Logical. Output the validation progress or not.
Default is |
References
Chambless, L. E. and G. Diao (2006). Estimation of time-dependent area under the ROC curve for long-term risk prediction. Statistics in Medicine 25, 3474–3486.
Song, X. and X.-H. Zhou (2008). A semiparametric approach for the covariate specific ROC curve with survival outcome. Statistica Sinica 18, 947–965.
Uno, H., T. Cai, L. Tian, and L. J. Wei (2007). Evaluating prediction rules for t-year survivors with censored regression models. Journal of the American Statistical Association 102, 527–537.
Examples
data(smart)
x <- as.matrix(smart[, -c(1, 2)])[1:1000, ]
time <- smart$TEVENT[1:1000]
event <- smart$EVENT[1:1000]
# Compare lasso and adaptive lasso by 5-fold cross-validation
cmp.val.cv <- compare_by_validate(
x, time, event,
model.type = c("lasso", "alasso"),
method = "cv", nfolds = 5, tauc.type = "UNO",
tauc.time = seq(0.25, 2, 0.25) * 365, seed = 1001
)
print(cmp.val.cv)
summary(cmp.val.cv)
plot(cmp.val.cv)
plot(cmp.val.cv, interval = TRUE)