glmpath (version 0.98)

cv.coxpath: Computes cross-validated (minus) log-partial-likelihoods for coxpath

Description

This function computes cross-validated (minus) log-partial-likelihoods for coxpath.

Usage

cv.coxpath(data, method = c("breslow", "efron"), nfold = 5,
             fraction = seq(0, 1, length = 100),
             mode = c("norm", "lambda"), plot.it = TRUE, se = TRUE, ...)

Arguments

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(\(\lambda\)) 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(\(\lambda\)). Default is norm.

plot.it

If TRUE, CV curve is plotted.

se

If TRUE, standard errors are plotted.

...

other options for coxpath

References

Mee Young Park and Trevor Hastie (2007) L1 regularization path algorithm for generalized linear models. J. R. Statist. Soc. B, 69, 659-677.

See Also

coxpath, plot.coxpath, predict.coxpath

Examples

Run this code
# NOT RUN {
data(lung.data)
attach(lung.data)
cv <- cv.coxpath(lung.data)
detach(lung.data)
# }

Run the code above in your browser using DataCamp Workspace