cv_plmm()Internal function for cv_plmm() which calls plmm() on a fold subset of the original data.
cvf(i, fold, type, cv_args, ...)A list with three elements:
loss: a numeric vector with the loss at each value of lambda
nl: a numeric value indicating the number of lambda values used
yhat: a numeric value with the predicted outcome values at each lambda
Fold number to be excluded from fit.
n-length vector of fold-assignments.
A character argument indicating what should be returned from predict.plmm(). If type = 'lp' predictions are based on the linear predictor, \(X \beta\).
If type = 'blup', predictions are based on the linear predictor plus the estimated random effect (BLUP).
List of additional arguments to be passed to plmm.
Optional arguments to predict_within_cv()