huber.lasso | R Documentation |
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.
huber.lasso(
X,
y,
beta.ini,
lambda,
alpha = 2,
adaptive = TRUE,
intercept = TRUE,
penalty.factor = rep(1, ncol(X))
)
X |
design matrix, standardization is recommended. |
y |
response vector. |
beta.ini |
initial estimates of beta. If not specified, LADLasso estimates from |
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. |
penalty.factor |
can be used to force nonzero coefficients. Default is rep(1, ncol(X)) as in glmnet. |
beta |
the regression coefficient estimates. |
fitted |
predicted response. |
iter.steps |
iteration steps. |
set.seed(2017)
n=200; d=500
X=matrix(rnorm(n*d), nrow=n, ncol=d)
beta=c(rep(2,6), rep(0, d-6))
y=X%*%beta+c(rnorm(150), rnorm(30,10,10), rnorm(20,0,100))
output.HuberLasso=huber.lasso(X,y)
beta.est=output.HuberLasso$beta
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.