| lambdamax {grplasso} | R Documentation |
Determines the value of the penalty parameter lambda when the first penalized parameter group enters the model.
lambdamax(x, ...)
## S3 method for class 'formula'
lambdamax(formula, nonpen = ~1, data, weights, subset,
na.action, coef.init, penscale = sqrt, model = LogReg(),
center = TRUE, standardize = TRUE, contrasts = NULL,
nlminb.opt = list(), ...)
## Default S3 method:
lambdamax(x, y, index, weights = rep(1, length(y)),
offset = rep(0, length(y)), coef.init = rep(0, ncol(x)),
penscale = sqrt, model = LogReg(), center = TRUE,
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. Non-penalized 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 'NA's. |
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 |
center |
logical. If true, the columns of the design matrix will be centered (except a possible intercept column). |
standardize |
logical. If true, the design matrix will be blockwise orthonormalized, such that for each block X^TX = n 1 (*after* possible centering). |
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 non-penalized parameters.
An object of type numeric is returned.
data(splice)
lambdamax(y ~ ., data = splice, model = LogReg(), center = TRUE,
standardize = TRUE)