Learn R Programming

MTE (version 1.0.0)

huber.lasso: Huber-Lasso estimator

Description

This function is L1 penalized Huber estimator for linear regression under both fixed and high-dimensional settings. Currently, the function does not support automatic selection of huber tuning parameter.

Usage

huber.lasso(y, X, beta.ini, lambda, alpha = 2, adaptive = T,
  intercept = FALSE)

Arguments

y

response vector.

X

design matrix, standardization is recommended.

beta.ini

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

lambda

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

alpha

1/alpha is the huber tuning parameter. Larger alpha results in smaller portion of squared loss.

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

Run this code
# NOT RUN {
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.HuberLasso=huber.lasso(y,X, beta.ini=LAD(y, X), lambda=0.2, adaptive=TRUE)
beta.est=output.HuberLasso$beta

# }

Run the code above in your browser using DataLab