ps       (1.8.1 -> 1.9.0) [CRAN]
jsonlite (1.8.9 -> 1.9.0) [CRAN]
curl     (6.2.0 -> 6.2.1) [CRAN]
xfun     (0.50  -> 0.51 ) [CRAN]
tinytex  (0.54  -> 0.55 ) [CRAN]

The downloaded binary packages are in
    /var/folders/36/1t9xtfl51px173qfsbg8tlcc0000gn/T//RtmpyAzzuW/downloaded_packages
── R CMD build ─────────────────────────────────────────────────────────────────
* checking for file ‘/private/var/folders/36/1t9xtfl51px173qfsbg8tlcc0000gn/T/RtmpyAzzuW/remotes9ebb7fe8f60/Genentech-phase1b-d1c9bbf/DESCRIPTION’ ... OK
* preparing ‘phase1b’:
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building ‘phase1b_1.0.0.tar.gz’
Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
  storing paths of more than 100 bytes is not portable:
  ‘phase1b/tests/testthat/_snaps/plotBetaDiff/plot-of-distibution-of-difference-of-two-arms-with-beta-mixture.svg’

A Bayesian approach to decision making in early development trials



Audrey Yeo
M Nursing (Sydney), M Sci Biostats (Zürich)
Bristol Myers Squibbs 2025

This Quarto-rendered presentation has ALT text and as much as possible, uses colour-blind friendly palettes

Agenda

  • Introduction & Motivation for Predictive Analytics at GPS
  • Introducing phase1b
    • Foundations of Beta-Binomial Posterior
    • Two types of Posteriors
    • Monte Carlo Simulation / Operating Characteristics
    • What’s this for ?

My Journey so far



Left view of Sydney Uni main campus Quadrangle and Anderson Building, slightly sunny day

South top flow view of RCH corridoor with Giant stature of 20 metres, aquarium not in sight

Building 2 view from ground showing a triangular shape

The official HEX sticker for phase1b R package

Current openstatsware logo

Career

  • Health Care/ Academia 2018-2020

    -   Uni of Zürich : 
        - TA for Probability Theory I 
        - RA for Center for Reproducible Science 
        - RA Development Econometrics
    
    -   Royal Children's Hospital
        - Registered Nurse, COVID ICU/ Neonatal ICU
  • joined Market Access at Roche mid 2021

    - RWD Enabling platform (Statistical Computing Environment, RWD assets, SQL)


a nice indoor day at innsbruck kletterzentrum in November

Career

  • joined R & D at Roche in mid 2022 :

    - Biostats Lead in Early Oncology Trials
    - Study Statistician for phase I-II, phase III trials
    - Led Roche/Genentech Dose Escalation on new SCE
    - Led the development of R package phase1b
    - Instructor for Julia Course Basel (Data Science, Quarto, ML modules)
    - Co-organiser and Presenter many Methodology seminars
  • phase1b’s world debut in 2024 :

    - PSI 2024
    - useR!2024 
    - R/Pharma 2024
    - Effective Statistician conference 
    - BMS, UBC, Roche/ Genentech

me standing infront of the speaker stage at psi 2021

Analysts are Strategic partners in the Pharma business :

… for therapeutics, we understand the combined Scientific and Business development of our assets such as :

  • Roadblocks, business assumptions and strategies on development
  • Scientific profiles of our assets e.g. half-life
  • Target audience, regular and edge cases for use
  • Regulatory frameworks

Developing phase1b has strengthened my understanding of this Strategic Partnership with target audience

About phase1b

  • 2015 : Started as a need in Roche’s early development group, package development led by Daniel Sabanés Bové in 2015.

  • 2023 : Refactoring, Renaming, adding Unit and Integration tests as current State-of-Art Software Engineering practice.

  • 100% written in R and Open Source.

  • website : genentech.github.io/phase1b/

library(devtools)
devtools::install_github("https://github.com/Genentech/phase1b")
library(phase1b)

This hexagon is the R sticker for phase1b R package. It has a bright purple background, light orange border and the title is in fuschia. The graph in the middle is a CDF distribution in dots that changes from red dots to green dots to indicate a stop to go decision

Use case:

A single arm novel therapeutic with an assumed control response rate is at most 60%
Example Interim Final
Responders 16 23
n 23 40
Response rate 69.57 % 57.5 %
Posterior probability* ask phase1b ask phase1b
Predictive posterior probability* ask phase1b -
Decision to develop molecule further : Go/Stop/Grey Zone ask phase1b ask phase1b

Prior and Posterior of Beta Distribution for \(\pi\)

  • Conjugate Prior is \(f(\pi)\), where \(\pi \sim {Beta(\alpha, \beta)}\), same family of distribution of Posterior
  • We know the mean response rate (RR) is : \[\pi = \ \frac {\alpha}{\alpha + \beta}\]
  • Likelihood is \(f(x|\pi)\), where \(x \sim {Binomial(x, n)}\)
  • The updated Posterior \(f( \pi | x )\) is again a \(Beta\) distribution (same family as prior) : \[ \pi| \ x \sim Beta(\alpha + x, \ \beta + n - x)\] where \(x\) is the number of responders of current trial
  • Posterior Probability :
    \(P (\pi > 60 \% | \alpha + x, \beta + n - x )\)
  • Predictive Posterior Probability :
    \(P (success \ or \ failure \ at \ final)\)

Posterior formulation :

\[ f(\pi | x) \propto \ \pi^{x} (1-\pi)^{n-x} * \frac {1}{B(\alpha, \beta)} \pi^{\alpha-1}(1-\pi)^{\beta-1} \]

  • (weighted sum version)

\[ f(\pi | x) \propto \ \pi^{x} (1-\pi)^{n-x} * \sum_{j = 1}^{k} \ w_j \frac {1}{B(\alpha_j, \beta_j)} \pi^{\alpha_j-1}(1-\pi)^{\beta_j-1} \]

Updating the Posterior

Using the formula for the mean, mode and median, where :

  • \(\alpha = 0.6, \beta = 0.4\) and

  • interim x = 16, interim n = 23 :
    \[ \pi = \ \frac {\alpha}{\alpha + \beta} = \ \frac {\alpha_{updated} }{\alpha_{updated} + \beta_{updated}} = \ \frac {16.6 }{16.6 + 7.4} ≈ 69.17 \% \]

    \[ mode (\pi) = \ \frac {\alpha_{updated} -1 }{\alpha_{updated} + \beta_{updated} - 2} = \ \frac {16.6 -1 }{16.6 + 7.4 - 2} ≈ 70.90 \% \] \[ median ( \pi) ≈ \ \frac {\alpha_{updated}}{ \alpha_{updated} + \beta_{updated} - \frac{2}{3} } ≈ 69.71 \% \]

Graphical representation of the updated Posterior

  • Prior parameters are \(\alpha\) = 0.6, \(\beta\) = 0.4
  • Updated Posterior parameters are \(\alpha\) = 16.6 and \(\beta\) = 7.4

Effect on varying weight on different priors Example

A variety of Priors

  • To illustrate how density of Prior changes with increased sample size even though mean is the same

A variety of Posteriors

  • To illustrate how density of Posterior changes with increased sample size even though mean is the same

postprob() example (Lee & Liu, 2008)

Example Interim
Responders 16
n 23
Response rate 69.57 %
Standard of Care Response rate 60 %
Posterior probability postprob( ) call from phase1b
phase1b::postprob(x = 16, n = 23, p = 0.60, par = c(0.6, 0.4))
[1] 0.8359808

Posterior Probability

  • Interim trial is efficacious if posterior probability exceeds 70% or P( RR ≥ 60 % | data ) > 70%
This graphs side by side show that by increasing number of responders out of 23 reaches our TPP threshold
Figure 1

Beta prior mixture

  • phase1b facilitates the flexibility of using various priors and its respective weightings:

               Prior is P_E ~ sum(weights * beta(parE[, 1], parE[, 2]))
a = phase1b::postprob(x = 16,
             n = 23,
             p = 0.60,
             parE = c(0.6, 0.4), weights = 1)

b = phase1b::postprob(x = 16,
             n = 23,
             p = 0.60,
             parE = c(2, 4), weights = 1)

0.5*(a + b)

phase1b::postprob(x = 16,
             n = 23,
             p = 0.60,
             parE = rbind(c(0.6, 0.4), c(2, 4)), weights = c(0.5, 0.5))
  • Posterior formulation :

\[ f(\pi | x) \propto \ \pi^{x} (1-\pi)^{n-x}\sum_{j = 1}^{k} \ w_j \frac {1}{B(\alpha_j, \beta_j)} \pi^{\alpha_j-1}(1-\pi)^{\beta_j-1} \]

predprob() example (Lee & Liu, 2008)

Example Interim
Responders 16
n 23
Response rate 69.57 %
Standard of Care Response rate 60 %
Predictive Posterior probability predprob( ) call from phase1b
control = 0.6
confidence_seventy = 0.7
result <- phase1b::predprob(
  x = 16, n = 23, Nmax = 40, p = control, thetaT = confidence_seventy,
  parE = c(0.6, 0.4)
)
result$result
[1] 0.8211011
confidence_ninety = 0.9
result_high_thetaT <- phase1b::predprob(
  x = 16, n = 23, Nmax = 40, p = control, thetaT = confidence_ninety,
  parE = c(0.6, 0.4)
)
result_high_thetaT$result
[1] 0.5655589

Predictive Posterior Probability

Predictive Posterior Probability is the Posterior probability of additional responders.

        (Note : 40 - 23 = 17 remaining patients. Potentially 16 + 17 responders at final = 33)
These two graphs side by side show that by increasing the threshold for an Efficacy or Go decision, the number of responders out of 40 is higher with the higher threshold, ie 35 patients instead of 32 patients of 40
(a) \(P (\pi > 0.6 | \ data )\) > 70%
These two graphs side by side show that by increasing the threshold for an Efficacy or Go decision, the number of responders out of 40 is higher with the higher threshold, ie 35 patients instead of 32 patients of 40
(b) \(P (\pi > 0.6 | \ data )\) > 90%
Figure 2: Predictive Posterior CDF for different Efficacy Rules

Operating Characteristics : Monte Carlo Simulations and threshold for Success (and Failure)

  • Efficacy criteria, e.g. we would stop for Efficacy (Success) if : Pr( RR > p1) > tU
  • Futility criteria, eg. we would stop for Futility (Failure) if : Pr( RR < p0) > tL

Rules and Operating characteristics. A use case for ocPostprob():

  • Stop for Efficacy: Go if \(P( \pi > 60\% | \ data ) > 90 \%\)
  • Stop for Futility: Stop if \(P( \pi < 60\% | \ data ) > 70 \%\)
  • Prior of treatment arm \(Beta(0.6, 0.4)\).
set.seed(2025)
res <- phase1b::ocPostprob(
  nnE = c(23, 40), 
  truep = 0.60, 
  p0 = 0.60, 
  p1 = 0.60, 
  tL = 0.70, 
  tU = 0.90, 
  parE = c(0.6, 0.4),
  sim = 500, 
  wiggle = TRUE, 
  nnF = c(23, 40)
)

Results

ExpectedN PrStopEarly PrEarlyEff PrEarlyFut PrEfficacy PrFutility PrGrayZone
34 36.8 % 8.8 % 28 % 11 % 40 % 49 %



  • At n = 34, we have some useful results (we did not have to evaluate 40!)

  • 1/3 of results are known at interim, most of these results are in the Gray Zone

  • ~ 1/2 of results are also at the Gray Zone at final

Expanded features

…. and wiggle room!

SOC uncertainty single-arm two-arm simulation plotting boundaries
postprob ✔️
postprobDist ✔️ ✔️
predprob ✔️
predprobDist ✔️ ✔️
ocPostprob ✔️ ✔️
ocPostprobDist ✔️ ✔️ ✔️
ocPredprob ✔️ ✔️
ocPredprobDist ✔️ ✔️ ✔️
ocRctPostprobDist ✔️ ✔️ ✔️ ✔️
ocRctPredprobDist ✔️ ✔️ ✔️ ✔️
plotBeta ✔️ ✔️
plotDecision ✔️
plotOc ✔️
plotBounds ✔️
boundsPostprob ✔️
boundsPredprob ✔️

Some references

  • Thall P F, Simon R (1994), Practical Guidelines for Phase IIB Clinical Trials, Biometrics, 50, 337-349

  • Lee J J, Liu D D (2008), A Predictive probability design for phase II cancer clinical trials, 5(2), 93-106, Clinical Trials

  • Yeo, A T, Sabanés Bové D, Elze M, Pourmohamad T, Zhu J, Lymp J, Teterina A (2024). Phase1b : Calculations for decisions on Phase 1b clinical trials. R package version 1.0.0, https://genentech.github.io/phase1b

  • Inclusive Speaker Orientation Linux Foundation

  • Zeileis, Fisher, Hornik, Ihaka, McWhite, Murrell, Stauffer, Wilke (2020) colorspace: A Toolbox for Manipulating and Assessing Colors and Palettes. Journal of Statistical Software.

Thanks

Audrey Yeo
M Nursing (Sydney), M Sci Biostats (Zürich)
Bristol Myers Squibbs

Outlook 2025

a nice outdoor day at innsbruck kletterzentrum in November


Effect on varying weight on different priors Example 2

These two graphs side by side show that by increasing the threshold for an Efficacy or Go decision, the number of responders out of 40 is higher with the higher threshold, ie 35 patients instead of 32 patients of 40

These two graphs side by side show that by increasing the threshold for an Efficacy or Go decision, the number of responders out of 40 is higher with the higher threshold, ie 35 patients instead of 32 patients of 40

State-of-Art R software/packages are currently valuable because it makes robust analysis, faster. One example is the phase1b

In a nutshell :
A robust, reliable and reproducible tool that calculates the Bayesian posterior probability and predictive posterior probability.

What is a state-of-art tool ? Check out a past workshop here

  • Integrative and Unit testing
  • Example and good documentation
  • Assertions on input arguments and internal results that get passed on
  • Check expected and actual results

Talks 2025

Year Month Date Firm Talk
2025 March 24 DAGStat Practical Bayesian Statistics : A gentle refresher on probability theory, Bayesian Framework and Intuition for effective application in Biostatistics.
2025 March 24 DAGStat Good Software Engineering Practice for R Packages

Associations

Firm Title Since
Swiss Statistical Society Member 2020
openstatsware Member 2024
R/Pharma Organization committee 2024
open Source in Pharma's Diversity Alliance Member 2024
EFSPI event Volunteer 2024