cv_quap: Diagnostic trace and rank histogram plots for MCMC output
Description
Cross validation for quap
model fits.
Usage
cv_quap( quap_model, lno = 1, pw = FALSE, cores = 1, ... )
Arguments
lno
Number of observations to leave out in each fold
pw
Pointwise results (TRUE) or summed across folds (FALSE)
cores
Number of cores to use. If great than 1, uses mclappy
with folds
...
Additional arguments to pass to quap
Details
This function constructs cross validation folds from an existing quap
model fit and associated data. It then fits the model to each fold and returns either the fit to each fold (when pw=TRUE
) or the summed performance across all folds.
The default is leave-one-out cross-validation, when lno=1
.