EMlasso: EM algorithm for lasso penalty

Description Usage Arguments Value Author(s) See Also Examples

Description

EM algorithm for lasso penalty

Usage

1
2
3
EMlasso(X, y, lambda, maxSteps = 1000, intercept = TRUE,
  model = c("linear", "logistic"), burn = 50, threshold = 1e-08,
  eps = 1e-05, epsCG = 1e-08)

Arguments

X

the matrix (of size n*p) of the covariates.

y

a vector of length n with the response.

lambda

a sequence of l1 penalty regularization term. If no sequence is provided, the function computes his own sequence.

maxSteps

Maximal number of steps for EM algorithm.

intercept

If TRUE, there is an intercept in the model.

model

"linear" or "logistic"

burn

Number of steps before thresholding some variables to zero.

threshold

Zero tolerance. Coefficients under this value are set to zero.

eps

Epsilon for the convergence of the EM algorithm.

epsCG

Epsilon for the convergence of the conjugate gradient.

Value

A list containing :

step

Vector containing the number of steps of the algorithm for every lambda.

variable

List of vector of the same length as lambda. The i-th item contains the index of non-zero coefficients for the i-th lambda value.

coefficient

List of vector of the same length as lambda. The i-th item contains the non-zero coefficients for the i-th lambda value.

lambda

Vector containing the lambda values.

mu

Intercept.

Author(s)

Quentin Grimonprez, Serge Iovleff

See Also

EMcvlasso

Examples

1
2
3
4
dataset=simul(50,100,0.4,1,10,matrix(c(0.1,0.9,0.02,0.02),nrow=2))
result=EMlasso(dataset$data,dataset$response)
# Obtain estimated coefficient in matrix format
coefficient = listToMatrix(result)


Search within the HDPenReg package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.