Calculates the maximal value of the weight lambda of the L1 penalty term in a Lasso regression. For values >= this value, the null model will be obtained as the result of the penalized regression.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  lambdamax(x, ...)
## S3 method for class 'formula'
lambdamax(formula, nonpen = ~1, data,
weights, subset, na.action, offset, coef.init,
penscale = sqrt, model = LogReg(),
center = NA, standardize = TRUE, contrasts = NULL,
nlminb.opt = list(), ...)
## Default S3 method:
lambdamax(x, y, index, weights = NULL,
offset = rep(0, length(y)), coef.init = rep(0, ncol(x)),
penscale = sqrt, model = LogReg(),
center = NA, standardize = TRUE,
nlminb.opt = list(), ...)

x 
design matrix (including intercept) 
y 
response vector 
formula 

nonpen 

data 

index 
vector which defines the grouping of the
variables. Components sharing the same
number build a group. Nonpenalized coefficients are marked with

weights 
vector of observation weights. 
subset 
an optional vector specifying a subset of observations to be used in the fitting process. 
na.action 
a function which indicates what should happen when the data
contain 
offset 
vector of offset values. 
coef.init 
initial parameter vector. Penalized groups are discarded. 
penscale 
rescaling function to adjust the value of the penalty parameter to the degrees of freedom of the parameter group. See the reference below. 
model 
an object of class 
standardize, center 
logical; see 
contrasts 
an (optional) list with the contrasts for the factors in the model. 
nlminb.opt 
arguments to be supplied to 
... 
additional arguments to be passed to the functions defined
in 
Uses nlminb
to optimize the nonpenalized parameters.
Numerical value of the maximal lambda
Lukas Meier, Seminar f. Statistik, ETH Zurich
1 2 3 
Questions? Problems? Suggestions? Tweet to @rdrrHQ 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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.