Compare High-Dimensional Cox Models by Model Calibration

Description

Compare High-Dimensional Cox Models by Model Calibration

Usage

1
2
3
4
5
hdnom.compare.calibrate(x, time, event, model.type = c("lasso", "alasso",
  "flasso", "enet", "aenet", "mcp", "mnet", "scad", "snet"),
  method = c("fitting", "bootstrap", "cv", "repeated.cv"),
  boot.times = NULL, nfolds = NULL, rep.times = NULL, pred.at,
  ngroup = 5, seed = 1001, trace = TRUE)

Arguments

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 x.

event

Status indicator, normally 0 = alive, 1 = dead. Must be of the same length with the number of rows as x.

model.type

Model types to compare. Could be at least two of "lasso", "alasso", "flasso", "enet", "aenet", "mcp", "mnet", "scad", or "snet".

method

Calibration method. Could be "bootstrap", "cv", or "repeated.cv".

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.

pred.at

Time point at which calibration should take place.

ngroup

Number of groups to be formed for calibration.

seed

A random seed for cross-validation fold division.

trace

Logical. Output the calibration progress or not. Default is TRUE.

Examples

 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 5-fold cross-validation
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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.