Description Usage Arguments Value Author(s) Examples
View source: R/inner_wrappers.R
Est.ALASSO.GLMNET.CV
fits adaptive lasso based on cv.glmnet. The best lambda (penalizing factor) is chosen by 10-fold cross-validation.
1 2 | Est.ALASSO.GLMNET.CV(data, fam0 = "binomial", w.b = NULL, lambda.grid,
chunksize = 50)
|
data |
matrix or data frame. For non-survival outcome, first column = response, rest = design matrix. For continuous-time survival outcome, first column = time, second column = delta (0/1), rest = design matrix. |
fam0 |
family of the response, taking "binomial", "Poisson", "Cox" |
w.b |
w.b used to penalize adaptive lasso. If null, a glm/Cox model will be fitted and 1/abs(coefficients) will be used as w.b |
lambda.grid |
the grid of lambda to put into glmnet |
chunksize |
The prediction step in cv.glmnet could take a large amount of memory. chunksize specifies how many chunks you would like to split the prediction step. The predition step will be run in a loop if chunksize>1. |
a list containing two arguments: bhat.cv adaptive lasso estimator using 10-fold cross-validation; lambda.cv is the optimal lambda chosen by cross-validation.
Yan Wang, Tianxi Cai
1 | Est.ALASSO.GLMNET.CV(data, fam0="binomial", w.b = NULL, lambda.grid, chunksize = 50)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.