ladlassopath | R Documentation |
ladlassopath computes the LAD-Lasso regularization path (over grid of penalty parameter values). Uses IRWLS algorithm.
ladlassopath(y, X, L = 120, eps = 0.001, intcpt = T, reltol = 1e-06, printitn = 0)
y |
: Numeric data vector of size N x 1 (output, respones) |
X |
: Numeric data matrix of size N x p. Each row represents one observation, and each column represents one predictor (feature). |
L |
: Positive integer, the number of lambda values EN/Lasso uses. Default is L=120. |
reltol |
: Convergence threshold for IRWLS. Terminate when successive estimates differ in L2 norm by a rel. amount less than reltol. |
intcpt: |
Logical (true/false) flag to indicate if intercept is in the regression model |
eps: |
Positive scalar, the ratio of the smallest to the largest Lambda value in the grid. Default is eps = 10^-3. |
printitn: |
print iteration number (default = 0, no printing) |
B : Fitted LAD-Lasso regression coefficients, a p-by-(L+1) matrix, where p is the number of predictors (columns) in X, and L is the number of Lambda values. If intercept is in the model, then B is (p+1)-by-(L+1) matrix, with first element the intercept.
stats : structure with following fields: Lambda = lambda parameters in ascending order MeAD = Mean Absolute Deviation (MeAD) of the residuals gBIC = generalized Bayesian information criterion (gBIC) value for each lambda parameter on the grid.
File in Regression.R
ladlassopath(rnorm(5), matrix(rnorm(5)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.