Clinical Trial Simulator
Overview
Simulate phase II and/or phase III clinical trials. It supports various types of endpoints and adaptive strategies. Tools for carrying out graphical testing procedure and combination test under group sequential design are also provided.
Bug fixes
fitLinear()andfitLogistic()(exceptscale = 'coefficient') no longer fail with "We are unable to reconstruct the data" when the right-hand side offormulatransforms a covariate, e.g.,log(x). The fitted rows are now passed toemmeansdirectly, so it no longer re-evaluates the model call, where the analysis data are not visible. The same re-evaluation caused a test failure on R-devel for Windows.
From NEWS.md in the release
Install
Health
- OK13 OK2026-09-08
- ERROR12 OK, 1 ERROR2026-09-07
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
Show 8 earlier changesHide 8 earlier changes
- ERROR12 OK, 1 ERROR2026-06-08
- OK13 OK2026-04-29
- ERROR13 OK, 1 ERROR2026-04-24
- OK14 OK2026-04-23
- ERROR13 OK, 1 ERROR2026-04-21
- OK14 OK2026-04-16
- ERROR13 OK, 1 ERROR2026-04-15
- OK14 OK2026-03-10
Documentation
- Help pages
- 57 (1 internal)
- Examples that run
- 83%25 run in a plain check (2 of them under a condition) · 1 only when donttest examples are enabled (R CMD check --as-cran) · 2 never run · 2 hold no code
- Exported functions with examples
- 60%
- Documented parameters
- 100%
- Return-value docs
- 96%
- Help pages citing references
- 2%
- An Example of Fixed Design with Two Correlated Endpoints HTML
- An Example of Simulating a Trial with Adaptive Design HTML
- An Example of Simulating a Trial with Adaptive Enrichment Design HTML
- Condition System for Triggering Milestones in a Trial HTML
- Conditional Power and Event-Number Reassessment HTML
- Crossover at a Milestone HTML
- Crossover Design with Wash-out Period HTML
- Define and Summarize Arms in Clinical Trials HTML
- Define Longitudinal Endpoints HTML
- Define Non-Time-to-Event Endpoints HTML
Show 8 moreHide 8 vignettes
- Define Time-to-Event Endpoints HTML
- Designs with Response-Adaptive Randomization HTML
- Dose-Ranging Study HTML
- Simulate Correlated Progression-Free Survival and Overall Survival as Endpoints Under Illness-Death Model HTML
- Simulate Correlated Progression-Free Survival and Overall Survival Using a Gumbel Copula HTML
- Simulate Trials with Dynamic Treatment Switching HTML
- Specify Actions to Execute at Trial Milestones HTML
- Wrapper Functions of Common Statistical Methods in TrialSimulator HTML
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 1
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
6 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/zhangh12/trialsimulator on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-10-16 · The repository has a site deploy workflow
pkgdown site last built 2026-10-16
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-04-10Named in .Rbuildignore: .claudeCommits: at least 1 crediting it in the message
- Claude Opus 5.51 commit · Oct 2026
Dependencies
Installing TrialSimulator adds 42 packages (22 with compiled code, 24 MB of source tarballs). Heaviest: ggplot2 6.0 MB, Rcpp 1.8 MB, emmeans 1.7 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 1.39.0Latest
- 1.35.8
- 1.20.1
- 1.18.4
- 1.17.1
- RR 4.6.0 released · 2026-04-24
- 1.16.02026-04-13 · diff ↗ ·
added 5 exports
Regimens, expandRegimen, qPiecewiseExponential, regimen, solvePiecewiseConstantExponentialDistribution - 1.10.12026-02-15 · diff ↗
- 1.10.02026-02-15 · diff ↗ ·
added 6 exports
add_arms, remove_arms, resize, set_duration, update_generator, update_sample_ratio - 1.7.02025-12-19 · diff ↗
- 1.3.02025-09-26 · diff ↗
- 1.0.02025-09-03
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2025-09-03
- Total releases
- 11 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 4.2 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("TrialSimulator")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-20, which the citation names so these numbers can be found later. More on citing and the projects behind them.