Bayesian deviance 2026-10-06
A Bayesian deviance is minus twice the log-likelihood, with any chosen additive data-only constant held consistent across the models being compared. Its Bayesian posterior expectation measures average fit. In the deviance information criterion, evaluating it at a parameter's posterior mean also enters the effective complexity penalty. This likelihood-based convention differs by a data-only constant from a saturated-model exponential-family deviance when a common saturated model exists.
For Bayesian deviance under a common likelihood convention, define and . Then trades average fit against effective complexity. Lower values suggest better penalized predictive fit in comparable models; differences are not Bayes factors or model posterior probabilities. The choice of stochastic parameters and latent-variable representation matters, especially in a hierarchical Bayesian model.
The DIC effective parameter count compares mean Bayesian deviance with deviance at the posterior mean. It need not be an integer or equal the number of coefficients. Interpretation depends on the parameterization and the chosen observational likelihood; nuisance intercepts count when they appear in that likelihood.
Smaller mean Bayesian deviance indicates better average likelihood fit. Model B has the smallest , improving on A by and on C by . Model C has the smallest effective parameter count in DIC, reflecting its shared timing and growth coefficients. Model B's hierarchical covariance parameters and residual flexibility contribute to a larger effective count than C.
Adding fit and complexity gives the reported deviance information criterion: A has , B , and C . Thus DIC favors Model C, whose simpler shape more than compensates for its slightly worse mean fit than B. The differences are modest, and the criteria must use the same observation likelihood and deviance convention. These numbers are not posterior model probabilities; predictive assessment remains useful.
Under the common observation-level Bayesian deviance convention, DIC is , with the effective parameter count in DIC defined by . The no-random-effect model's effective count is near three, corresponding to its three fitted regression coefficients. With plate random effects, the effective count rises to : the local effects add flexibility, but their partial pooling means they do not count as eighteen fully independent unrestricted fitted parameters. The effective count need not be an integer or equal the raw parameter count; the scale parameter controls that shrinkage.
Adding the plate effects reduces the average Bayesian deviance by at an effective-complexity cost of . Therefore its DIC is lower by
The reported criterion favours the overdispersed model. This is a fit-complexity comparison, not a posterior probability or Bayes factor. In a hierarchical Bayesian model, the interpretation depends on whether deviance is conditional on local effects or has marginalized them out; these figures use the supplied observation-level convention.
The logarithm is strictly increasing, so maximizing the likelihood function is equivalent to maximizing its logarithm. Multiplication by reverses that ordering. Thus, whenever the maximum is attained,
Here the Bayesian deviance includes the likelihood constants. Parameter-independent constants do not alter the minimizer, but a common convention must be retained when comparing criteria between models.
Under the usual regular, identifiable, fixed-dimensional setting, the maximum-likelihood estimator is an interior point with vanishing log-likelihood gradient, and the observed information is positive definite. Define
The second-order Taylor expansion of the Bayesian deviance is
With a prior density approximately constant over the likelihood's concentration region, the posterior density is therefore proportional to
Recognizing the multivariate normal density gives
Typically grows at rate and the posterior concentrates in a region of radius , making higher-order terms negligible under the regularity assumptions. The local flatness assumption concerns this region, not necessarily the entire parameter space. Boundary maxima, unidentified directions, or persistent multiple modes can invalidate this approximation.
Conditional on the observed data, the preceding multivariate normal distribution approximation implies that
The deviance expansion consequently gives
The sum of squares of independent standard normal distribution variables has chi-squared distribution with degrees of freedom. Hence, as a statement about the posterior distribution of the Bayesian deviance,
The data are fixed here and the parameter varies according to its posterior; this is not a claim about resampling the data.
Using the same Bayesian deviance convention, the deviance information criterion and Akaike information criterion are
Both combine a lack-of-fit term with a complexity penalty; smaller values are preferred among comparable models. Under the locally flat prior distribution and the regular multivariate normal distribution approximation, and , so
All fitted parameters counted in the likelihood, including unknown dispersion parameters, belong in . The equivalence need not hold for informative priors, nonregular models, or different choices of the likelihood's latent-variable representation.
The reported deviance information criterion differs by
Model 3 has a mean Bayesian deviance worse by only , but its effective parameter count in DIC is lower by . The small fit cost is more than offset by the reduced complexity penalty, so the criterion gives a mild preference to Model 3. A difference this small should not be presented as decisive evidence, especially without the Monte Carlo error of the criterion difference.
The counts and are effective rather than literal parameter numbers. The likelihood includes child-specific intercepts and uncertain true baselines as well as global coefficients. With 106 of each local quantity and seven global parameters, Model 2 has 219 stochastic unknowns in a natural full representation, but partial pooling and other prior information reduce their effective contribution. Fixing two slopes lowers the effective count by about two, with a further small change from the fitted posterior. There is no reason for to be an integer, or to equal just the number of population-level regression coefficients.
For illustration, the deviances evaluated at posterior means implied by the table are for Model 2 and for Model 3. These differ from the average deviances because averaging a nonlinear deviance is not the same as evaluating it at an averaged parameter. This interpretation presumes the same observed-data likelihood convention in both fits; integrating local variables out before forming the deviance would define a different comparison. The DIC difference is not a Bayes factor.
Fit two hierarchical Bayesian models to the same observations, one with the bounded uniform distribution sampling density and the other with an exponential distribution density. Specify rate versus mean in the exponential model and assign appropriate, scientifically comparable proper prior distributions; that parameter is no longer a literal maximum size. Obtain posterior distributions, for example by Markov chain Monte Carlo, and check convergence.
At the same observational level in both models use the Bayesian deviance , excluding prior densities. Retain the same likelihood constants and consistently either condition on breed effects or integrate them out. Estimate , evaluate at the posterior mean, and compute the effective parameter count in DIC:
Smaller DIC favours the fit–complexity tradeoff. Supplement it with posterior predictive checks; the uniform model's parameter-dependent support and the hierarchical structure make the criterion a diagnostic rather than an automatic definitive decision.
For the common Bayesian deviance convention used in all three models,
Here Dhat is , an at-posterior-mean fit measure, and is an effective parameter count. The independent model's Dhat of 53.1 is almost identical to the exchangeable model's 53.2; both improve on the common model's 57.8. The common model's corresponds to six intercepts plus one shared effect. Independence uses roughly twelve effective parameters. Partial pooling reduces the exchangeable model's effective complexity to about 8.7 while retaining nearly the same fitted likelihood function as independence.
The exchangeable model has the lowest reported DIC, but the common model is competitive. Their difference is only about 1.3, whereas independence is worse by about 6.3. The deviance information criterion measures penalized fit for a predictive comparison, not model posterior probabilities, and these numbers do not establish overwhelming evidence for heterogeneity. The displayed exchangeable is , rather than the printed 70.5; rounding of the underlying values can account for a tenth and does not change this interpretation.
Suppose the Bayesian deviance is locally with positive-definite , and the posterior is normal with mean and covariance . Writing , expectation and variance of the quadratic form give
Consequently the usual effective parameter count in DIC is , whereas half the deviance variance is . A locally flat prior gives and , so both counts equal the parameter dimension. Informative priors generally destroy their equality. The expectation formula requires only the first two moments; normality is used for the variance formula.