Learn R Programming

bayesforecast (version 1.0.1)

waic.varstan: Widely Applicable Information Criterion (WAIC)

Description

Compute the widely applicable information criterion (WAIC) based on the posterior likelihood using the loo package. For more details see waic.

Usage

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

Arguments

x

A varstan object

...

additional values need in waic methods

Value

An object of class loo. With the estimates of the Watanabe-Akaike Information criteria.

Details

See the loo_compare function of the loo package for more details on model comparisons.

References

Vehtari, A., Gelman, A., & Gabry J. (2016). Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC. In Statistics and Computing, doi:10.1007/s11222-016-9696-4.

Gelman, A., Hwang, J., & Vehtari, A. (2014). Understanding predictive information criteria for Bayesian models. Statistics and Computing. 24, 997-1016.

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

Examples

Run this code
# NOT RUN {
 library(astsa)
 model = Sarima(birth,order = c(0,1,2),seasonal = c(1,1,1))
 fit1 = varstan(model,iter = 500,chains = 1)

 waic1 = waic(fit1)
 waic1
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab