Description Usage Arguments Details Value Author(s) References See Also Examples
Does k-fold cross-validation for cocktail, produces a plot,
and returns a value for lambda
. This function is modified based on the cv
function from the glmnet
package.
1 | cv.cocktail(x,y,d,lambda=NULL,nfolds=5,foldid,...)
|
x |
matrix of predictors, of dimension N*p; each row is an observation vector. |
y |
a survival time for Cox models. Currently tied failure times are not supported. |
d |
censor status with 1 if died and 0 if right censored. |
lambda |
optional user-supplied lambda sequence; default is
|
nfolds |
number of folds - default is 5. Although |
foldid |
an optional vector of values between 1 and |
... |
other arguments that can be passed to cocktail. |
The function runs cocktail
nfolds
+1 times; the
first to get the lambda
sequence, and then the remainder to
compute the fit with each of the folds omitted. The average error and standard deviation over the
folds are computed.
an object of class cv.cocktail
is returned, which is a
list with the ingredients of the cross-validation fit.
lambda |
the values of |
cvm |
the mean cross-validated error - a vector of length
|
cvsd |
estimate of standard error of |
cvup |
upper curve = |
cvlo |
lower curve = |
nzero |
number of non-zero coefficients at each |
name |
a text string indicating partial likelihood (for plotting purposes). |
cocktail.fit |
a fitted |
lambda.min |
The optimal value of |
lambda.1se |
The largest value of |
Yi Yang and Hui Zou
Maintainer: Yi Yang <yi.yang6@mcgill.ca>
Yang, Y. and Zou, H. (2013),
"A Cocktail Algorithm for Solving The Elastic Net Penalized Cox's Regression in High Dimensions", Statistics and Its Interface, 6:2, 167-173.
https://github.com/emeryyi/fastcox
Friedman, J., Hastie, T., and Tibshirani, R. (2010), "Regularization paths for generalized
linear models via coordinate descent," Journal of Statistical Software, 33, 1.
http://www.jstatsoft.org/v33/i01/
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.