Description Usage Arguments Examples
View source: R/10hdnomcomparecalibrate.R
Compare HighDimensional Cox Models by Model Calibration
1 2 3 4 5 
x 
Matrix of training data used for fitting the model; on which to run the calibration. 
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 
Calibration method.
Could be 
boot.times 
Number of repetitions for bootstrap. 
nfolds 
Number of folds for crossvalidation and repeated crossvalidation. 
rep.times 
Number of repeated times for repeated crossvalidation. 
pred.at 
Time point at which calibration should take place. 
ngroup 
Number of groups to be formed for calibration. 
seed 
A random seed for crossvalidation fold division. 
trace 
Logical. Output the calibration progress or not.
Default is 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  # Load imputed SMART data
data(smart)
x = as.matrix(smart[, c(1, 2)])
time = smart$TEVENT
event = smart$EVENT
# Compare lasso and adaptive lasso by 5fold crossvalidation
cmp.cal.cv = hdnom.compare.calibrate(
x, time, event,
model.type = c("lasso", "alasso"),
method = "fitting",
pred.at = 365 * 9, ngroup = 5, seed = 1001)
print(cmp.cal.cv)
summary(cmp.cal.cv)
plot(cmp.cal.cv)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.