Bayesian leave-one-out cross-validation based on the log pointwise predictive density
Usage
loo.cv(mod, nsim = 100, bias.corr = FALSE)
Arguments
mod
an object obtained by the functions lm or glm
nsim
number of Monte Carlo simulations used to describe the posterior distributions.
Computing time is large!
bias.corr
The leave-one-out cross-validation underestimates predictive fit because each prediction
is conditioned n-1 data points. For large n this bias is negligible.
For small n, a bias correction is recommended.