⚕ No for
loop in clinical trial simulation ⚕
The goal of TrialSimulator
is to provide a pipeline for implementing simulation of clinical trial more efficiently and reliably. It follows principle of modularity to isolate codes of statistical testing from data generation and management. It provides a set of tools to sample endpoints of common or custom distributions, manage trial data, and summarize simulation results under fixed or adaptive designs. It also provides functions of group sequential design, graphical testing procedure, combination test, and closed test that are widely used in analyzing complex trial designs.
Shiny App
An online version of this app is hosted on shinyapps.io.
Validation
The validation documents for this R package are hosted here and are continuously updated.
Installation
You can install the development version of TrialSimulator
from GitHub with:
if (!require("remotes")) {
install.packages("remotes")
}
remotes::install_github(
"zhangh12/TrialSimulator",
build_manual = TRUE,
build_vignettes = TRUE,
force = TRUE
)
Getting Started
TrialSimulator
is designed with a modular architecture, allowing users to systematically construct and simulate clinical trials in a structured and flexible manner. The simulation process is broken down into three key steps:
- Defining Endpoints: Specify the treatment endpoints that will be evaluated throughout the trial.
- Specifying Milestone: Establish the conditions under which specific milestones (e.g., interim analysis, futility assessment, or stopping rules) will be triggered.
- Defining Actions for Milestones: Determine the appropriate actions to be taken once a milestone is triggered, such as adjusting enrollment, terminating treatment arms, or conducting statistical analysis.
To efficiently utilize TrialSimulator
for clinical trial simulations, we recommend reading the following vignettes in order:
- Define endpoints and arms
- Condition system for milestones
- Define actions for milestones
- Examples: fixed design
- Examples: adaptive design
- Design with dose selection, interim, and multiple endpoints
- Response-adaptive design
- [Enrichment design] Vignette is under development.
- Built-in methods supported in
TrialSimulator
- Wrapper functions of common statistical methods for estimating treatment effect
- [Group sequential test] See
?GroupSequentialTest
. - [Graphical testing procedure] See
?GraphicalTesting
. - [Combination test based on independent increment] Vignette is under development.