Est.ALASSO.GLMNET.CV: A modified wrapper for adaptive lasso with the optimal...

Description Usage Arguments Value Author(s) Examples

View source: R/inner_wrappers.R

Description

Est.ALASSO.GLMNET.CV fits adaptive lasso based on cv.glmnet. The best lambda (penalizing factor) is chosen by 10-fold cross-validation.

Usage

1
2
Est.ALASSO.GLMNET.CV(data, fam0 = "binomial", w.b = NULL, lambda.grid,
  chunksize = 50)

Arguments

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.

Value

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.

Author(s)

Yan Wang, Tianxi Cai

Examples

1
Est.ALASSO.GLMNET.CV(data, fam0="binomial", w.b = NULL, lambda.grid, chunksize = 50)

michaelyanwang/divideconquer documentation built on Aug. 16, 2019, 10:11 a.m.