an object of class "formula"; a symbolic description of the model to be fitted.
data
an optional data frame, list or environment containg the variables in the model. If not specified, the variables are taken from the current environment.
varsel
a method of variable selection to be used. The default is "FALSE". Available methods include: stepwise regression "step", LASSO "lasso", elastic net"enet".
criterion
when varsel="step", criterion allows to select a method of calculating statistic for model comparison. The default is "AIC". Less liberal, BIC penalty can be used by typing "BIC".
direction
the mode of stepwise search, can be one of "both", "backward", or "forward", with a default of "both". If the scope argument is missing the default for direction is "backward".
indices
vector of 0 and 1 values indicating which observations are to be used as train and test when varsel="lasso" or "enet".
train
if indices=NULL, the function will randomly assign observations as train and test. train specifies what percentage of data will be used as train observations. Can take values from 0.1 to 0.9.
family
a description of the error distribution and link function to be used in the model. This can be a character string naming a family function.
enet.alpha
The elastic net mixing parameter, with 0=a= 1. The penalty is defined as
(1-a)/2||β||_{2}^2+a||β||_1
alpha=1 is the lasso penalty, and alpha=0 the ridge penalty. The default value is 0.5.
Value
A "glmsel" object is returned, for which print, plot and summary methods can be used.