Skip to contents

This function picks a best estimation from a CV solution path.

Usage

CV_Pick(
  y_vec,
  x_mat,
  cv_solution_path,
  real_logit_vec,
  kn,
  complex_bound,
  cv_1se = FALSE
)

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.

cv_solution_path

A solution path and related cross validation information. This is the result from Logistic_FAR_CV_opath, Logistic_FAR_CV_opath_par or Logistic_FAR_CV_Path.

real_logit_vec

Not used in this function

kn

number of basis functions for each functional covariates.

complex_bound

The upper bound for number of active functional covariates to be considered. If missing, the whole path will be considered.

cv_1se

Logical. Whether the 1se strategy be applied.

Details

Although the solver function will always return with a selected lambda This function offers more selecting options.

1se Strategy

largest value of lambda such that error is within 1 standard error of the maximum likelihood based on CV