Finds the solution path of logistic functional additive regression with log-contrast constrain.
Source:R/opath_solver.R
Logistic_FAR_OPath.Rd
Logistic_FAR_OPath
finds the solution path of logistic functional additive regression
with log-contrast constrain. It will use within-group orthonormalization to
standardize the data before the real computation.
Usage
Logistic_FAR_OPath(
y_vec,
x_mat,
h,
kn,
p,
p_type,
p_param,
lambda_seq,
lambda_length,
min_lambda_ratio = 0.01,
mu2,
a,
bj_vec,
cj_vec,
rj_vec,
delta_init,
eta_stack_init,
mu1_init,
tol = 10^(-6),
max_iter = 500,
verbose = 0,
svd_thresh = 10^(-7)
)
Arguments
- y_vec
response vector, 0 for control, 1 for case. n = length(y_vec) is the number of observations.
- x_mat
covariate matrix, consists of two parts. dim(x_mat) = (n, h + p * kn) First h columns are for demographical covariates(can include an intercept term) Rest columns are for p functional covariates, each being represented by a set of basis functions resulting kn covariates.
- h, kn, p
dimension information for the dataset(
x_mat
).- p_type
an character variable indicating different types of the penalty
- p_param
numerical vector for the penalty function.
p_param[1]
store sthe lambda value and will be provided bylambda_seq
.- lambda_seq
a non-negative sequence of lambda, along which the solution path is searched. It is RECOMMENED to not supply this parameter and let the function itself determines it from the given data.
- lambda_length
length of the lambda sequence when computing
lambda_seq
. Iflambda_seq
is provided, then of courselambda_length = length(lambda_seq)
.- mu2
quadratic term in the ADMM algorithm
- a, bj_vec, cj_vec, rj_vec
parameters for the algorithm. See Algorithm_Details.pdf for more information.
- delta_init, eta_stack_init, mu1_init
initial values for the algorithm.
- tol, max_iter
convergence tolerance and max number of iteration of the algorithm.
- verbose
integer, indicating level of information to be printed during computation, currently supports: always: some info if something went wrong, e.g. when no penalty function is matched 1: information about the start and stop of the iteration 2. How the loss value is changed during each iteration
- svd_thresh
a small value for threashing the singular value vectors.
- min_lam_ratio:
min(lambda_seq) / max{lambda_seq}
. This function uses this parameter to determine the minimal value oflambda_seq
. Ifp > n
, then it is recommended to set this no smaller than 0.01 (sometimes even 0.05), otherwise you can set it to 0.001 or even smaller.