Clinical Trial Designs in 'rstan'
Overview
A collection of clinical trial designs and methods, implemented in 'rstan' and R, including: the Continual Reassessment Method by O'Quigley et al. (1990) doi:10.2307/2531628; EffTox by Thall & Cook (2004) doi:10.1111/j.0006-341X.2004.00218.x; the two-parameter logistic method of Neuenschwander, Branson & Sponer (2008) doi:10.1002/sim.3230; and the Augmented Binary method by Wason & Seaman (2013) doi:10.1002/sim.5867; and more. We provide functions to aid model-fitting and analysis. The 'rstan' implementations may also serve as a cookbook to anyone looking to extend or embellish these models. We hope that this package encourages the use of Bayesian methods in clinical trials. There is a preponderance of early phase trial designs because this is where Bayesian methods are used most. If there is a method you would like implemented, please get in touch.
Install
Health
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-07-29
- ERROR12 OK, 1 ERROR2026-07-27
- OK13 OK2026-06-09
Show 5 earlier changesHide 5 earlier changes
- ERROR12 OK, 1 ERROR2026-06-08
- OK12 OK2026-04-25
- NOTE11 OK, 3 NOTE2026-04-22
- ERROR10 OK, 3 NOTE, 1 ERROR2026-04-18
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 73includes a package overview page
- Examples that run
- 49%23 run in a plain check · 24 never run
- Exported functions with examples
- 85%
- Documented parameters
- 100%
- Return-value docs
- 87%
- Help pages citing references
- 29%
- BEBOP: Bayesian Evaluation of Bivariate Binary Outcomes and Predictive Information
- CRM Case Study 1 - Levy et al (2006) HTML
- CRM: Continual Reassessment Method HTML
- Dose pathways with CRM HTML
- EffTox
- Hierarchical Bayesian Model for Binary Responses
- NeuenschwanderBransonGsponer HTML
- Time-to-Event Continual Reassessment Method HTML
- Visualisation with CRM HTML
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 8
- Median days to close, 50 most recently updated closed PRs
- 14
Stars over time
Forks over time
Issues over time
PRs over time
9 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/brockk/trialr on 2026-10-22.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2023-10-15
Show all practicesHide 1 practice
Dependencies
Installing trialr adds 62 packages (31 with compiled code, 63 MB of source tarballs). Heaviest: BH 14 MB, stringi 11 MB, ggplot2 6.0 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 0.1.6Latest
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 0.1.5
- RR 4.0.0 released · 2020-04-24
- 0.1.42020-04-06 · diff ↗
- 0.1.32020-01-08 · diff ↗ ·
added 5 exports
eff_at_dose, n_at_dose, total_weight_at_dose, tox_at_dose, weights_at_dose - 0.1.22019-06-25 · diff ↗ ·
added 9 exports
augbin_2t_1a_fit, augbin_fit, binary_prob_success, prior_predictive_augbin_2t_1a, prob_success, rlkjcorr, stan_augbin, stan_augbin_demo, trialr_simulate - 0.1.12019-05-25 · diff ↗ ·
added 13 exports
careful_escalation, closest_to_target, crm_codified_dose_logistic, crm_dtps, crm_path_analysis, crm_prior_beliefs, dose_finding_fit, dose_finding_path_node, efftox_dtps_to_dataframe, efftox_path_analysis, parse_eff_tox_dose_finding_outcomes, prob_tox_exceeds, spread_paths - RR 3.6.0 released · 2019-04-26
- 0.1.02019-04-21 · diff ↗ ·
removed 8 exports
crm_process, gather_samples.crm_fit, efftox_process, gather_samples.efftox_fit, peps2_run_sims, thallhierarchicalbinary_parameters_demo, stan_files, stanmodelsadded 3 exports
parse_dose_finding_outcomes, stan_hierarchical_response_thall, stan_peps2 - 0.0.72019-03-03 · diff ↗
Show 8 earlier eventsHide 8 earlier events
- 0.0.62019-01-17 · diff ↗
- 0.0.52018-11-12 · diff ↗
- 0.0.42018-10-24 · diff ↗
- 0.0.32018-08-09 · diff ↗
- 0.0.22018-08-08 · diff ↗ ·
added 11 exports
df_parse_outcomes, stan_crm, crm_params, crm_fit, crm_process, gather_samples.crm_fit, efftox_fit, efftox_params, gather_samples.efftox_fit, stan_efftox, stan_efftox_demo - RR 3.5.0 released · 2018-04-23
- 0.0.12017-11-21
- RR 3.4.0 released · 2017-04-21
Package metadata
- First published
- 2017-11-21
- Total releases
- 14 / 9 yrs
- License
- GPL (>= 3) OSI
- Minimum R
- ≥ 3.5.0
- Download size
- 2.6 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("trialr")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-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.