DIC: Deviance information criterion (DIC)

View source: R/mtar.R

DICR Documentation

Deviance information criterion (DIC)

Description

This function computes the Deviance information criterion (DIC) for objects of class mtar.

Usage

DIC(..., 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 DIC for each mtar object in the input.

References

Spiegelhalter D.J., Best N.G., Carlin B.P. and Van Der Linde A. (2002) Bayesian Measures of Model Complexity and Fit. Journal of the Royal Statistical Society Series B (Statistical Methodology), 64(4), 583–639.

Spiegelhalter D.J., Best N.G., Carlin B.P. and Van der Linde A. (2014). The deviance information criterion: 12 years on. Journal of the Royal Statistical Society Series B (Statistical Methodology), 76(3), 485–493.

See Also

WAIC

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")
DIC(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")
DIC(fit2a,fit2b,fit2c)



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

Related to DIC in mtarm...