PSIS-LOO of a Bayesian GLM
bayes_loo.RdLeave-one-out expected log predictive density on the training data, by
Pareto-smoothed importance sampling (elpd_loo()), with each
observation's relative efficiency estimated from the chains. Its
pointwise values feed stacking_weights().
Value
As elpd_loo().
Examples
d <- data.frame(claims = rep(c(1, 2, 3, 5), 10), x = rep(c(-1.5, -0.5, 0.5, 1.5), 10))
m <- bayes_glm_fit(claims ~ x, d, family = "poisson", chains = 2, tune = 300, draws = 300)
bayes_loo(m)$estimates
#> elpd se p ic
#> -56.62809857 1.73930396 0.07649576 113.25619714