Learn R Programming

bamlss (version 1.2-5)

WAIC: Watanabe-Akaike Information Criterion (WAIC)

Description

Function returning the Watanabe-Akaike Information Criterion (WAIC) of a fitted model object.

Usage

WAIC(object, ..., newdata = NULL)

Value

A data frame containing the WAIC and estimated number of parameters.

Arguments

object

A fitted model object which contains MCMC samples.

...

Optionally more fitted model objects.

newdata

Optionally, use new data for computing the WAIC.

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. https://jmlr.org/papers/v11/watanabe10a.html

Examples

Run this code
if (FALSE) d <- GAMart()
b1 <- bamlss(num ~ s(x1), data = d)
b2 <- bamlss(num ~ s(x1) + s(x2), data = d)
WAIC(b1, b2)

Run the code above in your browser using DataLab