Model Choice
Let be candidate models for the data where model has parameter likelihood and prior Model uncertainty is uncertainty about which model generated the data. Bayesian inference treats model uncertainty like any other uncertainty by placing a prior model probability on each model, with
Let be a model with parameter likelihood and prior The marginal likelihood of is the probability it assigns to the observed data after integrating out its parameters.
Let be candidate models with prior model probabilities and marginal likelihoods. The posterior model probability of is the conditional probability of given the data, which follows from Bayes’ theorem.
Let and be candidate models. The prior odds of over are and the posterior odds of over are
Let and be candidate models. The Bayes factor in favour of over is the ratio of their marginal likelihoods, which is the factor by which the data update the prior odds into the posterior odds.
The Bayes factor has the following properties:
- it measures the evidence the data provide for one model over the other independently of the prior model probabilities;
- a Bayes factor of is no evidence, and by convention values of above about and are read as positive, strong and decisive evidence for
- for two simple hypotheses the Bayes factor is the likelihood ratio;
- a simple null hypothesis is tested against by comparing the model with fixed at to the model with a prior on
Occam’s razor is the property that the Bayes factor automatically penalises complexity. The marginal likelihood is the prior predictive density of the observed data, so it rewards a model for predicting the data well before seeing them. A model with more parameters or a more diffuse prior spreads its prior predictive distribution over more possible data sets and so assigns lower probability to any particular one unless the extra flexibility is needed.
The Jeffreys–Lindley paradox is the property that as the prior on under becomes more diffuse the marginal likelihood of tends to zero and the Bayes factor favours whatever the data, even when a frequentist test rejects decisively. The Bayes factor is therefore sensitive to the prior on the parameters, and improper priors cannot be used for the parameters that differ between models, since the marginal likelihood is then defined only up to an arbitrary constant.
Let be a model with parameters and maximum likelihood estimate Marginal likelihoods are rarely available in closed form and are estimated by importance sampling or bridge sampling, or approximated using the Laplace approximation, which as gives
Let be a model with parameters and maximum likelihood estimate The Bayesian information criterion (BIC) of is minus twice the Laplace approximation of its log marginal likelihood.
The BIC has the following properties:
- so the model with the smallest BIC has approximately the largest marginal likelihood;
- it depends on the prior only through terms that do not grow with
- it is consistent in the sense of selecting the true model with probability tending to one when it is among the candidates.
Let be candidate models with posterior model probabilities, be a future observation and be a quantity that has the same meaning in every model, such as a prediction or an effect size. Bayesian model averaging (BMA) is the method that makes inferences and predictions by averaging over the models with their posterior probabilities as weights rather than conditioning on a single chosen model.
Bayesian model averaging has the following properties:
- it propagates model uncertainty into the final inference, so its intervals are wider and better calibrated than those from the single best model;
- its predictions have lower expected loss under the logarithmic score than those of any single model when the true model is among the candidates.
Model selection is the choice of a single model from the candidates. Model selection is the Bayes action under the zero-one loss that charges one unit for choosing any model other than the true one, which selects the model with the largest posterior probability, or equivalently the largest Bayes factor against each alternative when the prior model probabilities are equal. When no candidate model is believed to be true, models are instead compared by how well they predict new data.
Let be a model and be a new observation. The log predictive density of under is The expected log predictive density of is the expectation of the log predictive density over the true distribution of
Let be a model and be the data with the -th observation removed. Leave-one-out cross-validation is the method that estimates the expected log predictive density without new data by summing the log predictive densities of each observation given the others.
The expected log predictive density can also be approximated by an information criterion.
Let be a model with likelihood The deviance of at parameter value is minus twice the log-likelihood.
Let be a model with deviance and posterior distribution The posterior mean deviance is The effective number of parameters is the difference between the posterior mean deviance and the deviance at the posterior mean.
Let be a model with posterior mean deviance and effective number of parameters The deviance information criterion (DIC) of is the posterior mean deviance plus the effective number of parameters.
The DIC is computed directly from posterior draws.
Let be a model with likelihood for each observation and posterior distribution The widely applicable information criterion (WAIC) of is minus twice the log pointwise predictive density minus the effective number of parameters, where the latter is the sum of the posterior variances of the pointwise log-likelihoods.
Information criteria have the following properties:
- the WAIC is a more stable alternative to the DIC and asymptotically equals
- lower values of DIC and WAIC indicate better expected predictive performance;
- unlike the Bayes factor they are insensitive to diffuse priors and do not require the true model to be among the candidates;
- they do not deliver posterior probabilities of the models.
Let be the observed data with posterior distribution A replicated data set is a hypothetical new data set of the same size and structure as drawn from the posterior predictive distribution.
A replicated data set is simulated by drawing from the posterior and then from the population distribution at
Posterior predictive checking is the method that compares the observed data with replicated data sets. If the model is adequate then the observed data should look like a typical draw from the posterior predictive distribution. Model comparison only ranks the candidates, so a model should also be checked against the data on its own.
Let be data and be a parameter. A test quantity is a function of the data, and possibly the parameter, chosen to capture a feature of the data that the model should reproduce, such as the proportion of zeros, the maximum, the autocorrelation or a goodness-of-fit statistic.
Let be a test quantity and be a replicated data set. The posterior predictive -value is the posterior probability that the test quantity of replicated data is at least as extreme as that of the observed data.
The posterior predictive -value has the following properties:
- values near or indicate that the model does not reproduce that feature of the data;
- it is not a frequentist -value and is not uniformly distributed under the model, since the data are used both to fit the model and to assess it, which makes it conservative;
- it is a measure of discrepancy rather than a formal test, and graphical comparisons of the observed data with replicated data sets are often more informative than a single number.
A prior predictive check is the method that draws replicated data from the prior predictive distribution and assesses whether the prior and likelihood together produce plausible data before any are observed. Prior predictive checks are how prior choices are calibrated.
A sensitivity analysis is the method that repeats the analysis under alternative priors and model specifications to assess how much the conclusions depend on choices that the data cannot settle.