Description Usage Arguments References Examples

View source: R/09-hdnom-compare-validate.R

Compare High-Dimensional Cox Models by Model Validation

1 2 3 4 5 | ```
hdnom.compare.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)
``` |

`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 |

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.

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)])[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 = hdnom.compare.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)
``` |

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.