Tutorials › Bayesian Clinical Trials › Worked Analysis of a Registry-Based External Control

External and Real-World Controls · Tutorial 399 of 696

Worked Analysis of a Registry-Based External Control

Learn how to construct and adjust a registry-based external comparator, assess whether the comparison is credible, and interpret a Bayesian estimate of its treatment effect.

Advanced 11 min read

What You'll Learn

  • Align eligibility, time zero, follow-up, and endpoint definitions across a trial and registry.
  • Construct an external-control cohort for a defined trial target population.
  • Calculate transport weights and effective sample size, and interpret their diagnostics.
  • Interpret a Bayesian posterior hazard ratio and its uncertainty in clinical context.
  • Examine how unmeasured confounding and modeling choices can change the conclusion.

From Registry Records to a Defined Comparison

A registry-based external control can make a single-arm trial more informative, but it does not recreate randomization. The analysis compares outcomes among trial participants receiving treatment with outcomes among eligible registry patients who did not receive that treatment. Its credibility therefore depends on a sequence of linked decisions: matching the protocol’s target question, constructing comparable cohorts, adjusting measured differences, and making the remaining uncertainty visible.

The target must be specified before fitting a model. For a time-to-event outcome, define the treatment contrast, the population to which it applies, the outcome, and the follow-up period. In this tutorial, the effect measure is a hazard ratio (HR): the treatment-group hazard divided by the external-control hazard, conditional on the chosen model. An HR below 1 favors treatment when the event is clinically undesirable.

Definition: A registry-based external control is a comparison group assembled from registry records outside the trial. A transport-weighted comparison gives registry patients different analysis weights so that, on measured baseline characteristics, the weighted registry cohort better represents the trial’s target population. This adjustment addresses measured differences only; it does not, by itself, make treatment assignment exchangeable.

A useful protocol-alignment checklist covers the population, treatment eligibility, index date (time zero), baseline covariates, endpoint definition, and follow-up rules. In particular, both groups must enter risk follow-up at a comparable point in the disease and care pathway. Starting registry follow-up earlier than trial follow-up can create immortal-time or disease-stage differences that adjustment at baseline may not repair. Endpoint dates and censoring rules also need to be comparable; a registry’s routine-care ascertainment may differ from trial visits.

Worked Example: Aligning the Protocol and Building the Cohort

Suppose a hypothetical single-arm trial enrolls 80 adults with a specified advanced disease, requires documented progression after a prior therapy, and starts follow-up on the date the study treatment begins. The primary endpoint is time from that date to death, with administrative censoring at 12 months. A registry contains 620 patients treated during the same calendar period.

The target comparison is the 80 trial participants under study treatment versus registry patients who would have met the same disease, prior-therapy, and progression criteria at a comparable treatment-decision date. Investigators apply the same minimum baseline-record requirements to both sources. They exclude registry records without a usable index date or adequate endpoint follow-up information, leaving 240 potentially eligible registry patients.

For each retained registry patient, the index date is the date at which the patient first meets the aligned treatment-decision criteria—not an earlier diagnosis date. Follow-up then begins on that date, as it does for trial participants at treatment initiation. The endpoint is death from any cause in both sources, and both groups are censored at 12 months. These choices align the operational definitions; they do not prove that all relevant prognostic characteristics are measured or that the populations are exchangeable.

Adjustment and Diagnostics

Let \(S=1\) indicate trial membership and \(S=0\) registry membership, and let \(X\) denote measured baseline characteristics relevant to trial participation and prognosis. One approach estimates the probability of trial membership from \(X\) in the pooled data. Registry patients can then receive weights proportional to the odds of trial membership:

$$ w_i \propto \frac{P(S_i=1\mid X_i)}{P(S_i=0\mid X_i)}, \qquad S_i=0. $$

The weights are scaled according to the chosen analysis convention; multiplying every registry weight by the same positive constant does not change a weighted partial-likelihood estimate. The intended effect is to give greater influence to registry patients whose measured profiles resemble those of trial participants. The relevant assumptions include adequate overlap in \(X\), a sufficiently well-specified membership model, comparable outcome definitions, and no important unmeasured differences that jointly affect source membership and outcome after conditioning on \(X\). These are substantive assumptions, not consequences of the weighting formula.

Check covariate balance before and after weighting, including clinically important prognostic factors and nonlinearities where relevant. Inspect the distribution of weights, identify extreme values, and assess whether trial patients have registry counterparts. The effective sample size (ESS) summarizes weight concentration; for weights \(w_i\), it is:

$$ \mathrm{ESS}=\frac{\left(\sum_i w_i\right)^2}{\sum_i w_i^2}. $$

ESS is at most the number of records with positive weights, and it falls when a few records dominate. It is a diagnostic, not a replacement for the actual sample size or a guarantee of valid inference. A low value warns that the adjusted estimate may depend heavily on a small part of the registry.

Worked Example: Checking Weight Concentration

For a small hypothetical illustration, suppose four registry records have scaled weights \(0.250\), \(0.429\), \(0.667\), and \(1.000\). These values are used only to illustrate the calculation; an actual analysis would diagnose weights over the full eligible cohort.

The sum of weights is \(0.250+0.429+0.667+1.000=2.346\). The sum of squared weights is \(0.250^2+0.429^2+0.667^2+1.000^2=0.0625+0.184041+0.444889+1.000=1.691430\). Therefore:

$$ \mathrm{ESS}=\frac{(2.346)^2}{1.691430} =\frac{5.503716}{1.691430} \approx 3.254. $$

The ESS is about 3.25, below the four records available, indicating some weight concentration. This tiny example cannot establish that the cohort is adequate: in a real analysis, balance, overlap, and the clinical meaning of high-weight records must also be examined.

For time-to-event outcomes, a weighted Cox model is one possible analysis, with treatment group as the exposure and the prespecified baseline covariates included as appropriate. Its proportional-hazards assumption should be assessed, for example by examining time patterns in residuals and treatment effects. Also inspect influential observations, censoring patterns, endpoint completeness, and whether results change materially under reasonable alternative covariate or weight specifications. If proportional hazards is implausible, a single HR may obscure time-varying effects; a prespecified alternative such as a time-specific survival contrast may be more interpretable.

Bayesian Estimation and Interpretation

A Bayesian analysis combines a likelihood for the adjusted treatment-effect estimate with a prior distribution for the log HR, denoted \(\beta=\log(\mathrm{HR})\). For a simple worked calculation, suppose the adjusted analysis provides an approximately normal likelihood, \(\hat{\beta}\mid\beta\sim N(\beta,SE^2)\), and use a normal prior \(\beta\sim N(0,100)\). The prior is centered at no effect and is very broad on the log-HR scale. This summary-likelihood calculation is a working approximation; uncertainty from estimated weights and model choices must be considered in the analysis design rather than assumed to vanish.

Result: With a normal likelihood \(\hat{\beta}\mid\beta\sim N(\beta,SE^2)\) and prior \(\beta\sim N(m_0,v_0)\), the posterior is normal with variance \(v_1=(1/SE^2+1/v_0)^{-1}\) and mean \(m_1=v_1(\hat{\beta}/SE^2+m_0/v_0)\). A posterior interval describes uncertainty about the parameter conditional on the likelihood, prior, and modeling assumptions.

This result follows by multiplying the normal likelihood kernel and prior kernel. Their exponent, up to terms not involving \(\beta\), is:

$$ -\frac{(\hat{\beta}-\beta)^2}{2SE^2} -\frac{(\beta-m_0)^2}{2v_0} = -\frac{1}{2}\left(\frac{1}{SE^2}+\frac{1}{v_0}\right) \left(\beta-\frac{\hat{\beta}/SE^2+m_0/v_0}{1/SE^2+1/v_0}\right)^2 +\text{constant}. $$

The coefficient of the squared term gives the posterior precision, and its center gives the posterior mean stated above. This derivation applies to the normal summary model; it does not establish that the external-control comparison itself is unbiased.

Worked Example: Posterior Hazard Ratio From an Adjusted Comparison

Suppose a hypothetical, protocol-aligned analysis uses transport weighting and a weighted survival model. Assume its calibrated summary likelihood is \(\hat{\beta}=-0.25367\) with \(SE=0.1652\), where \(\beta\) is the log HR for treatment versus external control. Use the prior \(\beta\sim N(0,100)\).

The likelihood precision is \(1/0.1652^2\approx36.642\), and the prior precision is \(1/100=0.0100\). Thus the posterior standard deviation is:

$$ \sqrt{\frac{1}{36.642+0.0100}} \approx 0.1652. $$

The posterior mean is approximately \((-0.25367\times36.642)/(36.652)=-0.25360\), which rounds to \(-0.2536\). The posterior median HR is \(\exp(-0.2536)\approx0.7760\). A central 95% posterior interval for \(\beta\) is \(-0.2536\pm1.96(0.1652)=(-0.5774,\ 0.0702)\), which transforms to an HR interval of approximately \((0.561,\ 1.073)\).

Under this model, the posterior probability that the HR is below 1 is \(P(\beta<0\mid\text{data})=\Phi(0.2536/0.1652)=\Phi(1.5356)\approx0.938\). In context, this is about a 93.8% posterior probability of a lower hazard under treatment than under the external control, conditional on the specified model and prior. It is not a probability that the null hypothesis is true, nor does it account automatically for unmeasured confounding.

Sensitivity, Alternatives, and Failure Modes

A credible analysis asks whether the conclusion is stable to reasonable choices. Repeat the adjustment with defensible alternative membership models or covariate specifications, and examine the consequences of truncating extreme weights as a sensitivity analysis. Truncation can reduce variance but also change the target or introduce bias; report the rule and compare estimates rather than treating truncation as a cure. Consider whether plausible residual confounding could move the log HR enough to change the clinical interpretation. Such sensitivity analyses quantify dependence on assumptions; they cannot identify the true amount of unmeasured bias from the observed data alone.

Weighting is not the only adjustment strategy. Matching may improve transparency by showing which registry records resemble trial participants, but can discard records and change the population represented. Outcome regression models the outcome given covariates and can be more efficient when correctly specified, but may extrapolate where trial and registry profiles do not overlap. Standardization predicts outcomes under each treatment strategy for the target population, while weighting rebalances the source population. These approaches answer closely related questions only when their target populations and assumptions are aligned; agreement among them is reassuring but does not prove validity.

Failure modes include poor overlap, severe weight concentration, residual imbalance on key prognostic factors, inconsistent endpoint ascertainment, differential censoring, and a treatment effect that changes over time despite a constant-HR model. If trial participants occupy covariate regions absent from the registry, weighting cannot manufacture comparable controls. If the registry misses deaths or records them with delay, a fitted survival model may be precisely estimated but systematically misleading. These issues should prompt redesign, narrower target-population claims, or a different estimand—not merely a more elaborate prior.

Common mistake. “The weighted groups are balanced on measured covariates, so the external comparison is equivalent to a randomized trial.” Balance only addresses the measured variables used and checked; it does not rule out unmeasured confounding, selection bias, or differences in care and outcome recording. The correction is to interpret the posterior as conditional on explicit design and modeling assumptions, and to test how sensitive the estimate is to plausible departures from them.

Key takeaway: A registry comparison is a chain of evidence, not a single model output. Align the protocol and cohort first, diagnose overlap and balance after adjustment, check the survival-model assumptions, and interpret the posterior together with its sensitivity to design choices and unmeasured differences.

Check Your Understanding

Answer each question, then compare your reasoning with the brief solutions.

  1. Why should registry follow-up begin at a date comparable to the trial treatment-start date?
  2. If weights sum to 10 and squared weights sum to 40, what is the ESS?
  3. For a posterior log HR with mean \(-0.20\) and standard deviation \(0.10\), what is the approximate posterior probability that HR is below 1?
  4. Name one problem that good measured-covariate balance does not resolve.

Solutions. (1) Comparable time zero avoids comparing different disease stages or introducing time-related selection such as immortal-time bias. (2) \(\mathrm{ESS}=10^2/40=2.50\), indicating substantial weight concentration relative to the sum of weights. (3) Since HR is below 1 exactly when \(\beta<0\), the probability is \(\Phi(0.20/0.10)=\Phi(2)\approx0.977\), conditional on that posterior model. (4) Examples include unmeasured confounding, differential endpoint ascertainment, or lack of overlap in covariate regions not represented by the registry.

Clinical Biostats