cv.grpsurv {grpreg} | R Documentation |
Performs k-fold cross validation for penalized Cox regression models with grouped covariates over a grid of values for the regularization parameter lambda.
cv.grpsurv(X, y, group, ..., nfolds=10, seed, cv.ind, returnY=FALSE, trace=FALSE)
X |
The design matrix, as in |
y |
The response matrix, as in |
group |
The grouping vector, as in |
... |
Additional arguments to |
nfolds |
The number of cross-validation folds. Default is 10. |
seed |
You may set the seed of the random number generator in order to obtain reproducible results. |
cv.ind |
Which fold each observation belongs to. By default the
observations are randomly assigned by |
returnY |
Should |
trace |
If set to TRUE, cv.grpsurv will inform the user of its progress by announcing the beginning of each CV fold. Default is FALSE. |
The function calls grpsurv
nfolds
times, each time
leaving out 1/nfolds
of the data. Because of the
semiparametric nature of Cox regression, cross-validation is not
clearly defined. cv.grpsurv
uses the approach of calculating
the full Cox partial likelihood using the cross-validated set of
linear predictors. Unfortunately, using this approach there is no
clear way (yet) of determining standard errors, so cv.grpsurv
,
unlike cv.grpreg
, does not provide any.
Other approaches to cross-validation for the Cox regression model have
been proposed; the strenghts and weaknesses of the various methods for
penalized regression in the Cox model are not well understood.
Because of this, the approach used by cv.grpsurv
may change in
the future as additional research is carried out.
An object with S3 class "cv.grpsurv"
inheriting from
"cv.grpreg"
and containing:
cve |
The error for each value of |
lambda |
The sequence of regularization parameter values along which the cross-validation error was calculated. |
fit |
The fitted |
min |
The index of |
lambda.min |
The value of |
null.dev |
The cross-validated deviance for the first model along
the grid of |
Patrick Breheny <patrick-breheny@uiowa.edu>
Verweij PJ and van Houwelingen HC. (1993) Cross-validation in survival analysis. Statistics in Medicine, 12: 2305-2314.
grpsurv
,
plot.cv.grpreg
,
summary.cv.grpreg
data(Lung) X <- Lung$X y <- Lung$y group <- Lung$group cvfit <- cv.grpsurv(X, y, group) plot(cvfit) coef(cvfit) plot(cvfit$fit) plot(cvfit, type="rsq")