Package: trialr 0.1.5.9001

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.5.9001.tar.gz
trialr_0.1.5.9001.zip(r-4.5)trialr_0.1.5.9001.zip(r-4.4)trialr_0.1.5.9001.zip(r-4.3)
trialr_0.1.5.9001.tgz(r-4.4-x86_64)trialr_0.1.5.9001.tgz(r-4.4-arm64)trialr_0.1.5.9001.tgz(r-4.3-x86_64)trialr_0.1.5.9001.tgz(r-4.3-arm64)
trialr_0.1.5.9001.tar.gz(r-4.5-noble)trialr_0.1.5.9001.tar.gz(r-4.4-noble)
trialr.pdf |trialr.html
trialr/json (API)
NEWS

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

Peer review:

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

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

55 exports 41 stars 3.07 score 68 dependencies 2 dependents 115 scripts 449 downloads

Last updated 11 months agofrom:cbb4362893. Checks:OK: 1 NOTE: 8. Indexed: yes.

TargetResultDate
Doc / VignettesOKAug 27 2024
R-4.5-win-x86_64NOTEAug 27 2024
R-4.5-linux-x86_64NOTEAug 27 2024
R-4.4-win-x86_64NOTEAug 27 2024
R-4.4-mac-x86_64NOTEAug 27 2024
R-4.4-mac-aarch64NOTEAug 27 2024
R-4.3-win-x86_64NOTEAug 27 2024
R-4.3-mac-x86_64NOTEAug 27 2024
R-4.3-mac-aarch64NOTEAug 27 2024

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:abindarrayhelpersbackportsBHbinomcallrcheckmateclicodacolorspacecpp11descdistributionaldplyrfansifarvergenericsggdistggplot2gluegridExtragtablegtoolsinlineisobandlabelinglatticelifecycleloomagrittrMASSMatrixmatrixStatsmgcvmunsellnlmenumDerivpillarpkgbuildpkgconfigposteriorprocessxpspurrrquadprogQuickJSRR6RColorBrewerRcppRcppEigenRcppParallelrlangrstanrstantoolsscalesStanHeadersstringistringrsvUnittensorAtibbletidybayestidyrtidyselectutf8vctrsviridisLitewithr

BEBOP in PePS2

Rendered fromA600-BEBOP.Rmdusingknitr::rmarkdownon Aug 27 2024.

Last update: 2020-10-14
Started: 2020-10-08

CRM Case Study 1 - Levy et al (2006)

Rendered fromA250-LevyCaseStudy.Rmdusingknitr::rmarkdownon Aug 27 2024.

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

Continual Reassessment Method

Rendered fromA200-CRM.Rmdusingknitr::rmarkdownon Aug 27 2024.

Last update: 2020-10-14
Started: 2020-10-08

Dose pathways with CRM

Rendered fromA220-CRM-pathways.Rmdusingknitr::rmarkdownon Aug 27 2024.

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

EffTox

Rendered fromA400-EffTox.Rmdusingknitr::rmarkdownon Aug 27 2024.

Last update: 2020-10-14
Started: 2020-10-08

Hierarchical Bayesian Model for Binary Responses

Rendered fromA500-HierarchicalBayesianResponse.Rmdusingknitr::rmarkdownon Aug 27 2024.

Last update: 2020-10-08
Started: 2020-10-08

Two-parameter logistic model for dose-finding by Neuenschwander, Branson & Gsponer

Rendered fromA300-NeuenschwanderBransonGsponer.Rmdusingknitr::rmarkdownon Aug 27 2024.

Last update: 2020-10-14
Started: 2020-10-09

Time-to-Event Continual Reassessment Method

Rendered fromA260-TITE-CRM.Rmdusingknitr::rmarkdownon Aug 27 2024.

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

Visualisation with CRM

Rendered fromA210-CRM-visualisation.Rmdusingknitr::rmarkdownon Aug 27 2024.

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

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