Description Usage Arguments Details Value Examples
Performing crossvalidation of lme1en (extension of inputs)
1 2 3 4 |
y |
response vector. Must be normalized before input. |
X |
Design matrix belonging to fixed effects coefficients (beta). Must be normalized before input. |
batch |
factor with batch effect names (vector for each observations) |
rho |
proportion of variation explained by batch effect |
lambda |
numeric, penalty levels for fixed effects betas (component 1) |
alpha |
numeric, penalty levels for fixed effects betas (balancing LASSO/RIDGE erros) |
beta |
numeric, initial values of the beta coefficients (using glmnet or marginal estimates if not provided) |
glmnetPenalty |
boolean, whether to use the original peanalty (FALSE) or the glmnet penalty (TRUE) |
glmnetWarmup |
boolean, whether to use glmnet beta-estimates as warmup (if not marginals are used) |
maxit |
maximum number of iterations (i.e. forloops) in the coordinate decent algorithm |
toler |
tolerance level of beta changes for each iterations (similar to 'thresh' in glmnet) |
verbose |
boolean, show progress Default: FALSE |
errorFun |
function, The user can provide own error function to perform cross validation with (Default is MSE if function not provided). The function must be able to take equally long two vectors and return a number |
Kfold |
The train-test fold split: The training proportion becomes '(Kfold-1)/Kfold' |
CViter |
Number of iterations of the cross-validation |
parallel |
Boolean of whether parallelization in CV process should be applied (utilizing all CPUs) |
seed |
The user can set seed for reproducibility if wanted |
The function performs (possibly parallelized) K-fold cross validation for given alpha,lambda,rho The function assume that the response y and design matrix X are centralized (no intercept returned from function)
matrix with error values (test and train) for each iterations
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.