compute_dic | R Documentation |
Compute DIC of BVAR and BVHAR.
compute_dic(object, ...)
## S3 method for class 'bvarmn'
compute_dic(object, n_iter = 100L, ...)
object |
Model fit |
... |
not used |
n_iter |
Number to sample |
Deviance information criteria (DIC) is
- 2 \log p(y \mid \hat\theta_{bayes}) + 2 p_{DIC}
where p_{DIC}
is the effective number of parameters defined by
p_{DIC} = 2 ( \log p(y \mid \hat\theta_{bayes}) - E_{post} \log p(y \mid \theta) )
Random sampling from posterior distribution gives its computation, \theta_i \sim \theta \mid y, i = 1, \ldots, M
p_{DIC}^{computed} = 2 ( \log p(y \mid \hat\theta_{bayes}) - \frac{1}{M} \sum_i \log p(y \mid \theta_i) )
DIC value.
Gelman, A., Carlin, J. B., Stern, H. S., & Rubin, D. B. (2013). Bayesian data analysis. Chapman and Hall/CRC.
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: 583-639.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.