waic: Calculate WAIC from log-likelihood

Description Usage Arguments Value Note Author(s)

View source: R/waic.R

Description

Calculate Watanabe-Akaike or widely available information criterion from log posterior predictive distibution.

Usage

1
waic(log_lik)

Arguments

log_lik

log posterior predictive distibution. Must be of dimensions i x s where i is observations and s is number of posterior draws.

Value

A list that contains values for WAIC, p_waic

Note

If observations are for many countries, do a cbind to get a matrix of dimensions i x s

Author(s)

Leontine Alkema


MJAlexander/distortr documentation built on July 17, 2020, 4:06 p.m.