pscDesign is a package which allows the design of prospective studies/trials using Personalised Synthetic Controls.
The purpose of a fully synthetic trial is to recruit only patients to an experimental arm. Personalised synthetic controls here allow a patients observed response to be compared against their model estimated control. Details can be found here (“https://richjjackson.github.io/mecPortal/”).
We present an example based in Pancreatic Ductal Adenocarcinoma using a Counter Factual Model (CFM) generated on patients receivign Gemcitabine therapy. Full details on the model setting, construction, validation and interpretation are found here
The overall design uses a Bayesian approach and uses a simulation study to estimate the study parameters. Evaluations of efficacy are based on the posterior distribution comparing the experimental regimen against the synthetically generated controls.
Trial design also dependes on the ability to recruit patients, in
this example we assume a study with 4 sites recruiting at an average
rate of 0.88 patients/site/month and sites opening to recruitment at a
rate of 1 per month.
The pscDesign package includes a function [recForcast()] which allows
for monthly recruitment estimates.
As an illustration, we initially examine traditional randomised phase II trial designsetting a HR = 0.7, using an alpha level of 0.1 and power of 90%
gsdesign.survival(c(1),haz.ratio=0.7,r=1,sig.level=0.1,power=0.9,alternative="one.sided")
Group sequential design for comparing survival data with hazard ratio = 0.7
Treatment allocated at 1:1 (C:E) ratio
power family of boundary; 0 (Pocock) to 0.5 (O'Brien-Fleming)
total number of events = 206.56
information fraction = 1
efficacy boundary = 1.282 (power = 0.5)
sig.level = 0.1
power = 0.9
alternative = one.sided
We now walk through the steps required to use the pscDesign function. To do this we make use of the gemCFM data
library(pscDesign)
#> Loading required package: survival
library(psc)
#> Loading required package: ggplot2
#>
#> Attaching package: 'psc'
#> The following object is masked from 'package:pscDesign':
#>
#> gemCFM
gemCFM <- pscDesign::gemCFMBefore using the pscDesign() function to perform the simulation study, we first ensure the CFM is compatible by simulating a single dataset using the dataSim() function
simData <- dataSim(gemCFM,n0=0,n1=500,beta=log(0.5),fuTime=12,recTime=24)
psc.ex <- pscfit(gemCFM,simData)We can evaluate the fit of this example using the summary and plot() functions
summary(psc.ex)
#> Counterfactual Model (CFM):
#> A model of class 'flexsurvreg'
#> Fit with 5 internal knots
#>
#> CFM Formula:
#> Surv(time, cen) ~ LymphN + ResecM + Diff_Status + PostOpCA199
#> <environment: 0x118659938>
#>
#> CFM Summary:
#> Expected response for the outcome under the CFM:
#> S lo hi
#> 23.00 20.61 26.00
#>
#> Observed outcome from the Data Cohort:
#> [,1]
#> median NA
#> 0.95LCL NA
#> 0.95UCL NA
#>
#> MCMC Fit:
#> Posterior Distribution obtaine with fit summary:
#> variable rhat ess_bulk ess_tail mcse_mean
#> [1,] beta_1 1.001954 1001.136 1248.732 0.002850334
#>
#> Summary:
#> Posterior Distribution for beta:Call:
#> CFM model + beta
#>
#> Coefficients:
#> variable mean sd median q5
#> posterior beta_1 -0.782675 0.09049631 -0.7825153 -0.9293457
#> q95
#> posterior -0.6371023
plot(psc.ex)
#> variable mean sd median q5
#> posterior beta_1 -0.782675 0.09049631 -0.7825153 -0.9293457
#> q95
#> posterior -0.6371023
#> Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
#> ℹ Please use `linewidth` instead.
#> ℹ The deprecated feature was likely used in the ggpubr package.
#> Please report the issue at <https://github.com/kassambara/ggpubr/issues>.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.
#> Warning: Using the `size` aesthetic in this geom was deprecated in ggplot2 3.4.0.
#> ℹ Please use `linewidth` in the `default_aes` field and elsewhere instead.
#> ℹ The deprecated feature was likely used in the survminer package.
#> Please report the issue at <https://github.com/kassambara/survminer/issues>.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.
#> Ignoring unknown labels:
#> • colour : "Strata"We first demonstrate the impact of a single arm trial design. We design the study in 2-steps. Initially we provide a estimated monthly recruitment rate.
This is based on 4 sites recruiting at an average rate of 0.88
patients/site/month.
Sites will themselves open at a rate of 1 site/month and a maximum
recruitment time of 24 months is set. This gives a total sample size of
70 patients.
N.site <- 4
rpm <- 0.88
open.rate <- 1
recTime <- 24
recF <- recForcast(N.site,rpm,open.rate,Max.Time=recTime) We run the pscDesign function using the ‘rec=recF’ option to include these recruitment estimates. Other parameters show we are interested in a ningle arm study (n=0) looking for a HR = 0.7 (beta=log(0.7)). We allow for a follow-up period of 12 months and in this example use only 10 simulations (you will want more but we keep this small to keep the processing speed down). We limit the pscfit function to use 750 MCMC iteration and allow the first 250 to act as a burn in.
pscDes_singArm <- pscDesign(CFM=gemCFM,n0=0,n1=70,beta=log(0.7),rec=recF,
fuTime=12,nsim=10,nsim.psc=750,burn.psc=250,
bound=0,direction="greater",
alpha_eval=c(0.05,0.1,0.15,0.2))We view the results below showing the esitmated number of events, posterior mean and posterior standard deviation. Also given are the power estiamtes for a range of alpha levels.
In a randomised trial design we extend the example to allow 30 patients onto the control arm as well as 70 on the experimental.
Given the extra patients required we extend recruitment by a period of 6 months.
N.site <- 4
rpm <- 0.88
open.rate <- 1
recTime <- 30
recF <- recForcast(N.site,rpm,open.rate,Max.Time=recTime) #100 patients over 30 monthsWe ammend the pscDesign() function allowing for control patients (n=30)
pscDes_rand <- pscDesign(CFM=gemCFM,n0=30,n1=70,beta=log(0.7),rec=recF,
fuTime=12,nsim=5,nsim.psc=750,burn.psc=250,
bound=0,direction="greater",
alpha_eval=c(0.05,0.1,0.15,0.2))The results of the design given below now include estimates of the efficacy parameter using Personalised Synthetic Controls, Direct Estimation (e.g. using only the information in the trial) and the ‘posterior’ estimate which combines these two efficacy estimates