Description Usage Arguments Value See Also
Performs k-fold cross-validation for the first tuning parameter
of elastic net (lambda) in the same way as cv.glmnet
in the package glmnet
and outputs the selected lambda and the cross-validation errors for individual folds.
1 2 |
X |
The matrix of all predictors. Each row represents a subject and each column represents a feature. |
Y |
The survival time, represented by a |
foldid |
A vector of integers between 1 and |
alpha |
The second tuning parameter in elastic net (α). |
error |
The choice of cross-validation error. Set |
offset |
A vector of offset terms. |
setlambda |
If |
lambda |
The user-supplied sequence of tuning parameters (λ). |
... |
Other arguments that can be passed to |
A list containing results of the cross-validation fit:
cvm |
a vector of mean cross-validation errors over lambda values. |
lambda |
a vector of tuning parameter values. |
df |
a vector of mean numbers of variables selected over lambda values. |
min.cvm |
minimum value of mean cross-validation error. |
lambda.min |
the lambda value corresponding to the minimum (mean) cross-validation error. |
min.pos |
the position of the minimum (mean) cross-validation error in |
all.beta |
a list of estimated regression parameters over the folds. |
all.cvm |
a list of vectors of cross-validation errors over the folds. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.