This function performs cross-validation and returns the optimal values of the tuning parameters.
cv.emBayes(
y,
clin = NULL,
X,
W = NULL,
nt = NULL,
group = NULL,
quant,
t0,
t1,
k,
func,
error = 0.01,
maxiter = 100
)A list with components:
the optimal spike scale under check loss.
the optimal slab scale under check loss.
the optimal slab scale under least squares loss.
the optimal slab scale under least squares loss.
the optimal slab scale under SIC.
the optimal slab scale under SIC.
cross-validation error matrix under check loss.
cross-validation error matrix under least squares loss.
cross-validation error matrix under SIC.
a vector of response variable.
a matrix of clinical factors. It has default value NULL.
a matrix of genetic factors.
a matrix of random factors.
a vector of number of repeated measurements for each subject. They can be same or different.
a vector of group sizes. They can be same or different.
value of quantile.
a user-supplied sequence of the spike scale \(s_{0}\).
a user-supplied sequence of the slab scale \(s_{1}\).
number of folds for cross-validation.
methods to perform variable selection. Four choices are available. For non longitudinal analysis: "ssLASSO" and "ssQLASSO". For longitudinal varying-coefficient analysis: "ssVCM" and "ssQVCM".
cutoff value for determining convergence. The algorithm reaches convergence if the difference in the expected log-likelihood of two iterations is less than the value of error. The default value is 0.01.
the maximum number of iterations that is used in the estimation algorithm. The default value is 200.
When performing cross-validation for emBayes, function cv.emBayes returns two sets of optimal tuning parameters and their corresponding cross-validation error matrices. The spike scale parameter \(CL.s0\) and the slab scale parameter \(CL.s1\) are obtained based on the quantile check loss. The spike scale parameter \(SL.s0\) and the slab scale parameter \(SL.s1\) are obtained based on the least squares loss. The spike scale parameter \(SIC.s0\) and the slab scale parameter \(SIC.s1\) are obtained based on the Schwarz Information Criterion (SIC). Corresponding error matrices \(CL.CV\), \(SL.CV\) and \(SIC.CV\) can also be obtained from the output.
Schwarz Information Criterion has the following form: $$SIC=\log\sum_{i=1}^nL(y_i-\hat{y_i})+\frac{\log n}{2n}edf$$ where \(L(\cdot)\) is the check loss and \(edf\) is the number of close to zero residuals \((\leq 0.001)\). For non-robust method “ssLASSO”, one should use least squares loss for tuning selection. For robust method “ssQLASSO”, one can either use quantile check loss or SIC for tuning selection. We suggest using SIC, since it has been extensively utilized for tuning selection in high-dimensional quantile regression, as documented in numerous literature sources.