grouplasso_logreg_grid: Fit grouplasso logistic regression estimator over a grid of...

View source: R/grouplasso.R

grouplasso_logreg_gridR Documentation

Fit grouplasso logistic regression estimator over a grid of lambda values

Description

Fit grouplasso logistic regression estimator over a grid of lambda values

Usage

grouplasso_logreg_grid(
  Y,
  X,
  groups,
  n.lambda,
  lambda.min.ratio,
  lambda.max.ratio = 1,
  w,
  tol = 1e-04,
  maxiter = 500,
  report.prog = FALSE
)

Arguments

Y

the binary response vector

X

matrix containing the design matrices

groups

a vector indicating to which group each covariate belongs

n.lambda

the number of lambda values desired

lambda.min.ratio

ratio of the smallest lambda value to the smallest value of lambda which admits no variables to the model

lambda.max.ratio

ratio of the largest lambda value to the smallest value of lambda which admits no variables to the model

w

group-specific weights for different penalization of different groups

tol

a convergence criterion

maxiter

the maximum allowed number of iterations

report.prog

a logical indicating whether the progress of the algorithm should be printed to the console

Value

a list containing the fits over a grid of lambda values as well as the vector of lambda values

Examples

grouplasso_logreg_data <- get_grouplasso_data(n = 400, response = "binary")

grouplasso_logreg_grid.out <- grouplasso_logreg_grid(Y = grouplasso_logreg_data$Y,
                                                     X = grouplasso_logreg_data$X,
                                                     groups = grouplasso_logreg_data$groups,
                                                     n.lambda = 25,
                                                     lambda.min.ratio = 0.001,
                                                     w = grouplasso_logreg_data$w,
                                                     tol = 1e-3,
                                                     maxiter = 500,
                                                     report.prog = TRUE)

gregorkb/semipadd2pop documentation built on Oct. 2, 2022, 1:37 p.m.