Learn R Programming

dsp (version 1.2.0)

computeDIC_ASV: Function for calculating DIC and Pb (Bayesian measures of model complexity and fit by Spiegelhalter et al. 2002)

Description

Function for calculating DIC and Pb (Bayesian measures of model complexity and fit by Spiegelhalter et al. 2002)

Usage

computeDIC_ASV(y, beta, post_sigma2, post_loglike)

Value

a list containing DIC and p_d. Two options for estimating both DIC and p_d, which are both included.

Arguments

y

the T x 1 vector of time series observations.

beta

the known mean of the process. 0 by default.

post_sigma2

posterior samples of the variance, i.e. exp(h)

post_loglike

log likelihood based on the posterior sample.