ladlasso: ladlasso

View source: R/regression_ladlasso.R

ladlassoR Documentation

ladlasso

Description

ladlasso computes the LAD-Lasso regression estimates for given complex- or real-valued data. If number of predictors, p, is larger than one, then IRWLS algorithm is used, otherwise a weighted median algorithm (N > 200) or elemental fits (N<200).

Usage

ladlasso(y, X, lambda, intcpt = T, b0 = NULL, reltol = 1e-08,
  printitn = 0, iter_max = 2000)

Arguments

y

numeric response N x 1 vector (real/complex)

X

sparse matrix, numeric feature N x p matrix (real/complex)

lambda

numeric, non-negative penalty parameter

intcpt

numeric optional initial start of the regression vector for IRWLS algorithm. If not given, we use LSE (when p>1).

b0

numeric optional initial start of the regression vector for IRWLS algorithm. If not given, we use LSE (when p>1).

reltol

Convergence threshold for IRWLS. Terminate when successive estimates differ in L2 norm by a rel. amount less than reltol.

printitn

print iteration number (default = 0, no printing)

iter_max

number of iterations
default = 2000

Value

b1: numeric, the regression coefficient vector of size N

iter: integer, number of iterations

Note

File location: regression_ladlasso.R

Examples


ladlasso(rnorm(8), matrix(rnorm(8*3)*5+1, 8, 3), 0.5)


Mufabo/Rrobustsp documentation built on June 11, 2022, 10:41 p.m.