Checks arguments of functions corila() and cv.corila().
Usage
.validate(
x,
y,
group,
primary,
family,
hyper,
alpha_init,
alpha_final,
cor,
foldid,
nfolds,
lambda_init
)Arguments
- x
\(n_0 \times p\) predictor matrix, where \(n_0\) is the number of observations used for model training and \(p\) is the number of variables
- y
\(n_0\)-dimensional response vector, where \(n_0\) is the number of observations used for model training
- group
group structure (three options):
\(p\)-dimensional vector of group indices (in \(\{1, \ldots, q\}\)) or labels,
list with \(q\) slots containing the variable indices (in \(\{1, \ldots, p\}\)) or labels,
\(p \times p\) matrix, where the entry in the \(j^{\text{th}}\) row and the \(k^{\text{th}}\) column indicates whether information should be transferred from the \(j^{\text{th}}\) to the \(k^{\text{th}}\) variable
- primary
\(p\)-dimensional logical vector indicating whether a predictor may be included in the final model (
TRUEfor "primary predictors") or must be excluded from the final model (FALSEfor "auxiliary predictors")- family
character string
"gaussian","binomial","poisson", or"cox"- hyper
list of \(m\)-dimensional vectors or a data frame with \(m\) rows containing candidate values for the regularisation and mixing hyperparameters
- alpha_init
elastic net mixing parameter (\(0 \leq\)
alpha_init\(\leq 1\)) for initial regression (default: ridge penalisation withalpha_init=0); alternative choices are"pearson","spearman", or"kendall"to use initial correlation coefficients (not implemented forfamily="cox"),"multiridge"for multi-penalty ridge regression with one penalty for each group (not implemented forfamily="poisson"or overlapping groups), orNAto set all initial coefficients equal to 1- alpha_final
elastic net mixing parameter for final regression (default: lasso penalisation with
alpha_final=1)- cor
character string
"pearson","spearman"(default), or"kendall"; or \(p \times p\) correlation matrix- foldid
\(n_0\)-dimensional vector containing the fold identifiers
- nfolds
integer specifying the number of folds
- lambda_init
regularisation hyperparameter(s), or
NULL(cross-validation)
Details
This function is called by corila() and cv.corila().
It repeatedly calls .assert().
See also
Use .assert() to validate individual arguments.