Skip to contents

They usually agree, and the informative case is when they do not: WAIC has no diagnostic of its own, while PSIS-LOO reports a Pareto shape per observation and can say which point breaks the approximation. A criterion without its diagnostic is a number with no error bar.

Usage

Infcrt(log_lik_samples)

Arguments

log_lik_samples

Pointwise log likelihood, draws by observations.

Value

List with estimate, looic, elpd_loo, p_loo, k_max, S, n.

Details

Formula: WAIC = -2(lppd - p_WAIC); LOO weights w_is = 1/exp(ll_is) smoothed by a generalised Pareto on the largest min(0.2 S, 3 sqrt(S)).

References

Watanabe, S. (2013). JMLR 14:867-897; Vehtari, Gelman & Gabry (2017) Statist Comput 27:1413-1432.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Infcrt(V)
#> $estimate
#> [1] -0.7577962
#> 
#> $looic
#> [1] -5.242204
#> 
#> $elpd_loo
#> [1] 2.621102
#> 
#> $p_loo
#> [1] 3.757796
#> 
#> $k_max
#> [1] NaN
#> 
#> $S
#> [1] 8
#> 
#> $n
#> [1] 1
#> 
#> $method
#> [1] "WAIC with a PSIS-LOO cross-check"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"