DIC_bayesbr: Deviance Information Criterion

Description Usage Arguments Details Value References See Also Examples

View source: R/DIC_bayesbr.R

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

1

Arguments

x

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

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).

Value

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

References

doi: 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.

doi: 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

1
2
3
4
5
data("CarTask",package="bayesbr")

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

bayesbr documentation built on July 17, 2021, 1:07 a.m.