The values returned by loocv()
can be used to understand how any
one group affects the overall result, as well as how well the model
predicts the omitted group.
This function automatically runs K baggr models, leaving out one group at a time,
and then calculates expected log predictive density (ELPD) for
that group (see Gelman et al 2013). The main output is the cross-validation
information criterion, or -2 times the ELPD averaged over 'K' models.
This is related to, and often approximated by, the Watanabe-Akaike
Information Criterion. A value closer to zero (i.e. a smaller number in magnitude)
means a better fit. For more information on cross-validation see
this overview article
For running more computation-intensive models, consider setting the mc.cores option before running loocv, e.g. options(mc.cores = 4)
(by default baggr runs 4 MCMC chains in parallel).
As a default, rstan runs "silently" (refresh=0).
To see sampling progress, please set e.g. loocv(data, refresh = 500).