Learn R Programming

bayesbr (version 0.0.1.0)

DIC_bayesbr: Deviance Information Criterion

Description

A function that receives data from the estimated model, uses the information from the loglik and returns the DIC, an estimator for the quality of the estimation of a model.

Usage

DIC_bayesbr(x)

Arguments

x

an object of the class bayesbr, containing the list returned from the bayesbr function.

Value

A number corresponding to the DIC (Deviance Information Criterion) of the estimated model.

Details

Proposed by Spiegelhalter (2002) the DIC (Deviance Information Criterion) measures the quality of the adjustment made by the model, when comparing adjusted models with the same data, the smaller the BIC the better the adjustment.

It is particularly useful in Bayesian model selection problems where the posterior distributions of the models have been obtained by Markov chain Monte Carlo (MCMC) simulation. DIC is an asymptotic approximation as the sample size becomes large, like AIC. It is only valid when the posterior distribution is approximately multivariate normal.

DIC is calculate using the loglik calculated from the posterior distribution of the parameters and a calculation from the average of the posterior distribution of the parameters. To see the formula visit Spiegelhalter (2002).

References

10.1111/1467-9868.00353 Spiegelhalter, D. J., Best, N. G., Carlin, B. P., & 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.

10.1111/j.1467-9574.2005.00278.x Van Der Linde, A. (2005). DIC in variable selection. Statistica Neerlandica, 59(1), 45-56.

See Also

bayesbr, AIC_bayesbr, BIC_bayesbr

Examples

Run this code
# NOT RUN {
data("CarTask",package="bayesbr")

car_bayesbr <- bayesbr(probability ~ NFCCscale + task, data = CarTask,
                      iter =100)
dic = DIC_bayesbr(car_bayesbr)
# }

Run the code above in your browser using DataLab