Bayesian Trial Reanalysis

Single-page clinical trial workbench for Bayesian re-analysis of superiority and non-inferiority studies.

What this page gives you

P(Benefit) Posterior probability on the selected ratio scale
P(NI) Non-inferiority probability when an NI margin is provided
Sensitivity to prior choice across the selected grid

Reference basis: Zampieri FG et al. Am J Respir Crit Care Med. 2021;203(5):543-552, with supplementary appendix conventions for prior strength and heterogeneity summaries.

1

Enter the study

Choose trial design, supply the reported effect measure or 2x2 counts, and define whether lower or higher ratios mean benefit.

2

Select priors

Use the Zampieri scenarios or manually choose skeptical, optimistic, and pessimistic priors with weak, moderate, or strong strength.

3

Read the posterior

See summary boxes, sensitivity across priors, distribution plots, heterogeneity, and a clinician-facing interpretation block.

Study Setup

Trial input and effect measure

Start with the reported estimate from the manuscript. For binary outcomes you can enter the published ratio with its confidence interval or derive an odds ratio from raw event counts.

Fastest path: ratio + 95% CI
Bayesian updating runs on the log-ratio scale. OR, RR, and HR are handled on their own reported ratio scale; 2x2 tables produce an odds ratio.
Prior Model

Prior configuration and clinical thresholds

The neutral priors are your skeptical anchors. Optimistic and pessimistic priors are centered symmetrically around the expected study effect, following the Zampieri grid.

Include at least one skeptical prior
Used to center the optimistic and pessimistic priors on the currently selected ratio scale.

Select priors to include

Neutral
Optimistic
Pessimistic

Clinical thresholds

Defaults are aligned with the odds-ratio examples from the paper, but you can reuse the same null-centered threshold logic on RR or HR when that better matches the published outcome measure.
Below this = outside equivalence
Above this = outside equivalence

Custom prior

Use the scenario defaults if you want a standardized read. If you are working from external evidence, keep the scenario as manual and add a custom prior in log-ratio units.

Posterior Summary

Results

Ratio scale
Per Prior

Posterior summary table

Each row shows the posterior estimate and clinically relevant probabilities under one prior. The flat prior is included as a reference, not as a recommended prior.

Distribution View

Posterior distributions

Use the combined view to inspect overlap across priors, then switch to individual priors for threshold-level cumulative probabilities.

Cross-Prior Spread

Forest plot across priors

Sensitivity

Heterogeneity assessment

This meta-analytic summary treats each posterior under a different prior as one sensitivity scenario and estimates how much the conclusion shifts with prior choice.

Narrative Readout

Interpretation

Reference: Zampieri FG, Casey JD, Shankar-Hari M, Harrell FE Jr, Harhay MO. Using Bayesian Methods to Augment the Interpretation of Critical Care Trials. Am J Respir Crit Care Med. 2021;203(5):543-552. doi:10.1164/rccm.202006-2381CP

What Does This Tool Do?

When you read a clinical trial (RCT), the results usually say something like "OR 0.85, 95% CI 0.70–1.03, p = 0.09" and conclude the treatment "did not reach statistical significance." But does that really mean the treatment doesn't work?

This tool performs a Bayesian re-analysis — it takes the trial's numbers and tells you the actual probability that the treatment is beneficial or harmful. Instead of a binary yes/no answer, you get something like: "There is an 88% probability that this treatment reduces mortality."

Supports both superiority and non-inferiority trial designs.

Step-by-Step Instructions

1

Select the study design

Choose Superiority (default) if the trial aimed to show the treatment is better than control. Choose Non-Inferiority if the trial aimed to show the treatment is "not worse than" the standard of care (see Non-Inferiority section below for details).

2

Find the effect size from the paper

What to look forWhere to find itExample
Odds Ratio (OR) + 95% CIResults section, binary outcomesOR 1.27 (95% CI 0.99–1.63)
Risk Ratio (RR) + 95% CIResults sectionRR 0.83 (95% CI 0.68–1.02)
Hazard Ratio (HR) + 95% CITime-to-event outcomesHR 1.20 (95% CI 1.01–1.42)
Event countsTables: events/total per groupTx: 167/501; Ctrl: 142/509

Any one of these is enough. RR and HR are analyzed on their own reported ratio scale; raw 2x2 counts are converted to an odds ratio.

3

Enter the numbers, study name, and outcome type

  • Bad outcome = mortality, complications (ratio < 1 = benefit)
  • Good outcome = survival, recovery (ratio > 1 = benefit)
4

Set the expected ratio and prior scenario

The Expected Ratio field determines where the optimistic and pessimistic priors are centered. It does not affect the neutral (skeptical) priors, which are always centered at ratio = 1.0.

PriorCenter (Mean)Example (Expected OR = 0.75)
Neutrallog(1.0) = 0Always 0 — unaffected
Optimisticlog(Expected ratio)log(0.75) = −0.288
Pessimistic−log(Expected ratio)+0.288 (mirror of optimistic)

Where to find it: Look in the paper's Methods → Sample Size Calculation section for a sentence like "We powered the study to detect an OR of 0.75" or "assuming a 25% relative risk reduction (RR = 0.75)." Enter that value here.

If you cannot find this value, 0.75 is a reasonable default for most superiority trials. If you only use neutral (skeptical) priors, this field has no effect.

Then select a Prior Scenario from the dropdown. Each scenario pre-selects which priors to include and at what strength, based on Table 2 of Zampieri et al.

If unsure about scenario, "Conflicting evidence" (default) is the safest choice.

5

Click "Run Bayesian Re-Analysis"

Instant results: summary, tables, density + CDF plots, forest plot, heterogeneity, and text interpretation.

Superiority vs. Non-Inferiority Trials

Superiority Trial

Goal: Show the new treatment is better than control.

Key question: "What is the probability that the treatment works?"

Main output: P(Benefit), P(Harm), P(Important Benefit), P(Severe Harm)

Example: A new drug vs. placebo for reducing mortality.

Non-Inferiority (NI) Trial

Goal: Show the new treatment is not meaningfully worse than the active comparator.

Key question: "What is the probability that the treatment effect is within the acceptable margin?"

Main output: P(Non-Inferiority) — the Bayesian probability that the selected ratio measure stays within the NI margin.

Example: A cheaper/simpler drug vs. the standard drug — is it "close enough"?

How Non-Inferiority Analysis Works

In an NI trial, you pre-define a non-inferiority margin — the maximum amount by which the new treatment can be worse and still be "acceptable."

NI Margin FormatHow it worksExample
Selected ratio scale Directly specify the maximum acceptable ratio on the current measure scale.
For bad outcome: NI if ratio < margin.
For good outcome: NI if ratio > 1/margin.
NI margin = 1.2 means "up to 20% worse is acceptable" on the chosen ratio scale
Absolute risk difference Specify the maximum absolute difference in event rates. Requires the control group event rate and is only available for OR-based analyses.
Formula: OR = [p₀+δ] × [1−p₀] / [p₀ × (1−p₀−δ)]
NI margin = 5%, control rate = 25% → OR margin ≈ 1.29
Important: The tool automatically handles absolute-margin conversion only for OR or 2x2 event-count analyses. For RR or HR studies, enter the NI margin directly on the same reported ratio scale.

Interpreting NI Results

  • P(NI) > 97.5% — Strong evidence of non-inferiority (equivalent to one-sided p < 0.025)
  • P(NI) > 95% — Good evidence of non-inferiority
  • P(NI) 80–95% — Suggestive but inconclusive
  • P(NI) < 80% — Cannot conclude non-inferiority
  • Unlike superiority trials, P(NI) should be consistently high across priors. If it drops below 90% with a skeptical prior, the evidence for NI is fragile.

Understanding the 9 Priors

The Zampieri framework uses 9 priors organized as a 3×3 grid: 3 beliefs × 3 strengths.

The Three Beliefs

BeliefCenter (Mean)What it means
Neutral (= Skeptical)log(ratio) = 0 → ratio = 1.0No prior expectation. The skeptical prior — treatment probably does nothing until proven otherwise.
Optimisticlog(Expected ratio)Prior belief that the treatment works as expected on the selected ratio scale.
Pessimistic−log(Expected ratio)Prior belief that the treatment is harmful (mirror of optimistic).

The Three Strengths

StrengthHow SD is calculatedWhat it means
WeakP(crossing null) = 30%Very uncertain. Data dominate.
ModerateP(crossing null) = 15%Reasonably confident. Moderate influence.
StrongP(crossing null) = 5%Very confident. Strong influence. Only use with strong external evidence.

Which Priors Are "Skeptical"?

The Neutral priors are the skeptical priors. Centered at ratio = 1.0 (no effect).

  • Neutral Strong = most skeptical. Hard to move away from the null ratio of 1.
  • Neutral Moderate = moderately skeptical. Open to data.
  • Neutral Weak = mildly skeptical. Nearly flat.

If even the Neutral Strong prior shows high P(Benefit), the evidence is very convincing.

Prior Scenario Defaults (Table 2)

ScenarioNeutralOptimisticPessimistic
Little to no prior infoWeakWeakWeak
Conflicting evidenceModerateModerateModerate
Evidence toward benefit, no outliersModerateModerateWeak
Evidence toward benefit, with outliersModerateModerateModerate
Consecrated beneficialModerateStrongWeak
Low rationale for direct effectStrongWeakWeak
Several neutral trials, near futilityStrongWeakWeak

Custom Prior

In addition to the 9 Zampieri priors, you can add your own prior based on external evidence. Open the "Custom prior" collapsible section in the Analysis tab.

When to use a Custom Prior

  • You have a previous meta-analysis with a pooled estimate and standard error
  • You want to incorporate a specific expert opinion or regulatory assumption
  • The 9 Zampieri grid priors do not reflect the available external evidence
  • You want to test sensitivity to a particular prior belief

How to set the values

FieldWhat to enter
Prior MeanThe center of your prior on the log-ratio scale.
Example: if you believe OR = 0.82 → enter log(0.82) = −0.198
Prior SDStandard deviation on the log-ratio scale. Smaller SD = stronger prior.
Typical range: 0.10 (very strong) – 1.0 (very weak)
Prior NameA descriptive label (e.g., "Meta-analysis prior")

Example: A published meta-analysis of 5 RCTs reports a pooled OR = 0.82 with 95% CI 0.68–0.99.

  1. Mean = log(0.82) = −0.198
  2. SE = (log(0.99) − log(0.68)) / (2 × 1.96) = (−0.01 − (−0.386)) / 3.92 = 0.096 → use this as SD
  3. Name = "Meta-analysis (5 RCTs)"

This prior will appear as an additional row in the results table and an extra curve in the plots.

If you only want to use your custom prior without the Zampieri grid, uncheck all 9 checkboxes and only fill in the custom fields. The Flat (Reference) prior is always included automatically.

Probability Definitions & Clinical Thresholds

Bad Outcome (e.g., mortality)

P(Benefit)P(ratio < 1.0)
P(Harm)P(ratio > 1.0)
P(Important Benefit)P(ratio < benefit threshold)
Default: P(ratio < 0.80)
P(Severe Harm)P(ratio > harm threshold)
Default: P(ratio > 1.25)
ROPEP(0.91 < ratio < 1.10)

Good Outcome (e.g., survival)

P(Benefit)P(ratio > 1.0)
P(Harm)P(ratio < 1.0)
P(Important Benefit)P(ratio > 1/benefit threshold)
Default: P(ratio > 1.25)
P(Severe Harm)P(ratio < 1/harm threshold)
Default: P(ratio < 0.80)
ROPEP(0.91 < ratio < 1.10)
Default thresholds: Severe Harm = ratio 1.25, Important Benefit = ratio 0.80. ROPE = 0.91–1.10. These are independently adjustable in the Analysis tab.

Understanding the Results

Summary Boxes

  • Observed ratio — Effect size from the study on the current scale
  • P(Benefit) / P(NI) — Key probability (superiority or non-inferiority)
  • P(Severe Harm) — Clinically important harm
  • I² (Prior Sensitivity) — Robustness to prior choice

Graphs

  • Posterior Density — Bell curve: green = benefit, red = harm
  • Cumulative Probability (CDF) — Read off P(Benefit), P(NI), etc. at any threshold
  • Forest Plot — All priors side by side
  • Heterogeneity Plot — Sensitivity to prior choice

Quick Example: ART Trial

ART trial (2017): OR 1.27 (95% CI 0.99–1.63, p = 0.057) for 28-day mortality — "not statistically significant."

Bayesian result: >93% probability of harm despite p = 0.057. Much more useful than "not significant."

Glossary

TermPlain English
PriorStarting belief about the treatment before this trial
PosteriorUpdated belief after combining prior with trial data
Neutral/Skeptical"Treatment probably does nothing" — centered at ratio = 1
Ratio MeasureOR, RR, or HR. A value of 1 means no effect; values below or above 1 favor one arm depending on whether the outcome is bad or good.
95% CrI95% probability the true value is in this range
ROPERegion of Practical Equivalence — effects too small to matter
NI MarginMaximum acceptable inferiority in a non-inferiority trial
P(NI)Bayesian probability that the treatment is non-inferior
How much results change with different prior assumptions