LADlasso: LAD-Lasso for Linear Regression

Description Usage Arguments Value Examples

View source: R/LAD.R

Description

LAD-Lasso for Linear Regression

Usage

1
LADlasso(y, X, beta.ini, lambda, adaptive = TRUE, intercept = FALSE)

Arguments

y

reponse vector

X

design matrix, standardization is recommended.

beta.ini

initial estimates of beta. Using unpenalized LAD is recommended under high-dimensional setting.

lambda

regularization parameter of Lasso or adaptive Lasso (if adaptive=TRUE).

adaptive

logical input that indicates if adaptive Lasso is used. Default is TRUE.

intercept

logical input that indicates if intercept needs to be estimated. Default is FALSE.

Value

beta

the regression coefficient estimates.

fitted

predicted response.

iter.steps

iteration steps.

Examples

1
2
3
4
5
6
7
set.seed(2017)
n=200; d=50
X=matrix(rnorm(n*d), nrow=n, ncol=d)
beta=c(rep(2,6), rep(0, 44))
y=X%*%beta+c(rnorm(150), rnorm(30,10,10), rnorm(20,0,100))
output.LADLasso=LADlasso(y,X, beta.ini=LAD(y, X), lambda=0.2, adaptive=TRUE)
beta.est=output.LADLasso$beta

MTE documentation built on May 2, 2019, 5:57 a.m.

Related to LADlasso in MTE...