View source: R/all_postprodn_fns.R
DIC | R Documentation |
Deviance Information Criterion (DIC) for angmcmc objects
DIC(object, form = 2, ...)
object |
angular MCMC object. |
form |
form of DIC to use. Available choices are 1 and 2 (default). See details. |
... |
additional model specific arguments to be passed to |
Given a deviance function D(θ) = -2 log(p(y|θ)), and an estimate θ* = (∑ θ_i) / N of the posterior mean E(θ|y), where y denote the data, θ are the unknown parameters of the model, θ_1, ..., θ_N are MCMC samples from the posterior distribution of θ given y and p(y|θ) is the likelihood function, the (form 1 of) Deviance Infomation Criterion (DIC) is defined as
DIC = 2 ( (∑_{s=1}^N D(θ_s)) / N - D(θ*) )
The second form for DIC is given by
DIC = D(θ*) - 4 \hat{var} \log p(y|θ_s)
where for i = 1, ..., n, \hat{var} \log p(y|θ) denotes the estimated variance of the log likelihood based on the realizations θ_1, ..., θ_N.
Like AIC and BIC, DIC is an asymptotic approximation for large samples, and is only valid when the posterior distribution is approximately normal.
Computes the DIC for a given angmcmc object
# illustration only - more iterations needed for convergence fit.vmsin.20 <- fit_vmsinmix(tim8, ncomp = 3, n.iter = 20, n.chains = 1) DIC(fit.vmsin.20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.