cvf {plmmr} | R Documentation |
Cross-validation internal function for cv_plmm
Description
Internal function for cv_plmm which calls plmm on a fold subset of the original data.
Usage
cvf(i, fold, type, cv_args, estimated_Sigma, ...)
Arguments
i |
Fold number to be excluded from fit. |
fold |
n-length vector of fold-assignments. |
type |
A character argument indicating what should be returned from predict.plmm. If |
cv_args |
List of additional arguments to be passed to plmm. |
estimated_Sigma |
Estimated variance-covariance matrix using all observations when computing BLUP; NULL if type = "lp" in cv_plmm. |
... |
Optional arguments to |
Value
a list with three elements:
a numeric vector with the loss at each value of lambda
a numeric value indicating the number of lambda values used
a numeric value with the predicted outcome (y hat) values at each lambda