cglasso: Fit a linearly constrained linear regression model with group...

Description Usage Arguments Value

View source: R/constraintsReg.R

Description

Fit a linearly constrained regression model with group lasso regularization.

Usage

1
2
3
4
5
6
7
cglasso(y, Z, Zc = NULL, k, W = rep(1, times = p), intercept = TRUE,
        A =  kronecker(matrix(1, ncol = p), diag(k)), b = rep(0, times = k),
        u = 1, mu_ratio = 1.01,
        lam = NULL, nlam = 100,lambda.factor = ifelse(n < p1, 0.05, 0.001),
        dfmax = p, pfmax = min(dfmax * 1.5, p), tol = 1e-8,
        outer_maxiter = 1e+6, outer_eps = 1e-8,
        inner_maxiter = 1e+4, inner_eps = 1e-8)

Arguments

y

respones vector with length n.

Z

design matrix of dimension n*p1.

Zc

design matrix for unpenalized variables. Default value is NULL.

k

the group size in Z. The number of groups is p = p1 / k .

W

a vector in length p (the total number of groups), or a matrix with dimension p1*p1. Default value is rep(1, times = p).

  • a vector of penalization weights for the groups of coefficients. A zero weight implies no shrinkage.

  • a diagonal matrix with positive diagonal elements.

intercept

Boolean, specifying whether to include an intercept. Default is TRUE.

A, b

linear equalities of the form Aβ_{p1} = b, where b is a vector with length k, and A is a k*p1 matrix. Default values: b is a vector of 0's and
A = kronecker(matrix(1, ncol = p), diag(k)).

u

the inital value of the penalty parameter of the augmented Lagrange method adopted in the outer loop. Default value is 1.

mu_ratio

the increasing ratio of the penalty parameter u. Default value is 1.01. Inital values for scaled Lagrange multipliers are set as 0's. If mu_ratio < 1, the program automatically set the initial penalty parameter u as 0 and outer_maxiter as 1, indicating that there is no linear constraint.

lam

a user supplied lambda sequence. If lam is provided as a scaler and nlam>1, lam sequence is created starting from lam. To run a single value of lam, set nlam=1. The program will sort user-defined lambda sequence in decreasing order.

nlam

the length of the lam sequence. Default is 100. No effect if lam is provided.

lambda.factor

the factor for getting the minimal lambda in lam sequence, where min(lam) = lambda.factor * max(lam). max(lam) is the smallest value of lam for which all penalized group are 0's. If n >= p1, the default is 0.001. If n < p1, the default is 0.05.

dfmax

limit the maximum number of groups in the model. Useful for handling very large p, if a partial path is desired. Default is p.

pfmax

limit the maximum number of groups ever to be nonzero. For example once a group enters the model along the path, no matter how many times it re-enters the model through the path, it will be counted only once. Default is min(dfmax*1.5, p).

tol

tolerance for coefficient to be considered as non-zero. Once the convergence criterion is satisfied, for each element β_j in coefficient vector β, β_j = 0 if β_j < tol.

outer_maxiter, outer_eps

outer_maxiter is the maximun number of loops allowed for the augmented Lagrange method; and outer_eps is the corresponding convergence tolerance.

inner_maxiter, inner_eps

inner_maxiter is the maximum number of loops allowed for blockwise-GMD; and inner_eps is the corresponding convergence tolerance.

Value

A list of

beta

a matrix of coefficients.

lam

the sequence of lambda values.

df

a vector, the number of nonzero groups in estimated coefficients for Z at each value of lambda.

npass

total number of iteration.

error

a vector of error flag.


jiji6454/compReg documentation built on Feb. 5, 2021, 2:20 p.m.