crmPack2.1.0 package

Object-Oriented Implementation of Dose Escalation Designs

and-Opening-Opening-method

Logical AND Operator for Opening Objects

and-Stopping-Stopping-method

Combine Two Stopping Rules with AND

and-Stopping-StoppingAll-method

Combine an Atomic Stopping Rule and a Stopping List with AND

and-StoppingAll-Stopping-method

Combine a Stopping List and an Atomic Stopping Rule with AND

CohortSizeParts-class

CohortSizeParts

CohortSizeRandom-class

CohortSizeRandom

CohortSizeRange-class

CohortSizeRange

DASimulations-class

DASimulations

h_calc_report_label_percentage

Helper function to calculate percentage of true stopping rules for rep...

h_check_fun_formals

Checking Formals of a Function

h_convert_ordinal_data

Convert a Ordinal Data to the Equivalent Binary Data for a Specific Gr...

h_convert_ordinal_model

Convert an ordinal CRM model to the Equivalent Binary CRM Model for a ...

h_convert_ordinal_samples

Convert a Samples Object from an ordinal Model to the Equivalent Sampl...

h_next_best_mgsamples_plot

Building the Plot for nextBest-NextBestMaxGainSamples Method.

h_quantiles_target_function

Target Function for Quantiles Optimization

h_validate_combine_results

Combining S4 Class Validation Results

h_validate_common_data_slots

Helper Function performing validation Common to Data and DataOrdinal

Increments-class

Increments

IncrementsRelative-class

IncrementsRelative

maxSize

"MAX" Combination of Cohort Size Rules

mcmc

Obtaining Posterior Samples for all Model Parameters

McmcOptions-class

McmcOptions

MinimalInformative

Construct a Minimally Informative Prior

minSize

"MIN" Combination of Cohort Size Rules

NextBest-class

NextBest

nextBest

Finding the Next Best Dose

NextBestMinDist-class

NextBestMinDist

NextBestMTD-class

NextBestMTD

SafetyWindowConst-class

SafetyWindowConst

StoppingMTDdistribution-class

StoppingMTDdistribution

StoppingOrdinal-class

StoppingOrdinal

v_model_objects

Internal Helper Functions for Validation of GeneralModel and `ModelP...

v_model_params

Internal Helper Functions for Validation of Model Parameters Objects

v_next_best

Internal Helper Functions for Validation of NextBest Objects

v_opening

Internal Helper Functions for Validation of Opening Objects

h_blind_plot_data

Helper Function to Blind Plot Data

h_plot_doses_tried

Helper Function to Create Doses Tried Plot

names-Samples-method

The Names of the Sampled Parameters

h_plot_simulation_trajectory

Helper Function to Create Trajectory Plot

approximate

Approximate posterior with (log) normal distribution

assertions

Additional Assertions for checkmate

Backfill-class

Backfill class

biomarker

Get the Biomarker Levels for a Given Dual-Endpoint Model, Given Dose L...

check_equal

Check if All Arguments Are Equal

h_prepare_labels

Check That Labels Are Valid and Useful

check_format

Check that an argument is a valid format specification

check_length

Check if vectors are of compatible lengths

check_probabilities

Check if an argument is a probability vector

check_probability_range

Check if an argument is a probability range

check_probability

Check if an argument is a single probability value

h_prepare_units

Append Units to a Numeric Dose

check_range

Check that an argument is a numerical range

CohortSize-class

CohortSize

CohortSizeConst-class

CohortSizeConst

CohortSizeDLT-class

CohortSizeDLT

CohortSizeMax-class

CohortSizeMax

CohortSizeMin-class

CohortSizeMin

CohortSizeOrdinal-class

CohortSizeOrdinal

crmPack

Object-oriented implementation of CRM designs

CrmPackClass

CrmPackClass

crmPackExample

Open the Example PDF for crmPack

crmPackHelp

Open the Browser with Help Pages for crmPack

DADesign-class

DADesign

DALogisticLogNormal-class

DALogisticLogNormal

dapply

Apply a Function to Subsets of Data Frame.

Data-class

Data

DataDA-class

DataDA

DataDual-class

DataDual

DataGrouped-class

DataGrouped

DataMixture-class

DataMixture

h_pseudo_sim_fit_summary

Helper Function to Calculate Fit Summary

DataOrdinal-class

DataOrdinal

DataParts-class

DataParts

Design-class

Design

DesignGrouped-class

DesignGrouped

DesignOrdinal-class

DesignOrdinal

dinvGamma

Compute the Density of Inverse Gamma Distribution

DLTLikelihood

Likelihood of DLTs in each interval

DualEndpointEmax-class

DualEndpointEmax

dose_grid_range

Getting the Dose Grid Range

dose

Computing the Doses for a given independent variable, Model and Sample...

doseFunction

Getting the Dose Function for a Given Model Type

DualDesign-class

DualDesign

DualEndpoint-class

DualEndpoint

DualEndpointBeta-class

DualEndpointBeta

DualEndpointRW-class

DualEndpointRW

DualResponsesDesign-class

DualResponsesDesign.R

DualResponsesSamplesDesign-class

DualResponsesSamplesDesign

DualSimulations-class

DualSimulations

DualSimulationsSummary-class

DualSimulationsSummary

GeneralModel-class

GeneralModel

EffFlexi-class

EffFlexi

efficacy

Computing Expected Efficacy for a Given Dose, Model and Samples

efficacyFunction

Getting the Efficacy Function for a Given Model Type

Effloglog-class

Effloglog

enable_logging

Verbose Logging

examine

Obtain Hypothetical Trial Course Table for a Design

fit

Fit method for the Samples class

h_barplot_percentages

Convenience function to make barplots of percentages

fitGain

Get the fitted values for the gain values at all dose levels based on ...

fitPEM

Get the fitted DLT free survival (piecewise exponential model). This f...

FractionalCRM-class

FractionalCRM

gain

Compute Gain Values based on Pseudo DLE and a Pseudo Efficacy Models a...

GeneralData-class

GeneralData

GeneralSimulations-class

GeneralSimulations

GeneralSimulationsSummary-class

GeneralSimulationsSummary

get_result_list

Helper Function to Obtain Simulation Results List

get-Samples-character-method

Get specific parameter samples and produce a data.frame

getEff

Extracting Efficacy Responses for Subjects Categorized by the DLT

h_all_equivalent

Comparison with Numerical Tolerance and Without Name Comparison

h_covr_helpers

Helpers for stripping expressions of covr-inserted trace code

h_default_if_empty

Getting the default value for an empty object

h_determine_dlts

Helper function to determine the dlts including first separate and pla...

h_enroll_backfill_patients

Helper Function to Enroll Backfill Patients

h_find_interval

Find Interval Numbers or Indices and Return Custom Number For 0.

h_pseudo_sim_inverse_dose

Helper Function to Calculate Inverse Dose

h_format_number

Conditional Formatting Using C-style Formats

h_get_formatted_dosegrid

Format a doseGrid for Printing

h_get_min_inf_beta

Helper for Minimal Informative Unimodal Beta Distribution

h_get_quantiles_start_values

Get Starting Values for Quantiles Optimization

h_group_data

Group Together Mono and Combo Data

h_in_range

Check which elements are in a given range

h_info_theory_dist

Calculating the Information Theoretic Distance

logit

Shorthand for Logit Function

h_is_positive_definite

Testing Matrix for Positive Definiteness

h_jags_add_dummy

Appending a Dummy Number for Selected Slots in Data

h_jags_extract_samples

Extracting Samples from JAGS mcarray Object

h_jags_get_data

Getting Data for JAGS

h_jags_get_model_inits

Setting Initial Values for JAGS Model Parameters

h_jags_join_models

Joining JAGS Models

h_jags_write_model

Writing JAGS Model to a File

h_kable_param_default

Set Default Values for kable Parameters

h_knit_format_func

Used to obtain expected format.

h_model_dual_endpoint_beta

Update certain components of DualEndpoint model with regard to param...

h_model_dual_endpoint_rho

Update DualEndpoint class model components with regard to DLT and bi...

h_model_dual_endpoint_sigma2betaw

Update certain components of DualEndpoint model with regard to prior...

h_model_dual_endpoint_sigma2w

Update DualEndpoint class model components with regard to biomarker ...

h_next_best_eligible_doses

Get Eligible Doses from the Dose Grid.

h_next_best_mg_ci

Credibility Intervals for Max Gain and Target Doses at `nextBest-NextB...

h_next_best_mg_doses_at_grid

Get Closest Grid Doses for a Given Target Doses for `nextBest-NextBest...

h_next_best_mg_plot

Building the Plot for nextBest-NextBestMaxGain Method.

h_next_best_ncrm_loss_plot

Building the Plot for nextBest-NextBestNCRMLoss Method.

h_next_best_td_plot

Building the Plot for nextBest-NextBestTD Method.

h_next_best_tdsamples_plot

Building the Plot for nextBest-NextBestTDsamples Method.

h_null_if_na

Getting NULL for NA

h_obtain_dose_grid_range

Helper Function Containing Common Functionality

h_plot_data_cohort_lines

Preparing Cohort Lines for Data Plot

h_plot_data_df

Preparing Data for Plotting

h_rapply

Recursively Apply a Function to a List

h_simulations_output_format

Helper Function to create return list for Simulations output

h_slots

Getting the Slots from a S4 Object

h_summarize_add_stats

Helper function to calculate average across iterations for each additi...

h_test_named_numeric

Check that an argument is a named vector of type numeric

h_this_truth

Helper Function to call truth calculation

h_unpack_stopit

Helper function to recursively unpack stopping rules and return lists ...

h_update_backfill_queue

Helper Function to Update Backfill Queue

IncrementsDoseLevels-class

IncrementsDoseLevels

IncrementsHSRBeta-class

IncrementsHSRBeta

IncrementsMaxToxProb-class

IncrementsMaxToxProb

IncrementsMin-class

IncrementsMin

IncrementsOrdinal-class

IncrementsOrdinal

match_within_tolerance

Helper Function for Value Matching with Tolerance

IncrementsRelativeDLT-class

IncrementsRelativeDLT

IncrementsRelativeDLTCurrent-class

IncrementsRelativeDLTCurrent

IncrementsRelativeParts-class

IncrementsRelativeParts

knit_print

Render a CohortSizeConst Object

LogisticIndepBeta-class

LogisticIndepBeta

maxDose

Determine the Maximum Possible Next Dose

LogisticKadane-class

LogisticKadane

LogisticKadaneBetaGamma-class

LogisticKadaneBetaGamma

LogisticLogNormal-class

LogisticLogNormal

LogisticLogNormalGrouped-class

LogisticLogNormalGrouped

maxRecruits

Calculate Maximum Number of Backfill Patients

LogisticLogNormalMixture-class

LogisticLogNormalMixture

LogisticLogNormalOrdinal-class

LogisticLogNormalOrdinal

LogisticLogNormalSub-class

LogisticLogNormalSub

LogisticNormal-class

LogisticNormal

LogisticNormalFixedMixture-class

LogisticNormalFixedMixture

LogisticNormalMixture-class

LogisticNormalMixture

ModelEff-class

ModelEff

ModelLogNormal-class

ModelLogNormal

ModelParamsNormal-class

ModelParamsNormal

ModelPseudo-class

ModelPseudo

ModelTox-class

ModelTox

myBayesLogit

MCMC Sampling for Bayesian Logistic Regression Model

NextBestDualEndpoint-class

NextBestDualEndpoint

NextBestEWOC-class

NextBestEWOC

NextBestInfTheory-class

NextBestInfTheory

NextBestMaxGain-class

NextBestMaxGain

NextBestMaxGainSamples-class

NextBestMaxGainSamples

NextBestNCRM-class

NextBestNCRM

NextBestNCRMLoss-class

NextBestNCRMLoss

NextBestOrdinal-class

NextBestOrdinal

NextBestProbMTDLTE-class

NextBestProbMTDLTE

NextBestProbMTDMinDist-class

NextBestProbMTDMinDist

NextBestTD-class

NextBestTD

NextBestTDsamples-class

NextBestTDsamples

NextBestThreePlusThree-class

NextBestThreePlusThree

ngrid

Number of Doses in Grid

OneParExpPrior-class

OneParExpPrior

OpeningMinDose-class

OpeningMinDose

OneParLogNormalPrior-class

OneParLogNormalPrior

openCohort

Open / recruit backfill patients into a cohort?

Opening-class

Opening

OpeningAll-class

OpeningAll

OpeningAny-class

OpeningAny

OpeningList-class

OpeningList

OpeningMinCohorts-class

OpeningMinCohorts

plot-DualSimulationsSummary-missing-method

Plot Dual-Endpoint Design Simulation Summary

OpeningMinResponses-class

OpeningMinResponses

OpeningNone-class

OpeningNone

or-Opening-Opening-method

Logical OR Operator for Opening Objects

or-Stopping-Stopping

Combine Two Stopping Rules with OR

or-Stopping-StoppingAny

Combine an Atomic Stopping Rule and a Stopping List with OR

or-StoppingAny-Stopping

Combine a Stopping List and an Atomic Stopping Rule with OR

pinvGamma

Compute the Distribution Function of Inverse Gamma Distribution

pipe

Pipe operator

plot-GeneralSimulations-missing-method

Plot GeneralSimulations

plot-Data-ModelTox-method

Plot of the fitted dose-tox based with a given pseudo DLE model and da...

plot-Data

Helper Function for the Plot Method of the Data and DataOrdinal Classe...

plot-DataDA-missing-method

Plot Method for the DataDA Class

plot-DataDual-missing-method

Plot Method for the DataDual Class

plot-DataDual-ModelEff-method

Plot of the fitted dose-efficacy based with a given pseudo efficacy mo...

plot-DualSimulations-missing-method

Plot DualSimulations

plot-GeneralSimulationsSummary-missing-method

Plot GeneralSimulationsSummary

plot-PseudoDualFlexiSimulations-missing-method

Plot PseudoDualFlexiSimulations

plot-PseudoDualSimulations-missing-method

Plot PseudoDualSimulations

plot-PseudoDualSimulationsSummary-missing-method

Plot PseudoDualSimulationsSummary

plot-PseudoSimulationsSummary-missing-method

Plot PseudoSimulationsSummary

plot-Samples-DALogisticLogNormal-method

Plotting dose-toxicity model fits

plot-Samples-DualEndpoint-method

Plotting dose-toxicity and dose-biomarker model fits

plot-Samples-GeneralModel-method

Plotting dose-toxicity model fits

plot-Samples-ModelEff-method

Plot the fitted dose-efficacy curve using a model from ModelEff clas...

plot-Samples-ModelTox-method

Plot the fitted dose-DLE curve using a ModelTox class model with sam...

plot-SimulationsSummary-missing-method

Plot Model-Based Design Simulation Summary

plot.gtable

Plot gtable Objects

plotDualResponses

Plot of the DLE and efficacy curve side by side given a DLE pseudo mod...

qinvGamma

Compute the Quantile Function of Inverse Gamma Distribution

plotGain

Plot the gain curve in addition with the dose-DLE and dose-efficacy cu...

positive_number

positive_number

printVignette

Print Vignette

prob

Computing Toxicity Probabilities for a Given Dose, Model and Samples

probFunction

Getting the Prob Function for a Given Model Type

probit

Shorthand for Probit Function

ProbitLogNormal-class

ProbitLogNormal

SafetyWindow-class

SafetyWindow

ProbitLogNormalRel-class

ProbitLogNormalRel

PseudoDualFlexiSimulations-class

PseudoDualFlexiSimulations

PseudoDualSimulations-class

PseudoDualSimulations

PseudoDualSimulationsSummary-class

PseudoDualSimulationsSummary

PseudoSimulations-class

PseudoSimulations

PseudoSimulationsSummary-class

PseudoSimulationsSummary

Quantiles2LogisticNormal

Convert Prior Quantiles to Logistic (Log) Normal Model

Recruitment-class

Recruitment

RecruitmentRatio-class

RecruitmentRatio

RecruitmentUnlimited-class

RecruitmentUnlimited

rinvGamma

Random Generation for the Inverse Gamma Distribution

RuleDesign-class

RuleDesign

RuleDesignOrdinal-class

RuleDesignOrdinal

SafetyWindowSize-class

SafetyWindowSize

Samples-class

Samples

saveSample

Determining if this Sample Should be Saved

set_seed

Helper Function to Set and Save the RNG Seed

show-DualSimulationsSummary-method

Show the Summary of Dual-Endpoint Simulations

show-GeneralSimulations-method

Show Simulations Objects

show-GeneralSimulationsSummary-method

Show the Summary of the Simulations

show-PseudoDualSimulationsSummary-method

Show the Summary of PseudoDualSimulations

show-PseudoSimulationsSummary-method

Show the Summary of PseudoSimulations

show-SimulationsSummary-method

Show the Summary of Model-Based Design Simulations

simulate-DADesign-method

Simulate outcomes from a time-to-DLT augmented CRM design

simulate-Design-method

Simulate outcomes from a CRM design

simulate-DesignGrouped-method

Simulate Method for the DesignGrouped Class

simulate-DualDesign-method

Simulate outcomes from a dual-endpoint design

simulate-DualResponsesDesign-method

Simulate dose escalation procedure using both DLE and efficacy respons...

simulate-DualResponsesSamplesDesign-method

Simulate dose escalation procedure using DLE and efficacy responses wi...

stopTrial

Stop the trial?

simulate-RuleDesign-method

Simulate outcomes from a rule-based design

simulate-TDDesign-method

Simulate dose escalation procedure using DLE responses only without sa...

simulate-TDsamplesDesign-method

Simulate dose escalation procedure using DLE responses only with DLE s...

Simulations-class

Simulations

SimulationsSummary-class

SimulationsSummary

size

Size of an Object

StartingDose-class

StartingDose

Stopping-class

Stopping

subset-Data

Subsetting Operator for the Data Class

StoppingAll-class

StoppingAll

StoppingAny-class

StoppingAny

StoppingCohortsNearDose-class

StoppingCohortsNearDose

StoppingExternal-class

StoppingExternal

StoppingHighestDose-class

StoppingHighestDose

StoppingList-class

StoppingList

StoppingLowestDoseHSRBeta-class

StoppingLowestDoseHSRBeta

StoppingMaxGainCIRatio-class

StoppingMaxGainCIRatio

StoppingMinCohorts-class

StoppingMinCohorts

StoppingMinPatients-class

StoppingMinPatients

StoppingMissingDose-class

StoppingMissingDose

StoppingMTDCV-class

StoppingMTDCV

StoppingPatientsNearDose-class

StoppingPatientsNearDose

StoppingSpecificDose-class

StoppingSpecificDose

StoppingTargetBiomarker-class

StoppingTargetBiomarker

StoppingTargetProb-class

StoppingTargetProb

StoppingTDCIRatio-class

StoppingTDCIRatio

summary-DualSimulations-method

Summarize Dual-Endpoint Design Simulations

summary-GeneralSimulations-method

Summarize the GeneralSimulations, Relative to a Given Truth

summary-PseudoDualFlexiSimulations-method

Summarize PseudoDualFlexiSimulations

summary-PseudoDualSimulations-method

Summarize PseudoDualSimulations

summary-PseudoSimulations-method

Summarize PseudoSimulations

summary-Simulations-method

Summarize Model-Based Design Simulations

v_mcmcoptions_objects

Internal Helper Functions for Validation of McmcOptions Objects

TDDesign-class

TDDesign

TDsamplesDesign-class

TDsamplesDesign

tidy

Tidying CrmPackClass objects

TITELogisticLogNormal-class

TITELogisticLogNormal

v_general_simulations

Internal Helper Functions for Validation of GeneralSimulations Objec...

update-Data-method

Updating Data Objects

update-DataDA-method

Updating DataDA Objects

update-DataDual-method

Updating DataDual Objects

update-DataOrdinal-method

Updating DataOrdinal Objects

update-DataParts-method

Updating DataParts Objects

update-ModelPseudo-method

Update method for the ModelPseudo model class. This is a method to u...

v_backfill

Internal Helper Functions for Validation of Backfill Objects

v_cohort_size

Internal Helper Functions for Validation of CohortSize Objects

v_data_objects

Internal Helper Functions for Validation of GeneralData Objects

v_design

Internal Helper Functions for Validation of RuleDesign Objects

v_increments

Internal Helper Functions for Validation of Increments Objects

v_pseudo_simulations

Internal Helper Functions for Validation of PseudoSimulations Object...

v_recruitment

Internal Helper Functions for Validation of Recruitment Objects

v_safety_window

Internal Helper Functions for Validation of SafetyWindow Objects

v_samples_objects

Internal Helper Functions for Validation of Samples Objects

v_starting_dose

Internal Helper Functions for Validation of StartingDose Objects

v_stopping

Internal Helper Functions for Validation of Stopping Objects

Validate

Validate

windowLength

Determine the Safety Window Length of the Next Cohort

Implements a wide range of dose escalation designs. The focus is on model-based designs, ranging from classical and modern continual reassessment methods (CRMs) based on dose-limiting toxicity endpoints to dual-endpoint designs taking into account a biomarker/efficacy outcome. Bayesian inference is performed via MCMC sampling in JAGS, and it is easy to setup a new design with custom JAGS code. However, it is also possible to implement 3+3 designs for comparison or models with non-Bayesian estimation. The whole package is written in a modular form in the S4 class system, making it very flexible for adaptation to new models, escalation or stopping rules. Further details are presented in Sabanés Bové et al. (2019) <doi:10.18637/jss.v089.i10>.

  • Maintainer: Daniel Sabanés Bové
  • License: GPL (>= 2)
  • Last published: 2026-01-30