enet               package:elasticnet               R Documentation

_F_i_t_s _E_l_a_s_t_i_c _N_e_t _r_e_g_r_e_s_s_i_o_n _m_o_d_e_l_s

_D_e_s_c_r_i_p_t_i_o_n:

     Starting from zero, the LARS-EN algorithm provides the entire
     sequence of coefficients and fits.

_U_s_a_g_e:

     enet(x, y, lambda, max.steps, normalize=TRUE, intercept=TRUE, trace = FALSE, eps = .Machine$double.eps)

_A_r_g_u_m_e_n_t_s:

       x: matrix of predictors 

       y: response  

  lambda: Quadratic penalty parameter. lambda=0 performs the Lasso fit. 

max.steps: Limit the number of steps taken; the default is '50 * min(m,
          n-1)', with m the number of variables, and n the number of
          samples. One can use this option to perform early stopping. 

   trace: If TRUE, prints out its progress 

normalize: Standardize the predictors? 

intercept: Center the predictors? 

     eps: An effective zero 

_D_e_t_a_i_l_s:

     The Elastic Net methodology is described in detail in Zou and
     Hastie (2004). The LARS-EN algorithm computes the complete elastic
     net solution simultaneously for ALL values of the shrinkage
     parameter in the same computational cost as a least squares fit. 
     The structure of enet() is based on lars() coded by Efron and
     Hastie.   Some internel functions from the lars package are
     called.  The user should install lars before using elasticnet
     functions.

_V_a_l_u_e:

     An "enet" object is returned, for which print, plot and predict
     methods exist.

_A_u_t_h_o_r(_s):

     Hui Zou and Trevor Hastie

_R_e_f_e_r_e_n_c_e_s:

     Zou and Hastie (2005) "Regularization and Variable Selection via
     the Elastic Net" _Journal of the Royal Statistical Society, Series
     B, 67, 301-320_.

_S_e_e _A_l_s_o:

     print, plot, and predict methods for enet

_E_x_a_m_p_l_e_s:

     data(diabetes)
     attach(diabetes)
     ##fit the lasso model (treated as a special case of the elastic net)
     object1 <- enet(x,y,lambda=0)
     plot(object1)
     ##fit the elastic net model with lambda=1.
     object2 <- enet(x,y,lambda=1) 
     plot(object2)
     ##early stopping after 50 LARS-EN steps
     object4 <- enet(x2,y,lambda=0.5,max.steps=50)
     plot(object4)
     detach(diabetes)

