Learn R Programming

MSGARCH (version 2.51)

DIC: Deviance Information Criterion (DIC).

Description

Method which computes the Deviance Information Criterion (DIC) from a fit object of type MSGARCH_MCMC_FIT created with FitMCMC.

Usage

DIC(fit)

# S3 method for MSGARCH_MCMC_FIT DIC(fit)

Value

A list with the following elements:

  • DIC: Deviance Information Criterion.

  • IC: Bayesian Predictive Information Criterion (IC = 2 * pV + D.bar).

  • pV: Effective number of parameters (pV = var(D)/2).

  • D.bar: Expected value of the deviance over the posterior.

Arguments

fit

Fit object of type MSGARCH_MCMC_FIT created with FitMCMC.

Details

Computes the Deviance information criterion of Spiegelhalter et al. (2002).

References

Spiegelhalter, David J., et al. (2002). Bayesian measures of model complexity and fit. Journal of the Royal Statistical Society: Series B, 64, 583-639 tools:::Rd_expr_doi("10.1111/1467-9868.00353")

Examples

Run this code
# create model specification
spec <- CreateSpec()

# load data
data("SMI", package = "MSGARCH")

# fit the model on data by MCMC
set.seed(123)
fit <- FitMCMC(spec = spec, data = SMI, ctr = list(nburn = 500L, nmcmc = 500L))

# compute DIC
DIC(fit)

Run the code above in your browser using DataLab