This repository contains R code to implement and simulate the Bayesian Model Averaged Partial Order Continual Reassessment Method (BMA-POCRM) and related POCRM analyses for dose-combination escalation trials. The codebase includes trial simulations, processing/analysis scripts and helper utilities used to run large simulation studies and produce summary results and plots.
bma_pocrm_post.R— Core implementation of POCRM and BMA-POCRM functions, single-trial and repeated-trial simulators, incoherency checks, and utilities used across the project.analysis/— Post-processing and analysis scripts that read saved simulation output and compute summary statistics, incoherency analyses, and plotting routines.2stage_4grid_processing_func.R— Example processing script for 2-stage 4-grid simulation results.- Other analysis scripts used to perform scenario analyses and plotting.
scripts/— Simulation drivers and helper utilities used to launch simulation runs and batch processing.helpers/— Lower-level R scripts used by the simulation drivers.
results/— Intended output folder where simulation.RDataresults are stored (empty in the repo; populated after running simulations).
This project is written in R. Key R packages used (as seen in the code) include:
- dfcrm
- nnet
- numDeriv
- tidyverse
- ggdist
- Open the repository in RStudio or start an R session in the project root.
- Source the core file and inspect available functions:
source("bma_pocrm_post.R")
ls() # inspect available functions- Run an example processing script to summarise previously generated results (change file paths as needed). For example:
source("analysis/2stage_4grid_processing_func.R")
# the example script calls run_combination(1) at the bottom; edit parameters if needed- To run full simulations, use the driver scripts in
scripts/(for example,scripts/run_4grid_sim_processing.Ror the scripts inscripts/helpers/).
MIT License. See LICENSE file for details.