Package: trialr 0.1.6

Kristian Brock

trialr: Clinical Trial Designs in 'rstan'

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.

Authors:Kristian Brock [aut, cre], Trustees of Columbia University [cph]

trialr_0.1.6.tar.gz
trialr_0.1.6.zip(r-4.7-x86_64)trialr_0.1.6.zip(r-4.7-arm64)trialr_0.1.6.zip(r-4.6-x86_64)trialr_0.1.6.zip(r-4.6-arm64)
trialr_0.1.6.tar.gz(r-4.7-arm64)trialr_0.1.6.tar.gz(r-4.7-x86_64)trialr_0.1.6.tar.gz(r-4.6-arm64)trialr_0.1.6.tar.gz(r-4.6-x86_64)
trialr_0.1.6.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
trialr/json (API)

# Install 'trialr' in R:
install.packages('trialr', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/brockk/trialr/issues

Uses libs:
  • onetbb– Parallelism library for C++
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

onetbbcpp

5.84 score 6 packages 86 scripts 573 downloads 55 exports 64 dependencies

Last updated from:a1cf05da8f. Checks:10 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-arm64OK597
linux-devel-x86_64OK459
source / vignettesOK1140
linux-release-arm64OK516
linux-release-x86_64OK668
windows-devel-arm64OK640
windows-devel-x86_64OK782
windows-release-arm64OK652
windows-release-x86_64OK925
wasm-releaseOK420

Exports:augbin_2t_1a_fitaugbin_fitbinary_prob_successcareful_escalationclosest_to_targetcrm_codified_dose_logisticcrm_dtpscrm_fitcrm_paramscrm_path_analysiscrm_prior_beliefsdf_parse_outcomesdose_finding_fitdose_finding_path_nodeeff_at_doseefftox_analysis_to_dfefftox_contour_plotefftox_dtpsefftox_dtps_to_dataframeefftox_fitefftox_get_toxefftox_parameters_demoefftox_paramsefftox_parse_outcomesefftox_path_analysisefftox_priorsefftox_simulateefftox_solve_pefftox_superiorityefftox_utilityefftox_utility_density_plotget_efftox_priorsn_at_doseparse_dose_finding_outcomesparse_eff_tox_dose_finding_outcomespeps2_get_datapeps2_processprior_predictive_augbin_2t_1aprob_successprob_tox_exceedsranBin2rlkjcorrspread_pathsstan_augbinstan_augbin_demostan_crmstan_efftoxstan_efftox_demostan_hierarchical_response_thallstan_nbgstan_peps2total_weight_at_dosetox_at_dosetrialr_simulateweights_at_dose

Dependencies:abindarrayhelpersbackportsBHbinomcallrcheckmateclicodacpp11descdistributionaldplyrfarvergenericsggdistggplot2gluegridExtragtablegtoolsinlineisobandlabelinglatticelifecycleloomagrittrMASSmatrixStatsnumDerivotelpillarpkgbuildpkgconfigposteriorprocessxpspurrrquadprogQuickJSRR6RColorBrewerRcppRcppEigenRcppParallelrlangrstanrstantoolsS7scalesStanHeadersstringistringrsvUnittensorAtibbletidybayestidyrtidyselectutf8vctrsviridisLitewithr

BEBOP in PePS2
Introducing the BEBOP design | PePS2 Scenario in trialr | trialr | References

Last update: 2020-10-15
Started: 2020-10-15

CRM Case Study 1 - Levy et al (2006)
Prior beliefs | Cohort 1 | Cohort 2 | Cohort 3 | Cohort 4 | Cohort 5 | Cohort 6 | Trying to identify the exact model Levy et al. used | Other CRM vignettes | trialr and the escalation package | trialr | References

Last update: 2020-10-15
Started: 2020-10-15

Continual Reassessment Method
Usage | Empiric model | One parameter logisitic model with normal prior | One parameter logisitic model with gamma prior | Two parameter logisitic model with normal priors | Comparison | Are we interested in Pr(DLT) or Pr(MTD)? | Other CRM vignettes | trialr and the escalation package | trialr | References

Last update: 2020-10-15
Started: 2020-10-15

Dose pathways with CRM
Introduction | Dose pathways with CRM in trialr | Dose transition pathways for future cohorts | Summary | Other CRM vignettes | trialr and the escalation package | trialr | References

Last update: 2020-10-15
Started: 2020-10-15

EffTox
Recap of the EffTox model | EffTox in trialr | Simulation | Simulation speed | trialr and the escalation package | trialr | References

Last update: 2020-10-15
Started: 2020-10-15

Hierarchical Bayesian Model for Binary Responses
Hierarchical Bayesian model for binary responses | Implementation in trialr | Example | trialr | References

Last update: 2020-10-15
Started: 2020-10-15

Two-parameter logistic model for dose-finding by Neuenschwander, Branson & Gsponer
Usage | trialr and the escalation package | trialr | References

Last update: 2020-10-15
Started: 2020-10-15

Time-to-Event Continual Reassessment Method
Other CRM vignettes## Other CRM vignettes | trialr and the escalation package | trialr | References

Last update: 2020-10-15
Started: 2020-10-15

Visualisation with CRM
Other CRM vignettes | trialr and the escalation package | trialr | References

Last update: 2020-10-15
Started: 2020-10-15

Readme and manuals

Help Manual

Help pageTopics
The 'trialr' package.trialr-package trialr
Cast 'augbin_2t_1a_fit' object to 'tibble'.as_tibble.augbin_2t_1a_fit
Cast 'dose_finding_paths' object to 'tibble'.as_tibble.dose_finding_paths
Convert crm_fit object to 'data.frame'.as.data.frame.crm_fit
Convert efftox_fit object to 'data.frame'.as.data.frame.efftox_fit
Convert 'crm_fit' to instance of 'mcmc.list'as.mcmc.list.crm_fit
Convert 'efftox_fit' to instance of 'mcmc.list'as.mcmc.list.efftox_fit
Class used by 'trialr' to fit Wason & Seaman's Augmented Binary method in single arm trials with two post-baseline tumour assessments.augbin_2t_1a_fit
Class used by 'trialr' to fit Wason & Seaman's Augmented Binary method.augbin_fit
Calculate the binary probability of success.binary_prob_success binary_prob_success.augbin_2t_1a_fit
Dose selection function that practices careful escalation.careful_escalation
Get index of element in vector with value closest to a targetclosest_to_target
Calculate codified CRM doses.crm_codified_dose_logistic
Calculate dose-transition pathways for a CRM studycrm_dtps
Class of model fit by 'trialr' using the CRM dose-finding design.crm_fit crm_fit-class
Container class for parameters to fit the CRM models in trialr.crm_params crm_params-class
Fit a CRM model to the incrementally observed outcomes on a trial pathway.crm_path_analysis
Get the prior beliefs for a CRM trial scenario.crm_prior_beliefs
Process RStan samples from a CRM model.crm_process
Parse a string of dose-finding trial outcomes to binary vector notation.df_parse_outcomes
Class of dose-finding model fit by 'trialr' using Stan.dose_finding_fit dose_finding_fit-class
Class to hold the elements of a single dose-finding analysis residing in a pathway of analyses.dose_finding_path_node dose_finding_path_node-class
Get the number of efficacy events seen at the doses under investigation.eff_at_dose eff_at_dose.efftox_fit
EffTox analysis to data.frameefftox_analysis_to_df
Plot EffTox utility contoursefftox_contour_plot
Calculate dose-transition pathways for an EffTox studyefftox_dtps
Calculate dose-transition pathways for an EffTox studyefftox_dtps_to_dataframe
Class of model fit by 'trialr' using the EffTox dose-finding design.efftox_fit efftox_fit-class
Get the Prob(Tox) for Prob(Eff) and utility pairsefftox_get_tox
Get parameters to run the EffTox demoefftox_parameters_demo
Container class for parameters to fit the EffTox model in trialr.efftox_params efftox_params-class
Parse a string of EffTox outcomes to binary vector notation.efftox_parse_outcomes
Fit an EffTox model to the incrementally observed outcomes on a trial pathway.efftox_path_analysis
Simple class to hold prior hyperparameters for the EffTox model.efftox_priors
Process RStan samples from an EffTox modelefftox_process
Run EffTox simulationsefftox_simulate
Calculate the p-index for EffTox utility contoursefftox_solve_p
Get dose-superiority matrix in EffToxefftox_superiority
Get the utility of efficacy & toxicity probability pairsefftox_utility
Plot densities of EffTox dose utilitiesefftox_utility_density_plot
Get normal prior hyperparameters for the EffTox model.get_efftox_priors
Get the number of patients treated at the doses under investigation.n_at_dose n_at_dose.dose_finding_fit
Parse a string of dose-finding trial outcomes.parse_dose_finding_outcomes
Parse a string of phase I/II dose-finding trial outcomes.parse_eff_tox_dose_finding_outcomes
Get data to run the PePS2 trial examplepeps2_get_data
Process RStan samples from a BEBOP model fit to PePS2 datapeps2_process
Plot an crm_fitplot.crm_fit
Plot an efftox_fitplot.efftox_fit
Predict probability of success for given tumour size measurements.predict.augbin_2t_1a_fit
Print augbin_fit object.print.augbin_fit
Print crm_fit object.print.crm_fit
Print efftox_fit object.print.efftox_fit
Print nbg_fit object.print.nbg_fit
Sample data from the Augmented Binary model prior predictive distribution.prior_predictive_augbin_2t_1a
Calculate the probability of success.prob_success prob_success.augbin_2t_1a_fit
Calculate the probability that the rate of toxicity exceeds some thresholdprob_tox_exceeds prob_tox_exceeds.dose_finding_fit
Sample pairs of correlated binary eventsranBin2
Sample LKJ correlation matrices.rlkjcorr
Spread the information in dose_finding_paths object to a wide data.frame format.spread_paths
Fit Wason & Seaman's Augmented Binary model for tumour response.stan_augbin
Simple helper function to demonstrate fitting of an Augmented Binary model.stan_augbin_demo
Fit a CRM modelstan_crm
Fit an EffTox modelstan_efftox
Fit the EffTox model presented in Thall et al. (2014)stan_efftox_demo
Fit the hierarchical response model described by Thall _et al._ (2003).stan_hierarchical_response_thall
Fit a Neuenschwander, Branson & Gsponer logit dose-finding modelstan_nbg
Fit the P2TNE model developed for the PePS2 trial to some outcomes.stan_peps2
Obtain summary of an crm_fitsummary.crm_fit
Obtain summary of an efftox_fitsummary.efftox_fit
Get the total weight of patient outcomes at the doses under investigation.total_weight_at_dose total_weight_at_dose.default
Get the number of toxicity events seen at the doses under investigation.tox_at_dose tox_at_dose.dose_finding_fit
Run a simulation study.trialr_simulate
Get the weights of patient outcomes at the doses under investigation.weights_at_dose weights_at_dose.crm_fit weights_at_dose.default