Design matrix: N by p matrix of p explanatory variables
y
vector of 1 response variable for N observations
XtX
X'X, could be given together with X'y instead of X and y
Xty
X'y, could be given together with X'X instead of X and y
lambda
(Non-negative) regularization parameter for lasso. lambda=0 means no regularization.
thr
Threshold for convergence. Default value is 1e-4. Iterations stop when max absolute parameter change is less than thr
maxit
Maximum number of iterations of outer loop. Default 10,000
nopenalize
List of coefficients not to penalize starting at 0
penaltyweight
p weights, one per variable, will be multiplied by overall lambda penalty
trace
Level of detail for printing out information as iterations proceed.
Default 0 – no information
...
Reserved for experimental options
Details
Estimates a sparse regression coefficient vector using a lasso (L1) penalty
using the approach of cyclic coordinate descent. See references for details.
The solver does NOT include an intercept, add a column of ones to x if your data is not centered.
Value
A list with components
coefficients
Estimated regression coefficient vector
iterations
Number of iterations of outer loop used by algorithm