Docs/Bayesian Borrowing

Bayesian Historical Borrowing

Technical documentation for incorporating historical control data into current trial design with appropriate discounting. This module implements Power Priors, Commensurate Priors, and Meta-Analytic Predictive (MAP) Priors for external data synthesis.

1. Overview & Motivation

Historical borrowing leverages data from prior studies to strengthen inference in the current trial. When historical and current populations are similar, borrowing can reduce sample size requirements while maintaining statistical rigor.

Key Benefits

Smaller Trials

Reduce required sample size by 20-40% when historical data is highly relevant

Ethical

Fewer patients randomized to control when effect is well-established

Efficiency

Faster trials with preserved statistical precision

The Exchangeability Assumption

Borrowing is valid only when historical and current populations areexchangeable—meaning they can be treated as samples from the same underlying distribution. Key similarity dimensions:

  • Patient Population: Same disease stage, demographics, prior treatments
  • Endpoints: Identical definitions and assessment methods
  • Standard of Care: Similar background therapies
  • Time Period: No temporal drift in outcomes

Critical Warning

Inappropriate borrowing (from dissimilar populations) can inflate Type I error or bias treatment effect estimates. Always use conflict diagnostics and consider discounting when similarity is uncertain.

2. Power Prior Method

The power prior (Ibrahim & Chen, 2000) discounts historical likelihood by raising it to a power δ[0,1]\delta \in [0, 1]:

π(θD0,δ)L(θD0)δπ0(θ)\pi(\theta | D_0, \delta) \propto L(\theta | D_0)^\delta \cdot \pi_0(\theta)

For Beta-Binomial models with historical data (k0,n0)(k_0, n_0)and base prior Beta(α0,β0)\text{Beta}(\alpha_0, \beta_0):

θD0Beta(α0+δk0,β0+δ(n0k0))\theta | D_0 \sim \text{Beta}(\alpha_0 + \delta k_0, \beta_0 + \delta(n_0 - k_0))

Effective Sample Size

The ESS from the power prior is:

ESShistorical=δn0ESS_{historical} = \delta \cdot n_0
Discount FactorInterpretationWhen to Use
δ=1.0\delta = 1.0Full borrowing (100% weight)Identical population, same sponsor's prior trial
δ=0.5\delta = 0.5Skeptical borrowing (50% weight)Similar population, minor protocol differences
δ=0.2\delta = 0.2Conservative borrowing (20% weight)Different indication, mechanism-based only
δ=0.0\delta = 0.0No borrowing (ignore historical)Populations clearly different

Choosing the Discount Factor

The discount factor should be pre-specified in the protocol based on clinical judgment about similarity. A common approach: start withδ=0.5\delta = 0.5 as a “skeptical default” and adjust based on formal similarity assessment.

3. Commensurate Prior Method

The commensurate prior (Hobbs et al., 2011) uses a hierarchical model where the commensurability parameter τ\tau controls borrowing strength dynamically.

θcurrentθhistorical,τN(θhistorical,τ2)\theta_{current} | \theta_{historical}, \tau \sim N(\theta_{historical}, \tau^2)

Key insight: when τ0\tau \to 0, no borrowing (fully skeptical); when τ\tau \to \infty, approaches full borrowing.

Simplified Implementation

Zetyra uses a computationally efficient approximation that maps the commensurability parameter to an effective discount factor:

δeffective=τ1+τ\delta_{effective} = \frac{\tau}{1 + \tau}

τ=0\tau = 0

δ=0\delta = 0 (no borrowing)

τ=1\tau = 1

δ=0.5\delta = 0.5 (balanced)

τ=9\tau = 9

δ=0.9\delta = 0.9 (strong borrowing)

τ\tau \to \infty

δ1\delta \to 1 (full borrowing)

4. Meta-Analytic Predictive (MAP) Prior

When multiple historical studies are available, the MAP prior (Schmidli et al., 2014) synthesizes them using random-effects meta-analysis:

θiN(μ,τ2)\theta_i \sim N(\mu, \tau^2)

Where μ\mu is the pooled effect andτ2\tau^2 captures between-study heterogeneity.

Heterogeneity Assessment (I²)

The calculator reports the I² statistic to quantify heterogeneity:

I2=max(0,Q(k1)Q)×100%I^2 = \max\left(0, \frac{Q - (k-1)}{Q}\right) \times 100\%
I² RangeInterpretationRecommendation
0-25%Low heterogeneityFull borrowing appropriate
25-75%Moderate heterogeneityUse robust MAP
>75%High heterogeneityBorrow cautiously

Robust MAP Component

To protect against prior-data conflict, the robust MAP mixes the informative MAP prior with a vague component:

πrobust(θ)=(1w)πMAP(θ)+wπvague(θ)\pi_{robust}(\theta) = (1 - w) \cdot \pi_{MAP}(\theta) + w \cdot \pi_{vague}(\theta)

Where ww is typically 0.1–0.2 (10–20% vague component).

5. Prior-Data Conflict Diagnostics

The calculator assesses whether current trial data conflicts with the historical prior using a prior predictive check.

Conflict Detection Algorithm

Given current data (kcurrent,ncurrent)(k_{current}, n_{current})and effective prior Beta(α,β)\text{Beta}(\alpha, \beta):

  1. 1.Compute current rate: θ^=k/n\hat{\theta} = k/n
  2. 2.Compute prior mean: μ0=α/(α+β)\mu_0 = \alpha/(\alpha + \beta)
  3. 3.Compute predictive variance (includes sampling variability)
  4. 4.Calculate z-score and two-tailed p-value
P-valueConflict LevelAction
> 0.10NoneProceed with borrowing
0.01–0.10ModerateConsider reducing discount (δ × 0.5)
< 0.01SevereMinimal borrowing (δ ≤ 0.2) or none

Regulatory Requirement

The FDA guidance recommends pre-specifying how prior-data conflict will be handled in the Statistical Analysis Plan (SAP). Document the conflict detection criteria and fallback procedures.

6. Sample Size Impact

The calculator compares sample size requirements with and without historical borrowing to quantify the efficiency gain.

Comparison Framework

With Borrowing

Use effective prior Beta(α,β)\text{Beta}(\alpha, \beta)derived from historical data

Without Borrowing

Use uninformative prior Beta(1,1)\text{Beta}(1, 1)

For each scenario, the calculator finds the minimum nnachieving target power (80%) and Type I error control (5%).

Sample Size Reduction

Reduction %=nwithoutnwithnwithout×100%\text{Reduction \%} = \frac{n_{without} - n_{with}}{n_{without}} \times 100\%

Typical reductions range from 15–40% depending on historical data quality and discount factor.

7. Regulatory Considerations

FDA Bayesian Guidance Section V.D.4

“When utilizing external data, sponsors should describe methods for assessing the similarity of external data to trial data, including approaches for adjusting the degree of borrowing if inconsistencies are identified.”

Documentation Requirements

  • Historical Data Source: Study ID, publication reference, patient population, endpoints, and quality assessment
  • Similarity Justification: Explicit comparison of inclusion/exclusion criteria, endpoints, and standard of care
  • Borrowing Method: Power prior, commensurate, or MAP with parameter specifications
  • Conflict Handling: Pre-specified criteria and fallback procedures
  • Operating Characteristics: Type I error and power under various scenarios
  • Sensitivity Analysis: Results under alternative discount factors and prior specifications

8. API Quick Reference

POST /api/v1/calculators/bayesian-borrowing

Key Parameters

ParameterTypeDescription
methodstring"power_prior" | "commensurate_prior" | "map_prior"
historical_events, historical_nintHistorical study data (power/commensurate)
discount_factorfloatPower prior δ ∈ [0, 1] (default: 0.5)
studiesarrayList of studies for MAP prior (min 2)
robust_weightfloatMAP robust component weight (default: 0.1)

Key Response Fields

  • effective_prior — Resulting Beta(α, β) parameters
  • ess — Effective sample size breakdown
  • comparison — Sample size with/without borrowing
  • conflict_assessment — Prior-data conflict analysis
View full API documentation →