Learn R Programming

rethinking (version 1.35)

WAIC: Widely Applicable Information Criterion

Description

Computes WAIC for a map2stan model fit.

Usage

WAIC( object , n=1000 , refresh=0.1 , ... )

Arguments

object

Object of class map2stan

n

Number of samples to use in computing WAIC. Set to n=0 to use all samples in map2stan fit

refresh

Refresh interval for progress display. Set to refresh=0 to suppress display.

...

Other parameters to pass to someone

Value

Details

This function uses the samples and model definition from a map2stan fit to compute the Widely Applicable Information Criterion, WAIC. WAIC is an estimate of out-of-sample relative K-L divergence, and it is defined as:

$$WAIC = -2(lppd - pWAIC)$$

Components lppd (log pointwise predictive density) and pWAIC (the effective number of parameters) are reported as attributes. See Gelman et al 2013 for definitions and formulas. This function uses the variance definition for pWAIC.

The function link is used internally the compute the values of any linear models.

References

Watanabe, S. 2010. Asymptotic equivalence of Bayes cross validation and Widely Applicable Information Criterion in singular learning theory. Journal of Machine Learning Research 11:3571-3594.

Gelman, A., J. Hwang, and A. Vehtari. 2013. Understanding predictive information criteria for Bayesian models.

See Also

map2stan, link