- Introduced by
- Sander Greenland (Bayesian epidemiology formalization); earlier Bayesian logistic methods: Leonard (1972)
- Year
- 1990s–2000s (systematic application); Bayesian inference foundations: Bayes/Laplace 18th–19th c.
- Type
- Observational analytic study with Bayesian inference
- Family
- Clinical / epidemiology
What does it do?
A Bayesian case-control study applies Bayesian inference to the case-control design.
Investigators compare past exposures in people with a disease (cases) and similar people without it (controls), and combine the resulting likelihood with a prior distribution on the exposure-disease association. The output is a posterior distribution for the odds ratio, summarised by a point estimate and a 95% credible interval. External evidence from earlier studies or substantive knowledge is stated explicitly and can be examined, rather than left implicit in the model.
The intuition behind the method
In a standard case-control study, cases and controls are compared on past exposure to estimate an odds ratio. The Bayesian version adds one step before analysis: the investigator states, as a probability distribution, what is already believed about the log-odds ratio, for example from earlier studies or biological reasoning. Bayes' theorem then combines this prior with the likelihood from the new data to give a posterior distribution. Greenland (2006) argues that a prior can be expressed as prior data, or 'data equivalents', so that its strength can be judged by how much information it represents. When the new data are sparse, the prior pulls estimates toward plausible values; when the data are strong, the posterior follows the data.
History
The Bayesian principle underlying this approach rests on the work of Bayes and Laplace in the 18th and 19th centuries. Greenland (2006) sets out Bayesian foundations and basic methods for epidemiological research, including the expression of prior judgements as prior data, or 'data equivalents', so that the strength of a prior can be gauged by how much data it represents. Systematic Bayesian application of logistic models in epidemiology followed. The wider availability of MCMC software later made routine Bayesian fitting of logistic models practical.
When to use it
Use a Bayesian case-control study when there is meaningful prior information about the exposure-disease association, such as a previous meta-analysis or mechanistic evidence, that should be formally included in the analysis. It is also suitable when the study is small or the exposure is rare and principled regularisation is needed to avoid spuriously extreme odds ratios, or when the question calls for a direct probability statement about the effect size. Do not use this approach when the team lacks Bayesian modelling experience, when stakeholders cannot agree on a prior, when the audience requires a strictly frequentist analysis, or when the sample is large enough that the choice of prior makes negligible difference to the posterior.
Limitations and considerations
- The prior is a subjective input; its choice must be justified from named sources and tested against alternatives.
- MCMC fitting is more involved and slower than maximum-likelihood logistic regression, and it requires convergence checks before results can be interpreted.
- Reviewers or regulators who expect frequentist analyses may ask for additional justification or for parallel classical estimates.
- When the prior is strong and the new data are few, the posterior mostly reflects the prior, so the new study adds little evidence of its own.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- The prior is written down and can be inspected, so a reader can see how much outside information shaped the estimate.
- Credible intervals support direct probability statements, such as the posterior probability that the odds ratio exceeds a stated threshold, which a classical confidence interval does not provide.
- With few cases or rare exposures, the prior shrinks extreme estimates toward plausible values, so the posterior remains usable where maximum-likelihood estimates may be unstable.
- Posterior samples can be passed directly into downstream decision or risk models, so the uncertainty in the odds ratio carries forward into those analyses.
Applications
- Illustrative scenario: studies of rare adverse drug reactions, where few cases make maximum-likelihood odds ratios unstable.
- Illustrative scenario: genetic association studies that test many exposures, where priors can help regularise the estimates.
- Illustrative scenario: environmental or occupational exposure studies in which prior toxicological evidence is available to encode.
- Illustrative scenario: small hospital-based case-control studies of complications or infections where case counts are limited.
How it works
How it works
Select cases (people with the outcome) and controls (people without it) from the same source population, applying the usual case-control decisions on matching, the case-to-control ratio and exposure ascertainment. The Bayesian approach changes the analysis that follows, not the design itself.
Specify a prior distribution for the log-odds ratio and any other model parameters, based on earlier studies, meta-analyses or domain knowledge. When prior knowledge is limited, a weakly informative prior such as Normal(0, 2.5) on the log-OR scale is a common default, but it assumes standardised predictors. For unstandardised exposures the same prior can imply a much wider or narrower range of odds ratios, so the implied range on the OR scale should be checked with a prior predictive plot. Any report should state whether the second parameter is a standard deviation or a variance. An informative prior taken from a previous study is appropriate only when that study concerns a comparable population and exposure definition.
Formula
\pi(\beta) \propto \text{Normal}(\mu_0, \sigma_0^2)Collect exposure and covariate data for cases and controls, typically retrospectively from medical records, interviews or biomarkers. Recall bias, selection of a representative source population and control of confounding matter here just as they do in a classical case-control study.
Write the likelihood for a logistic regression that relates exposure and covariates to the log-odds of being a case. For unmatched designs this is the unconditional likelihood shown in the mechanics section. When cases are individually matched to controls, that unconditional form does not account for the matching and should not be used; the likelihood must instead be conditioned on the matched sets (a conditional logistic likelihood). The likelihood summarises what the observed data say about the odds ratio, independent of the prior. Because of case-control sampling, the intercept is not identified in the usual population sense and should not be read as a population risk; inference should target the exposure coefficients.
Formula
L(\beta | y) = \prod_{i=1}^{n} p_i^{y_i}(1-p_i)^{1-y_i},\; p_i = \text{logistic}(X_i\beta)Combine the prior and the likelihood by Bayes' theorem to obtain the posterior distribution of the log-OR. For logistic models this is usually computed by Markov chain Monte Carlo (MCMC) sampling, using software such as Stan (through brms or rstan) or JAGS.
Formula
\pi(\beta | y) \propto L(\beta | y)\, \pi(\beta)
Report the posterior median or mean of the odds ratio (the exponential of the log-OR) and the 95% credible interval, the range that contains 95% of the posterior probability. Under the stated model and prior, a credible interval gives a direct probability statement about the parameter, which a classical confidence interval does not. Report the results of at least one alternative prior alongside the main estimate.
Formula
\text{OR} = e^{\beta},\; 95\% \text{ credible interval from posterior}Common pitfalls
- Using an informative prior derived from a study with a different population or exposure definition, without justification, can bias the posterior toward a misleading estimate.
- Reporting one posterior estimate without a sensitivity analysis across alternative priors leaves readers unable to judge how influential the prior was.
- Undetected MCMC convergence failure: inspect trace plots, R-hat values and effective sample sizes before interpreting any result.
- Describing a Bayesian credible interval as a classical confidence interval, or the reverse, in the write-up. The two have different interpretations.
- Assuming the Bayesian analysis corrects recall bias, selection bias or poor matching. It does not; those design problems must be addressed in the study itself.
Frequently asked questions
What makes a Bayesian case-control study different from a standard case-control study?
The study design (selecting cases and controls, ascertaining exposures, controlling for confounders) is identical. The difference lies in the statistical analysis: instead of maximum-likelihood logistic regression, the Bayesian approach specifies prior distributions for the parameters, computes the posterior distribution via Bayes' theorem, and reports credible intervals rather than confidence intervals and p-values.
How do I choose the prior distribution for the odds ratio?
Start with a weakly informative prior such as Normal(0, 2.5) on the log-OR scale, which allows large effects but discourages extreme values with no data support, and state whether 2.5 is a standard deviation or a variance. This default assumes standardised predictors; for other scalings, check the implied range of odds ratios with a prior predictive plot. If a high-quality previous study or meta-analysis exists for the same exposure-disease pair in a comparable population, you can derive an informative prior from its reported estimate and standard error. Always perform a sensitivity analysis by re-running the model with at least one alternative prior to assess how much the posterior depends on your choice.
Is a Bayesian case-control study publishable in top epidemiology journals?
Yes, Bayesian analyses appear in epidemiology journals, particularly for studies with small samples, multiple comparisons or explicit prior evidence synthesis. The key is a thorough justification of the prior, transparent reporting of prior sensitivity analyses, and clear presentation of posterior summaries alongside conventional effect estimates so that readers can compare them.
What software can I use for Bayesian case-control analysis?
The most common tools are Stan (accessed via the brms or rstan R packages), JAGS (via rjags), and PyMC in Python. The brms package in R is particularly accessible for Bayesian logistic regression and requires little knowledge of sampler code. For complex measurement-error corrections or hierarchical structures, Stan offers the most flexibility.
Can I use a Bayesian case-control design for matched studies?
Yes. Matched case-control designs are usually analysed with conditional logistic regression in the frequentist framework. A Bayesian analogue places priors on the exposure coefficients within a likelihood conditioned on the matched sets. This keeps the control for matched confounders while adding Bayesian inference. The unconditional likelihood shown in the mechanics section should not be used for matched data. The conditional likelihood must be specified correctly in Stan or JAGS, which requires care.
Related methods
Sources
Greenland, S. (2006). Bayesian perspectives for epidemiological research: I. Foundations and basic methods. International Journal of Epidemiology, 35(3), 765-775.
Open DOI referenceGustafson, P. (2004). Measurement Error and Misclassification in Statistics and Epidemiology: Impacts and Bayesian Adjustments. Chapman and Hall/CRC.
ISBN: 978-1584884316