library(knitr) opts_chunk$set(echo = TRUE, message = FALSE, error = FALSE, warning = FALSE, comment = "", fig.align = "center", out.width = "70%")
NCC
package allows users to simulate platform trials and to compare arms using non-concurrent control data.
We consider a platform trial evaluating the efficacy of $K$ treatment arms compared to a shared control. We assume that treatment arms enter the platform trial sequentially. In particular, we consider a trial starting with at least one initial treatment arm, where a new arm is added after every $\mathbf{d}=(d_1,...,d_K)$ patients have been recruited to the trial (with $d_1=0$).
We divide the duration of the trial into $S$ periods, where the periods are the time intervals bounded by times at which a treatment arm either enters or leaves the platform.
The below figure illustrates the considered trial design.
include_graphics("./man/figures/trial_general_1.PNG")
This package contains the following functions:
datasim_bin()
simulates data with binary outcomesdatasim_cont()
simulates data with continuous outcomesget_ss_matrix()
computes sample sizes per arm and periodlinear_trend()
is the linear time trend function, used to generate the trend for each patientsw_trend()
is the step-wise time trend function, used generate the trend for each patientinv_u_trend()
is the inverted-u time trend function, used generate the trend for each patientseasonal_trend()
is the seasonal time trend function, used generate the trend for each patientfixmodel_bin()
performs analysis using a regression model adjusting for periodsfixmodel_cal_bin()
performs analysis using a regression model adjusting for calendar timepoolmodel_bin()
performs pooled analysissepmodel_bin()
performs separate analysissepmodel_adj_bin()
performs separate analysis adjusting for periodsMAPprior_bin()
performs analysis using the MAP prior approachtimemachine_bin()
performs analysis using the Time Machine approachfixmodel_cont()
performs analysis using a regression model adjusting for periodsfixmodel_cal_cont()
performs analysis using a regression model adjusting for calendar timegam_cont()
performs analysis using generalized additive modelmixmodel_cont()
performs analysis using a mixed model adjusting for periods as a random factormixmodel_cal_cont()
performs analysis using a mixed model adjusting for calendar time as a random factormixmodel_AR1_cont()
performs analysis using a mixed model adjusting for periods as a random factor with AR1 correlation structuremixmodel_AR1_cal_cont()
performs analysis using a mixed model adjusting for calendar time as a random factor with AR1 correlation structurepiecewise_cont()
performs analysis using discontinuous piecewise polynomials per periodpiecewise_cal_cont()
performs analysis using discontinuous piecewise polynomials per calendar timepoolmodel_cont()
performs pooled analysissepmodel_cont()
performs separate analysissepmodel_adj_cont()
performs separate analysis adjusting for periodssplines_cont()
performs analysis using regression splines with knots placed according to periodssplines_cal_cont()
performs analysis using regression splines with knots placed according to calendar timesMAPprior_cont()
performs analysis using the MAP prior approachtimemachine_cont()
performs analysis using the Time Machine approachall_models()
is an auxiliary wrapper function to analyze given dataset (treatment-control comparisons) with multiple modelssim_study()
is a wrapper function to run a simulation study (treatment-control comparisons) for desired scenariossim_study_par()
is a wrapper function to run a simulation study (treatment-control comparisons) for desired scenarios in parallelplot_trial()
visualizes the progress of a simulated trialFor a more detailed description of the functions, see the vignettes in the R-package website (https://pavlakrotka.github.io/NCC/).
The below figure illustrates the NCC
package functions by functionality.
include_graphics("./man/figures/NCC_graph.png")
Please note that prior to installing the NCC
package, the JAGS library needs to be installed on your computer.
To install the stable version of the NCC
package from CRAN, please run the following code:
install.packages("NCC")
To install the latest development version of the NCC
package from GitHub, please run the following code:
# install.packages("devtools") devtools::install_github("pavlakrotka/NCC", build_vignettes = TRUE)
For further details regarding the package installation, see https://pavlakrotka.github.io/NCC/articles/installation.html.
Documentation of all functions as well as vignettes with further description and examples can be found at the package website: https://pavlakrotka.github.io/NCC/
[1] Krotka, P., Hees, K., et al. “NCC: An R-package for analysis and simulation of platform trials with non-concurrent controls.” arXiv preprint (2023): arXiv:2302.12634
[2] Bofill Roig, M., Krotka, P., et al. “On model-based time trend adjustments in platform trials with non-concurrent controls.” BMC medical research methodology 22.1 (2022): 1-16.
[3] Lee, K. M., and Wason, J. “Including non-concurrent control patients in the analysis of platform trials: is it worth it?.” BMC medical research methodology 20.1 (2020): 1-12.
[4] Saville, B. R., Berry, D. A., et al. “The Bayesian Time Machine: Accounting for Temporal Drift in Multi-arm Platform Trials.” Clinical Trials 19.5 (2022): 490-501
Funding
EU-PEARL (EU Patient-cEntric clinicAl tRial pLatforms) project has received funding from the Innovative Medicines Initiative (IMI) 2 Joint Undertaking (JU) under grant agreement No 853966. This Joint Undertaking receives support from the European Union’s Horizon 2020 research and innovation programme and EFPIA and Children’s Tumor Foundation, Global Alliance for TB Drug Development non-profit organisation, Spring works Therapeutics Inc. This publication reflects the authors’ views. Neither IMI nor the European Union, EFPIA, or any Associated Partners are responsible for any use that may be made of the information contained herein.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.