Learn R Programming

hsstan (version 0.8.2)

loo.hsstan: Predictive information criteria for Bayesian models

Description

Compute an efficient approximate leave-one-out cross-validation using Pareto smoothed importance sampling (PSIS-LOO), or the widely applicable information criterion (WAIC), also known as the Watanabe-Akaike information criterion.

Usage

# S3 method for hsstan
loo(x, cores = getOption("mc.cores"), ...)

# S3 method for hsstan waic(x, cores = getOption("mc.cores"), ...)

Value

A loo object.

Arguments

x

An object of class hsstan.

cores

Number of cores used for parallelisation (the value of options("mc.cores") by default).

...

Currently ignored.

Examples

Run this code
utils::example("hsstan", echo=FALSE)
oldopts <- options(mc.cores=2)
# continued from ?hsstan
loo(hs.biom)
waic(hs.biom)
options(oldopts)

Run the code above in your browser using DataLab