This function computes the values of lam1_max or lam2_max which
can shrink same type of covariates to the same value.
For beta, they will be shrinked to 0. For mu, the final value
is determined by the type of loss function. Please refer to RSAVS_Get_Psi
for more details. Basically, we have
$$
\mu_0 = \mathrm{argmin}_{\mu} \sum_i\rho(y_i - \mu)
$$
and
$$
psi\_vec = (\psi(y_1 - \mu_0), \cdots, \psi(y_n - \mu_0))
$$
where \(\psi = \partial \rho\).
RSAVS_Get_Lam_Max(
y_vec,
x_mat,
l_type = "L1",
l_param = NULL,
lam_ind = 1,
const_abc = rep(1, 3),
eps = 10^(-6)
)numeric vector, the response
numeric matrix, the covariate matrix
character string, type of loss function.
"L1": l-1 loss(absolute value loss)
"L2": l-2 loss(squared error loss)
"Huber": Huber loss. Its parameter is given in l_param.
Default value is "L1".
numeric vector containing necessary parameters of the corresponding loss function.
The default value is NULL.
integer, indicating computation for mu or beta.
1: compute lam_max for mu.
2: compute lam_max for beta.
a length-3 numeric vector, providing the scalars to adjust weight
of regression function, penalty for subgroup identification and penalty for
variable selection in the overall objective function. Defaults to c(1, 1, 1).
a samll safe guard constant
lam_max, a numerical variable
For convex penalty like lasso, this lam_max can guarantee the global
condition for shrinking the corresponding variables to the same value. For non-convex
penalties such as SCAD and MCP, this is just a local condition.