WAIC: Watanabe-Akaike or Widely Available Information Criterion...

View source: R/mtar.R

WAICR Documentation

Watanabe-Akaike or Widely Available Information Criterion (WAIC)

Description

This function computes the Watanabe-Akaike or Widely Available Information criterion (WAIC) for objects of class mtar.

Usage

WAIC(..., verbose = TRUE, digits = max(3, getOption("digits") - 2))

Arguments

...

one or several objects of the class mtar.

verbose

an (optional) logical switch indicating if should the report of results be printed. As default, verbose is set to TRUE.

digits

an (optional) integer indicating the number of digits to print. As default, digits is set to max(3, getOption("digits") - 2).

Value

A data.frame with the values of the WAIC for each mtar object in the input.

References

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.

See Also

DIC

Examples


###### Example 1: Returns of the closing prices of three financial indexes
data(returns)
fit1a <- mtar(~ COLCAP + BOVESPA | SP500, row.names=Date, dist="Gaussian",
              data=returns, ars=list(p=c(1,1,2)), n.burnin=100, n.sim=3000)
fit1b <- update(fit1a,dist="Slash")
fit1c <- update(fit1a,dist="Student-t")
WAIC(fit1a,fit1b,fit1c)

###### Example 2: Rainfall and two river flows in Colombia
data(riverflows)
fit2a <- mtar(~ Bedon + LaPlata | Rainfall, row.names=Date, dist="Gaussian",
              data=riverflows, ars=list(p=c(5,5,5)), n.burnin=100, n.sim=3000)
fit2b <- update(fit2a,dist="Slash")
fit2c <- update(fit2a,dist="Student-t")
WAIC(fit2a,fit2b,fit2c)



mtarm documentation built on June 22, 2024, 9:50 a.m.

Related to WAIC in mtarm...