cv.coxpath {glmpath} | R Documentation |
This function computes cross-validated (minus) log-partial-likelihoods
for coxpath.
cv.coxpath(data, method = c("breslow", "efron"), nfold = 5, fraction = seq(from=0, to=1, length=100), mode = c("norm","lambda"), plot.it = TRUE, se = TRUE, ...)
data |
a list consisting of x: a matrix of features, time:
the survival time, and status: censor status with 1 if died
and 0 if censored.
|
method |
approximation method for tied survival times. Approximations derived
by Breslow (1974) and Efron (1977) are available. Default is
breslow.
|
nfold |
number of folds to be used in cross-validation. Default is
nfold=5.
|
fraction |
the fraction of L1 norm or log(λ) with respect to their
maximum values at which the CV errors are computed. Default is
seq(0,1,length=100).
|
mode |
If mode=norm, cross-validation is run at certain values of
L1 norm. If mode=lambda, cross-validation is run at certain
values of log(λ). Default is norm.
|
plot.it |
If TRUE, CV curve is plotted.
|
se |
If TRUE, standard errors are plotted.
|
... |
other options for coxpath |
Mee Young Park and Trevor Hastie
Mee Young Park and Trevor Hastie (2007) L1 regularization path algorithm for generalized linear models. J. R. Statist. Soc. B, 69, 659-677.
coxpath, plot.coxpath, predict.coxpath
data(lung.data) attach(lung.data) cv <- cv.coxpath(lung.data) detach(lung.data)