hdnom.external.validate: Externally Validate High-Dimensional Cox Models with...

Description Usage Arguments References Examples

View source: R/05-hdnom-external-validate.R

Description

Externally Validate High-Dimensional Cox Models with Time-Dependent AUC

Usage

1
2
hdnom.external.validate(object, x, time, event, x_new, time_new, event_new,
  tauc.type = c("CD", "SZ", "UNO"), tauc.time)

Arguments

object

Model object fitted by hdcox.*() functions.

x

Matrix of training data used for fitting the model.

time

Survival time of the training data. Must be of the same length with the number of rows as x.

event

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

x_new

Matrix of predictors for the external validation data.

time_new

Survival time of the external validation data. Must be of the same length with the number of rows as x_new.

event_new

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

tauc.type

Type of time-dependent AUC. Including "CD" proposed by Chambless and Diao (2006)., "SZ" proposed by Song and Zhou (2008)., "UNO" proposed by Uno et al. (2007).

tauc.time

Numeric vector. Time points at which to evaluate the time-dependent AUC.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
library("survival")

# Load imputed SMART data
data(smart)
# Use the first 1000 samples as training data
# (the data used for internal validation)
x = as.matrix(smart[, -c(1, 2)])[1:1000, ]
time = smart$TEVENT[1:1000]
event = smart$EVENT[1:1000]

# Take the next 1000 samples as external validation data
# In practice, usually use data collected in other studies
x_new = as.matrix(smart[, -c(1, 2)])[1001:2000, ]
time_new = smart$TEVENT[1001:2000]
event_new = smart$EVENT[1001:2000]

# Fit Cox model with lasso penalty
fit = hdcox.lasso(
  x, Surv(time, event),
  nfolds = 5, rule = "lambda.1se", seed = 11)

# External validation with time-dependent AUC
val.ext = hdnom.external.validate(
  fit, x, time, event,
  x_new, time_new, event_new,
  tauc.type = "UNO",
  tauc.time = seq(0.25, 2, 0.25) * 365)

print(val.ext)
summary(val.ext)
plot(val.ext)

road2stat/hdnom documentation built on July 2, 2018, 9:33 a.m.