This function computes objective function's value for the ADMM algorithm.
numerical vector of response. n = length(y_vec) is the number of observations.
numerical matrix of covariates. Each row for one observation and
p = ncol(x_mat)
is the number of covariates.
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
.
a character indicating the penalty types for subgroup identification and variable selection.
"S": SCAD
"M": MCP
"L": Lasso
Default values for both parameters are "S".
numerical vectors providing necessary parameters for the corresponding penalties.
For Lasso, lam = p_param[1]
For SCAD and MCP, lam = p_param[1], gamma = p_param[2]
Default values for both parameters are c(2, 3.7)
.
a length-3 numerical vector, providing the scalars needed in the augmented lagrangian part of the ADMM algorithm
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)
.
variables needed in the objective function
a list containing
loss
: overall loss value
loss_part1
: loss value from regression part
loss_part2
: loss value from subgroup analysis part
loss_part3
: loss value from variable selection part
loss_aug1
: loss value from augmented part1
loss_aug2
: loss value from augmented part2
loss_aug3
: loss value from augmented part3
diff_z
: difference between z_vec
and y_vec - mu_vec - x_mat %*% beta_vec
diff_s
: difference between s_vec
and d_mat %*% mu_vec
diff_w
: difference between w_vec
and beta_vec
The augmented lagrangian objective function for the ADMM algorithm contains
regression part, 1 / const_a * sum(rho(z_vec))
, where rho
is
the loss function. Refer to loss_function
for more details.
subgroup analysis part, const_b * sum(P_1(s_vec))
.
variable selection part, const_c * sum(P_2(w_vec))
.
augmented part1:
r_1 / 2 * norm(y_vec - mu_vec - x_mat * beta - z_vec) ^ 2 + inner_product(y_vec - mu_vec - x_mat * beta - z_vec, q1_vec)
augmented part1:
r_2 / 2 * norm(D_mat * mu_vec - s_vec) ^ 2 + inner_product(D_mat * mu_vec - s_vec, q2_vec)
augmented part1:
r_3 / 2 * norm(beta_vec - w_vec) ^ 2 + inner_product(beta_vec - w_vec, q3_vec)
for "L2" loss, the z_vec
could be eliminated, but currently this
is not implemented.