ClinicalBayes is an advanced interactive R Shiny application designed for Statisticians and Clinical Researchers to implement Bayesian Dynamic Borrowing. It facilitates the integration of historical control data into current clinical trials to enhance statistical power and optimize decision-making.
This toolkit enables users to:
- Implement Dynamic Borrowing: Utilize sophisticated methods like rMAP and Power Priors to leverage historical information without compromising trial integrity.
- Quantify Evidence: Calculate Effective Sample Size (ESS) to understand the "worth" of borrowed data in terms of patient numbers.
- Simulate Outcomes: Evaluate the Operating Characteristics (Type I Error and Power) of a design under varying treatment effects.
| Module | Detail | Primary Output | Goal |
|---|---|---|---|
| Binary Endpoints | Dynamic borrowing for proportions (rMAP, Power Prior). | Posterior Densities / ESS Boxes | Calculating borrowed control evidence. |
| Continuous Endpoints | Normal-Inverse-Gamma modeling for mean and variance. | Mu/Sigma Overlay Plots | Handling unknown variance in borrowing. |
| Decision Analysis | Posterior probability |
Threshold Histograms | Determining trial "Go/No-Go" status. |
| Op. Characteristics | Monte Carlo simulation over grids of true effects. | Power/Alpha Curves | Validating design robustness. |
| Commensurate Prior | MCMC-based borrowing via Stan. | Trace Plots / Shrinkage Summary | Data-driven conflict handling. |
The application centers on the construction of informative priors. For binary endpoints, it supports rMAP (Robust Meta-Analytic Prior), which uses a mixture model to guard against "prior-data conflict" by adding a non-informative component. For continuous data, it employs Normal-Inverse-Gamma distributions to simultaneously borrow information on both means and variances.
The Power Prior approach (
For complex borrowing scenarios, the app integrates with CmdStanR. The Commensurate Prior model uses a logit-link to let the current data "decide" how much to borrow based on the consistency (commensurability) between historical and current control groups.
Users configure their Bayesian scenario here:
- Methodology Selection: Toggle between rMAP, Power Priors, or Commensurate models.
-
Parameter Tuning: Adjust robustness weights or borrowing strength (
$\alpha$ ) via sliders. -
Data Synchronization: Input current trial events (
$y$ ) and sample sizes ($n$ ) for both Control and Treatment arms. - Build Action: Triggers the Bayesian engine to synthesize priors and posteriors.
The UI provides instant feedback through high-level metrics and visual diagnostics:


