Compute the WAIC - a measure of model fit - of a rater fit object.

# S3 method for rater_fit
waic(x, ...)

Arguments

x

A rater_fit object. All model types are currently supported except the basic Dawid-Skene model fit with grouped data.

...

Other arguments passed.

Value

A waic/loo object.

Details

This function provides provides an additional method for model comparison, on top of the loo() function. In general we recommend that loo() is preferred: see the documentation of the loo package for details. Also, note the comments regarding model selection the the details section of loo().

References

Watanabe, S. (2010). Asymptotic equivalence of Bayes cross validation and widely application information criterion in singular learning theory. Journal of Machine Learning Research 11, 3571-3594.

Vehtari, A., Gelman, A., and Gabry, J. (2017a). Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC. Statistics and Computing. 27(5), 1413--1432. doi:10.1007/s11222-016-9696-4 (journal version, preprint arXiv:1507.04544).

Examples


# \donttest{
fit_ds <- rater(anesthesia, "dawid_skene", verbose = FALSE, chains = 1)
fit_ccds <- rater(anesthesia, "class_conditional_dawid_skene",
                  verbose = FALSE, chains = 1)

waic(fit_ds)
#> Warning: 
#> 19 (42.2%) p_waic estimates greater than 0.4. We recommend trying loo instead.
#> 
#> Computed from 1000 by 45 log-likelihood matrix
#> 
#>           Estimate   SE
#> elpd_waic   -233.8 16.9
#> p_waic        19.6  2.5
#> waic         467.5 33.8
#> 
#> 19 (42.2%) p_waic estimates greater than 0.4. We recommend trying loo instead. 
waic(fit_ccds)
#> Warning: 
#> 6 (13.3%) p_waic estimates greater than 0.4. We recommend trying loo instead.
#> 
#> Computed from 1000 by 45 log-likelihood matrix
#> 
#>           Estimate   SE
#> elpd_waic   -245.7 18.0
#> p_waic        10.4  1.2
#> waic         491.3 36.0
#> 
#> 6 (13.3%) p_waic estimates greater than 0.4. We recommend trying loo instead. 
# }