covTest (version 1.02)

lars.en: Function to fit least angle regression path of solution for the elastic net.

Description

Function to fit least angle regression path of solution for the elastic net.

Usage

lars.en(x, y, lambda2,normalize=TRUE)

Arguments

x
N by p matrix of predictors
y
N-vector of outcome values
lambda2
Value of L2 penalty parameter
normalize
Should columns of x be standardized?

Value

beta
Matrix whose rows of contain the estimated coefficients for each lambda value
larsobj
Result of call to lars on augmented data
mx
Column means of x
sdx
Column standard deviations of x
normalize
Value of normalize argument in call to lars.en
lambda
Values of lambda used
lambda2
Value of lambda2 used
act
Actions (predictor added) at each step
maxp
Maximum number of predictors entered
call
Call to lars.en

Details

This function estimates the least angle regression path of solution for Ll-penalized (lasso) logistic regression and the Cox proportional hazards model, using the R functions enpath and coxpath. These latter functions use the predictor-corrector strategy devised by Park and Hastie (2007).

References

Zou, H. and Hastie, Trevor (2005) Regularization and Variable Selection via the Elastic Net. JRSSB 301-320,

Park, M. Y. & Hastie, T. (2007). l1-regularization path algorithm for generalized linear models, Journal of the Royal Statistical Society Series B 69(4),

See Also

predict.lars, covTest

Examples

Run this code
set.seed(432)
x=matrix(rnorm(100*10),ncol=10)
x=scale(x,TRUE,TRUE)/sqrt(99)
beta=c(3,rep(0,9))
y=x%*%beta+.4*rnorm(100)
a=lars.en(x,y,lambda2=.5)
  

Run the code above in your browser using DataLab