From 9536469b3dd5efc9e14c11cb36ba7d0ca866be32 Mon Sep 17 00:00:00 2001 From: Daniel Sabanes Bove Date: Wed, 7 Jan 2026 16:22:05 +0800 Subject: [PATCH 1/6] bump up version, add NEWS entry --- DESCRIPTION | 2 +- NEWS.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4d1d34169..2f3745144 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: crmPack Title: Object-Oriented Implementation of Dose Escalation Designs -Version: 2.0.1 +Version: 2.0.2 Authors@R: c( person("Daniel", "Sabanes Bove", , "daniel.sabanes_bove@rconis.com", role = c("aut", "cre")), person("Wai", "Yin Yeung", , "winnie.yeung@roche.com", role = "aut"), diff --git a/NEWS.md b/NEWS.md index 9be268a24..2486fe52e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +# Version 2.0.2 + +### Miscellaneous + +* Fixed logging tests which had been broken by recent `futile.logger` updates. + # Version 2.0.1 ### Bugfixes From 7e6cb0a99d4a94bd40c2eb6c935fccd93c2dca36 Mon Sep 17 00:00:00 2001 From: Daniel Sabanes Bove Date: Thu, 8 Jan 2026 13:35:02 +0800 Subject: [PATCH 2/6] reduce examples run time --- .../Design-method-simulate-DesignGrouped.R | 2 ++ examples/Rules-method-stopTrial-StoppingAll.R | 2 +- examples/Rules-method-stopTrial-StoppingAny.R | 2 +- ...method-stopTrial-StoppingCohortsNearDose.R | 2 +- ...les-method-stopTrial-StoppingHighestDose.R | 2 +- .../Rules-method-stopTrial-StoppingList.R | 2 +- ...thod-stopTrial-StoppingLowestDoseHSRBeta.R | 2 +- .../Rules-method-stopTrial-StoppingMTDCV.R | 2 +- ...method-stopTrial-StoppingMTDdistribution.R | 2 +- ...ules-method-stopTrial-StoppingMinCohorts.R | 2 +- ...les-method-stopTrial-StoppingMinPatients.R | 2 +- ...les-method-stopTrial-StoppingMissingDose.R | 2 +- .../Rules-method-stopTrial-StoppingOrdinal.R | 2 +- ...ethod-stopTrial-StoppingPatientsNearDose.R | 2 +- ...es-method-stopTrial-StoppingSpecificDose.R | 2 +- ...method-stopTrial-StoppingTargetBiomarker.R | 2 +- ...ules-method-stopTrial-StoppingTargetProb.R | 2 +- ...mulations-method-plot-SimulationsSummary.R | 4 +-- examples/Simulations-method-plotSIMDual.R | 2 ++ examples/design-method-simulate-Design.R | 4 +-- examples/design-method-simulate-DualDesign.R | 4 +-- ...ot-PseudoDualSimulations-missing-method.Rd | 2 ++ man/plot-SimulationsSummary-missing-method.Rd | 4 +-- man/simulate-Design-method.Rd | 4 +-- man/simulate-DesignGrouped-method.Rd | 2 ++ man/simulate-DualDesign-method.Rd | 4 +-- man/stopTrial.Rd | 34 +++++++++---------- 27 files changed, 53 insertions(+), 45 deletions(-) diff --git a/examples/Design-method-simulate-DesignGrouped.R b/examples/Design-method-simulate-DesignGrouped.R index 86694ad2a..f7212ca87 100644 --- a/examples/Design-method-simulate-DesignGrouped.R +++ b/examples/Design-method-simulate-DesignGrouped.R @@ -52,6 +52,7 @@ legend("topright", c("mono", "combo"), lty = c(1, 2), col = c(1, 2)) # Start the simulations. set.seed(123) +\donttest{ my_sims <- simulate( my_design, nsim = 1, # This should be at least 100 in actual applications. @@ -74,3 +75,4 @@ plot(combo_sims_sum) trial_index <- 1 plot(my_sims$mono@data[[trial_index]]) plot(my_sims$combo@data[[trial_index]]) +} \ No newline at end of file diff --git a/examples/Rules-method-stopTrial-StoppingAll.R b/examples/Rules-method-stopTrial-StoppingAll.R index 4be4f38be..11bbb09f8 100644 --- a/examples/Rules-method-stopTrial-StoppingAll.R +++ b/examples/Rules-method-stopTrial-StoppingAll.R @@ -16,7 +16,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) diff --git a/examples/Rules-method-stopTrial-StoppingAny.R b/examples/Rules-method-stopTrial-StoppingAny.R index 47eb654f3..6fef97d1e 100644 --- a/examples/Rules-method-stopTrial-StoppingAny.R +++ b/examples/Rules-method-stopTrial-StoppingAny.R @@ -16,7 +16,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) diff --git a/examples/Rules-method-stopTrial-StoppingCohortsNearDose.R b/examples/Rules-method-stopTrial-StoppingCohortsNearDose.R index 3a168cb5b..f7830576c 100644 --- a/examples/Rules-method-stopTrial-StoppingCohortsNearDose.R +++ b/examples/Rules-method-stopTrial-StoppingCohortsNearDose.R @@ -16,7 +16,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) diff --git a/examples/Rules-method-stopTrial-StoppingHighestDose.R b/examples/Rules-method-stopTrial-StoppingHighestDose.R index d7fc02659..518fd5619 100644 --- a/examples/Rules-method-stopTrial-StoppingHighestDose.R +++ b/examples/Rules-method-stopTrial-StoppingHighestDose.R @@ -16,7 +16,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) diff --git a/examples/Rules-method-stopTrial-StoppingList.R b/examples/Rules-method-stopTrial-StoppingList.R index 947c20539..c3eeaf32b 100644 --- a/examples/Rules-method-stopTrial-StoppingList.R +++ b/examples/Rules-method-stopTrial-StoppingList.R @@ -16,7 +16,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) diff --git a/examples/Rules-method-stopTrial-StoppingLowestDoseHSRBeta.R b/examples/Rules-method-stopTrial-StoppingLowestDoseHSRBeta.R index 1378a1026..2a0204197 100644 --- a/examples/Rules-method-stopTrial-StoppingLowestDoseHSRBeta.R +++ b/examples/Rules-method-stopTrial-StoppingLowestDoseHSRBeta.R @@ -22,7 +22,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) diff --git a/examples/Rules-method-stopTrial-StoppingMTDCV.R b/examples/Rules-method-stopTrial-StoppingMTDCV.R index 809bffabb..505139d06 100644 --- a/examples/Rules-method-stopTrial-StoppingMTDCV.R +++ b/examples/Rules-method-stopTrial-StoppingMTDCV.R @@ -14,7 +14,7 @@ my_model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 40) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. diff --git a/examples/Rules-method-stopTrial-StoppingMTDdistribution.R b/examples/Rules-method-stopTrial-StoppingMTDdistribution.R index 9ec3b9f3a..7d4ae11e6 100644 --- a/examples/Rules-method-stopTrial-StoppingMTDdistribution.R +++ b/examples/Rules-method-stopTrial-StoppingMTDdistribution.R @@ -16,7 +16,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) diff --git a/examples/Rules-method-stopTrial-StoppingMinCohorts.R b/examples/Rules-method-stopTrial-StoppingMinCohorts.R index 7bb2400af..2bd8922be 100644 --- a/examples/Rules-method-stopTrial-StoppingMinCohorts.R +++ b/examples/Rules-method-stopTrial-StoppingMinCohorts.R @@ -16,7 +16,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) diff --git a/examples/Rules-method-stopTrial-StoppingMinPatients.R b/examples/Rules-method-stopTrial-StoppingMinPatients.R index 374486b73..261c505ad 100644 --- a/examples/Rules-method-stopTrial-StoppingMinPatients.R +++ b/examples/Rules-method-stopTrial-StoppingMinPatients.R @@ -16,7 +16,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) diff --git a/examples/Rules-method-stopTrial-StoppingMissingDose.R b/examples/Rules-method-stopTrial-StoppingMissingDose.R index 2f79242e6..b50b1e1dd 100644 --- a/examples/Rules-method-stopTrial-StoppingMissingDose.R +++ b/examples/Rules-method-stopTrial-StoppingMissingDose.R @@ -26,7 +26,7 @@ my_model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 40) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. diff --git a/examples/Rules-method-stopTrial-StoppingOrdinal.R b/examples/Rules-method-stopTrial-StoppingOrdinal.R index 9cc34827f..7ec7bbc5b 100644 --- a/examples/Rules-method-stopTrial-StoppingOrdinal.R +++ b/examples/Rules-method-stopTrial-StoppingOrdinal.R @@ -1,6 +1,6 @@ data <- .DefaultDataOrdinal() model <- .DefaultLogisticLogNormalOrdinal() -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) samples <- mcmc(data, model, options) myIncrements <- .DefaultIncrementsOrdinal() diff --git a/examples/Rules-method-stopTrial-StoppingPatientsNearDose.R b/examples/Rules-method-stopTrial-StoppingPatientsNearDose.R index e1682f5b4..7b26c39ac 100644 --- a/examples/Rules-method-stopTrial-StoppingPatientsNearDose.R +++ b/examples/Rules-method-stopTrial-StoppingPatientsNearDose.R @@ -16,7 +16,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) diff --git a/examples/Rules-method-stopTrial-StoppingSpecificDose.R b/examples/Rules-method-stopTrial-StoppingSpecificDose.R index 1abb1c4a7..1e8ec0943 100644 --- a/examples/Rules-method-stopTrial-StoppingSpecificDose.R +++ b/examples/Rules-method-stopTrial-StoppingSpecificDose.R @@ -15,7 +15,7 @@ my_model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 40) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule which will be used to select the next best dose diff --git a/examples/Rules-method-stopTrial-StoppingTargetBiomarker.R b/examples/Rules-method-stopTrial-StoppingTargetBiomarker.R index 4fe534f8a..f20f12fa2 100644 --- a/examples/Rules-method-stopTrial-StoppingTargetBiomarker.R +++ b/examples/Rules-method-stopTrial-StoppingTargetBiomarker.R @@ -37,7 +37,7 @@ model <- DualEndpointRW( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) diff --git a/examples/Rules-method-stopTrial-StoppingTargetProb.R b/examples/Rules-method-stopTrial-StoppingTargetProb.R index 4fe837bec..c5be96073 100644 --- a/examples/Rules-method-stopTrial-StoppingTargetProb.R +++ b/examples/Rules-method-stopTrial-StoppingTargetProb.R @@ -16,7 +16,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) diff --git a/examples/Simulations-method-plot-SimulationsSummary.R b/examples/Simulations-method-plot-SimulationsSummary.R index eebc9722e..1e55b2e14 100644 --- a/examples/Simulations-method-plot-SimulationsSummary.R +++ b/examples/Simulations-method-plot-SimulationsSummary.R @@ -61,9 +61,9 @@ myTruth <- probFunction(model, alpha0 = 7, alpha1 = 8) # We only generate 1 trial outcomes here for illustration, for the actual study # this should be increased of course options <- McmcOptions( - burnin = 10, + burnin = 5, step = 1, - samples = 100 + samples = 10 ) time <- system.time( mySims <- simulate( diff --git a/examples/Simulations-method-plotSIMDual.R b/examples/Simulations-method-plotSIMDual.R index ba38838e3..a2e7cafd8 100644 --- a/examples/Simulations-method-plotSIMDual.R +++ b/examples/Simulations-method-plotSIMDual.R @@ -58,6 +58,7 @@ my_truth_eff <- efficacyFunction( ) # Run simulations (for illustration purpose only 1 simulation is produced). +\donttest{ my_sim <- simulate( object = my_design, args = NULL, @@ -115,3 +116,4 @@ my_sim <- simulate( # Plot the simulation results. print(plot(my_sim)) +} \ No newline at end of file diff --git a/examples/design-method-simulate-Design.R b/examples/design-method-simulate-Design.R index e835b2cad..f74f9508f 100644 --- a/examples/design-method-simulate-Design.R +++ b/examples/design-method-simulate-Design.R @@ -61,9 +61,9 @@ myTruth <- probFunction(model, alpha0 = 7, alpha1 = 8) # We only generate 1 trial outcomes here for illustration, for the actual study # this should be increased of course options <- McmcOptions( - burnin = 100, + burnin = 5, step = 1, - samples = 2000 + samples = 10 ) time <- system.time( diff --git a/examples/design-method-simulate-DualDesign.R b/examples/design-method-simulate-DualDesign.R index 63810bd38..18e11aa8e 100644 --- a/examples/design-method-simulate-DualDesign.R +++ b/examples/design-method-simulate-DualDesign.R @@ -101,9 +101,9 @@ mySims <- simulate( seed = 3, startingDose = 6, mcmcOptions = McmcOptions( - burnin = 100, + burnin = 5, step = 1, - samples = 300 + samples = 10 ) ) diff --git a/man/plot-PseudoDualSimulations-missing-method.Rd b/man/plot-PseudoDualSimulations-missing-method.Rd index 7414407d1..8a45896ad 100644 --- a/man/plot-PseudoDualSimulations-missing-method.Rd +++ b/man/plot-PseudoDualSimulations-missing-method.Rd @@ -96,6 +96,7 @@ my_truth_eff <- efficacyFunction( ) # Run simulations (for illustration purpose only 1 simulation is produced). +\donttest{ my_sim <- simulate( object = my_design, args = NULL, @@ -154,3 +155,4 @@ my_sim <- simulate( # Plot the simulation results. print(plot(my_sim)) } +} diff --git a/man/plot-SimulationsSummary-missing-method.Rd b/man/plot-SimulationsSummary-missing-method.Rd index e2a48f7d7..488983959 100644 --- a/man/plot-SimulationsSummary-missing-method.Rd +++ b/man/plot-SimulationsSummary-missing-method.Rd @@ -107,9 +107,9 @@ myTruth <- probFunction(model, alpha0 = 7, alpha1 = 8) # We only generate 1 trial outcomes here for illustration, for the actual study # this should be increased of course options <- McmcOptions( - burnin = 10, + burnin = 5, step = 1, - samples = 100 + samples = 10 ) time <- system.time( mySims <- simulate( diff --git a/man/simulate-Design-method.Rd b/man/simulate-Design-method.Rd index 92aea02b2..920a7bffe 100644 --- a/man/simulate-Design-method.Rd +++ b/man/simulate-Design-method.Rd @@ -127,9 +127,9 @@ myTruth <- probFunction(model, alpha0 = 7, alpha1 = 8) # We only generate 1 trial outcomes here for illustration, for the actual study # this should be increased of course options <- McmcOptions( - burnin = 100, + burnin = 5, step = 1, - samples = 2000 + samples = 10 ) time <- system.time( diff --git a/man/simulate-DesignGrouped-method.Rd b/man/simulate-DesignGrouped-method.Rd index 9be979a61..35a7c3470 100644 --- a/man/simulate-DesignGrouped-method.Rd +++ b/man/simulate-DesignGrouped-method.Rd @@ -113,6 +113,7 @@ legend("topright", c("mono", "combo"), lty = c(1, 2), col = c(1, 2)) # Start the simulations. set.seed(123) +\donttest{ my_sims <- simulate( my_design, nsim = 1, # This should be at least 100 in actual applications. @@ -136,3 +137,4 @@ trial_index <- 1 plot(my_sims$mono@data[[trial_index]]) plot(my_sims$combo@data[[trial_index]]) } +} diff --git a/man/simulate-DualDesign-method.Rd b/man/simulate-DualDesign-method.Rd index 2d76a52a0..dc59e55b6 100644 --- a/man/simulate-DualDesign-method.Rd +++ b/man/simulate-DualDesign-method.Rd @@ -175,9 +175,9 @@ mySims <- simulate( seed = 3, startingDose = 6, mcmcOptions = McmcOptions( - burnin = 100, + burnin = 5, step = 1, - samples = 300 + samples = 10 ) ) diff --git a/man/stopTrial.Rd b/man/stopTrial.Rd index d7731e5a2..f4c67371e 100644 --- a/man/stopTrial.Rd +++ b/man/stopTrial.Rd @@ -405,7 +405,7 @@ my_model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 40) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. @@ -468,7 +468,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) @@ -537,7 +537,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) @@ -602,7 +602,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) @@ -667,7 +667,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) @@ -721,7 +721,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) @@ -775,7 +775,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) @@ -829,7 +829,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) @@ -883,7 +883,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) @@ -943,7 +943,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) @@ -1002,7 +1002,7 @@ my_model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 40) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. @@ -1066,7 +1066,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) @@ -1149,7 +1149,7 @@ model <- DualEndpointRW( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) @@ -1210,7 +1210,7 @@ my_model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 40) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule which will be used to select the next best dose @@ -1269,7 +1269,7 @@ model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) samples <- mcmc(data, model, options) @@ -1322,7 +1322,7 @@ stopTrial( # nolint end data <- .DefaultDataOrdinal() model <- .DefaultLogisticLogNormalOrdinal() -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) samples <- mcmc(data, model, options) myIncrements <- .DefaultIncrementsOrdinal() @@ -1349,7 +1349,7 @@ stopTrial( ) data <- .DefaultDataOrdinal() model <- .DefaultLogisticLogNormalOrdinal() -options <- McmcOptions(burnin = 10, step = 2, samples = 40) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) samples <- mcmc(data, model, options) myIncrements <- .DefaultIncrementsOrdinal() From d8cc0a221931feb75f64e5c94f7fe691fe8f2994 Mon Sep 17 00:00:00 2001 From: Daniel Sabanes Bove Date: Thu, 8 Jan 2026 13:36:16 +0800 Subject: [PATCH 3/6] add time processing script, for reference --- design/check-timings.R | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 design/check-timings.R diff --git a/design/check-timings.R b/design/check-timings.R new file mode 100644 index 000000000..d3dd9253b --- /dev/null +++ b/design/check-timings.R @@ -0,0 +1,10 @@ +# Run R CMD check (also devtools::check will include the --timings flag), +# then read the timings file and show the top 10 longest running examples: + +timings <- read.table("../crmPack.Rcheck/crmPack-Ex.timings", header = TRUE) + +library(dplyr) + +timings |> + arrange(-elapsed) |> + head(10) From 6d50a826b1ccd207a9424495608bfcc59eed1e66 Mon Sep 17 00:00:00 2001 From: Daniel Sabanes Bove Date: Thu, 8 Jan 2026 13:51:48 +0800 Subject: [PATCH 4/6] try to save a bit more examples time --- ...ules-method-nextBest-NextBestDualEndpoint.R | 2 +- examples/Rules-method-nextBest-NextBestEWOC.R | 2 +- examples/Rules-method-nextBest-NextBestMTD.R | 2 +- ...es-method-nextBest-NextBestMaxGainSamples.R | 2 +- .../Rules-method-nextBest-NextBestMinDist.R | 2 +- ...es-method-nextBest-NextBestNCRM-DataParts.R | 2 +- examples/Rules-method-nextBest-NextBestNCRM.R | 2 +- .../Rules-method-nextBest-NextBestNCRMLoss.R | 2 +- .../Rules-method-nextBest-NextBestProbMTDLTE.R | 2 +- ...es-method-nextBest-NextBestProbMtdMinDist.R | 2 +- .../Rules-method-stopTrialCIMaxGainSamples.R | 2 +- examples/Rules-method-stopTrialCITDsamples.R | 2 +- examples/Simulations-method-plotSUMDual.R | 2 +- examples/design-method-simulate-DualDesign.R | 6 ++++-- man/nextBest.Rd | 18 +++++++++--------- ...udoDualSimulationsSummary-missing-method.Rd | 2 +- man/simulate-DualDesign-method.Rd | 6 ++++-- man/stopTrial.Rd | 4 ++-- 18 files changed, 33 insertions(+), 29 deletions(-) diff --git a/examples/Rules-method-nextBest-NextBestDualEndpoint.R b/examples/Rules-method-nextBest-NextBestDualEndpoint.R index 37bb4af61..c51726a02 100644 --- a/examples/Rules-method-nextBest-NextBestDualEndpoint.R +++ b/examples/Rules-method-nextBest-NextBestDualEndpoint.R @@ -57,7 +57,7 @@ my_model <- DualEndpointRW( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) \donttest{ my_samples <- mcmc(my_data, my_model, my_options) diff --git a/examples/Rules-method-nextBest-NextBestEWOC.R b/examples/Rules-method-nextBest-NextBestEWOC.R index 0b753d8f1..f90be41c0 100644 --- a/examples/Rules-method-nextBest-NextBestEWOC.R +++ b/examples/Rules-method-nextBest-NextBestEWOC.R @@ -17,7 +17,7 @@ my_model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. diff --git a/examples/Rules-method-nextBest-NextBestMTD.R b/examples/Rules-method-nextBest-NextBestMTD.R index 74d6cdd2a..9405563ab 100644 --- a/examples/Rules-method-nextBest-NextBestMTD.R +++ b/examples/Rules-method-nextBest-NextBestMTD.R @@ -17,7 +17,7 @@ my_model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. diff --git a/examples/Rules-method-nextBest-NextBestMaxGainSamples.R b/examples/Rules-method-nextBest-NextBestMaxGainSamples.R index 38f39f353..84de0f531 100644 --- a/examples/Rules-method-nextBest-NextBestMaxGainSamples.R +++ b/examples/Rules-method-nextBest-NextBestMaxGainSamples.R @@ -28,7 +28,7 @@ my_model_effll <- Effloglog( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples_dlt <- mcmc(my_data, my_model_dlt, my_options) my_samples_effll <- mcmc(my_data, my_model_effll, my_options) diff --git a/examples/Rules-method-nextBest-NextBestMinDist.R b/examples/Rules-method-nextBest-NextBestMinDist.R index bbaeaada5..27debd149 100644 --- a/examples/Rules-method-nextBest-NextBestMinDist.R +++ b/examples/Rules-method-nextBest-NextBestMinDist.R @@ -22,7 +22,7 @@ my_model <- LogisticKadaneBetaGamma( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. diff --git a/examples/Rules-method-nextBest-NextBestNCRM-DataParts.R b/examples/Rules-method-nextBest-NextBestNCRM-DataParts.R index 8162e21ce..f08fe9ca6 100644 --- a/examples/Rules-method-nextBest-NextBestNCRM-DataParts.R +++ b/examples/Rules-method-nextBest-NextBestNCRM-DataParts.R @@ -20,7 +20,7 @@ my_model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. diff --git a/examples/Rules-method-nextBest-NextBestNCRM.R b/examples/Rules-method-nextBest-NextBestNCRM.R index 0711ce9fb..31ad81ea8 100644 --- a/examples/Rules-method-nextBest-NextBestNCRM.R +++ b/examples/Rules-method-nextBest-NextBestNCRM.R @@ -17,7 +17,7 @@ my_model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. diff --git a/examples/Rules-method-nextBest-NextBestNCRMLoss.R b/examples/Rules-method-nextBest-NextBestNCRMLoss.R index bb277810d..2f98d03a6 100644 --- a/examples/Rules-method-nextBest-NextBestNCRMLoss.R +++ b/examples/Rules-method-nextBest-NextBestNCRMLoss.R @@ -17,7 +17,7 @@ my_model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. diff --git a/examples/Rules-method-nextBest-NextBestProbMTDLTE.R b/examples/Rules-method-nextBest-NextBestProbMTDLTE.R index a0d4f0dbb..56239256a 100644 --- a/examples/Rules-method-nextBest-NextBestProbMTDLTE.R +++ b/examples/Rules-method-nextBest-NextBestProbMTDLTE.R @@ -17,7 +17,7 @@ my_model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. diff --git a/examples/Rules-method-nextBest-NextBestProbMtdMinDist.R b/examples/Rules-method-nextBest-NextBestProbMtdMinDist.R index 7c98b0162..3da48b491 100644 --- a/examples/Rules-method-nextBest-NextBestProbMtdMinDist.R +++ b/examples/Rules-method-nextBest-NextBestProbMtdMinDist.R @@ -21,7 +21,7 @@ my_model <- my_model <- LogisticKadaneBetaGamma( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. diff --git a/examples/Rules-method-stopTrialCIMaxGainSamples.R b/examples/Rules-method-stopTrialCIMaxGainSamples.R index 3a50143df..002234dbd 100644 --- a/examples/Rules-method-stopTrialCIMaxGainSamples.R +++ b/examples/Rules-method-stopTrialCIMaxGainSamples.R @@ -28,7 +28,7 @@ Effmodel <- Effloglog( data = data ) ##for illustration purpose we use 10 burn-in and generate 50 samples -options <- McmcOptions(burnin = 10, step = 2, samples = 50) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) ##DLE and efficacy samples must be of 'Samples' class DLEsamples <- mcmc(data, DLEmodel, options) Effsamples <- mcmc(data, Effmodel, options) diff --git a/examples/Rules-method-stopTrialCITDsamples.R b/examples/Rules-method-stopTrialCITDsamples.R index 8fa747302..237f88840 100644 --- a/examples/Rules-method-stopTrialCITDsamples.R +++ b/examples/Rules-method-stopTrialCITDsamples.R @@ -19,7 +19,7 @@ model <- LogisticIndepBeta( ) ##define MCMC options ##for illustration purpose we use 10 burn-in and generate 50 samples -options <- McmcOptions(burnin = 10, step = 2, samples = 50) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) ##samples of 'Samples' class samples <- mcmc(data, model, options) ##define the 'StoppingTDCIRatio' class diff --git a/examples/Simulations-method-plotSUMDual.R b/examples/Simulations-method-plotSUMDual.R index 7e910c726..21f95a056 100644 --- a/examples/Simulations-method-plotSUMDual.R +++ b/examples/Simulations-method-plotSUMDual.R @@ -107,7 +107,7 @@ my_design <- DualResponsesSamplesDesign( ) # MCMC options. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) \donttest{ # For illustration purpose only 1 simulation is produced. diff --git a/examples/design-method-simulate-DualDesign.R b/examples/design-method-simulate-DualDesign.R index 18e11aa8e..efa378631 100644 --- a/examples/design-method-simulate-DualDesign.R +++ b/examples/design-method-simulate-DualDesign.R @@ -90,6 +90,7 @@ curve(trueBiomarker(x), from = 0, to = 80) # We only generate 1 trial outcome here for illustration, for the actual study # this should be increased of course, similarly for the McmcOptions - # they also need to be increased. +\donttest{ mySims <- simulate( design, trueTox = trueTox, @@ -101,10 +102,11 @@ mySims <- simulate( seed = 3, startingDose = 6, mcmcOptions = McmcOptions( - burnin = 5, + burnin = 10, step = 1, - samples = 10 + samples = 100 ) ) +} # nolint end diff --git a/man/nextBest.Rd b/man/nextBest.Rd index 967b7df41..91fb1d9a7 100644 --- a/man/nextBest.Rd +++ b/man/nextBest.Rd @@ -309,7 +309,7 @@ my_model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. @@ -357,7 +357,7 @@ my_model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. @@ -403,7 +403,7 @@ my_model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. @@ -454,7 +454,7 @@ my_model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. @@ -501,7 +501,7 @@ my_model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. @@ -633,7 +633,7 @@ my_model <- DualEndpointRW( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) \donttest{ my_samples <- mcmc(my_data, my_model, my_options) @@ -823,7 +823,7 @@ my_model_effll <- Effloglog( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples_dlt <- mcmc(my_data, my_model_dlt, my_options) my_samples_effll <- mcmc(my_data, my_model_effll, my_options) @@ -903,7 +903,7 @@ my_model <- LogisticLogNormal( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. @@ -948,7 +948,7 @@ my_model <- my_model <- LogisticKadaneBetaGamma( ) # Set-up some MCMC parameters and generate samples from the posterior. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) my_samples <- mcmc(my_data, my_model, my_options) # Define the rule for dose increments and calculate the maximum dose allowed. diff --git a/man/plot-PseudoDualSimulationsSummary-missing-method.Rd b/man/plot-PseudoDualSimulationsSummary-missing-method.Rd index 5c22343da..8eb054d4b 100644 --- a/man/plot-PseudoDualSimulationsSummary-missing-method.Rd +++ b/man/plot-PseudoDualSimulationsSummary-missing-method.Rd @@ -159,7 +159,7 @@ my_design <- DualResponsesSamplesDesign( ) # MCMC options. -my_options <- McmcOptions(burnin = 10, step = 2, samples = 50) +my_options <- McmcOptions(burnin = 5, step = 1, samples = 10) \donttest{ # For illustration purpose only 1 simulation is produced. diff --git a/man/simulate-DualDesign-method.Rd b/man/simulate-DualDesign-method.Rd index dc59e55b6..b11ad6249 100644 --- a/man/simulate-DualDesign-method.Rd +++ b/man/simulate-DualDesign-method.Rd @@ -164,6 +164,7 @@ curve(trueBiomarker(x), from = 0, to = 80) # We only generate 1 trial outcome here for illustration, for the actual study # this should be increased of course, similarly for the McmcOptions - # they also need to be increased. +\donttest{ mySims <- simulate( design, trueTox = trueTox, @@ -175,11 +176,12 @@ mySims <- simulate( seed = 3, startingDose = 6, mcmcOptions = McmcOptions( - burnin = 5, + burnin = 10, step = 1, - samples = 10 + samples = 100 ) ) +} # nolint end } diff --git a/man/stopTrial.Rd b/man/stopTrial.Rd index f4c67371e..f697477c4 100644 --- a/man/stopTrial.Rd +++ b/man/stopTrial.Rd @@ -1405,7 +1405,7 @@ model <- LogisticIndepBeta( ) ##define MCMC options ##for illustration purpose we use 10 burn-in and generate 50 samples -options <- McmcOptions(burnin = 10, step = 2, samples = 50) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) ##samples of 'Samples' class samples <- mcmc(data, model, options) ##define the 'StoppingTDCIRatio' class @@ -1510,7 +1510,7 @@ Effmodel <- Effloglog( data = data ) ##for illustration purpose we use 10 burn-in and generate 50 samples -options <- McmcOptions(burnin = 10, step = 2, samples = 50) +options <- McmcOptions(burnin = 5, step = 1, samples = 10) ##DLE and efficacy samples must be of 'Samples' class DLEsamples <- mcmc(data, DLEmodel, options) Effsamples <- mcmc(data, Effmodel, options) From a957c4bdba5ed9687d9d53133533244207aac8d1 Mon Sep 17 00:00:00 2001 From: Daniel Sabanes Bove Date: Thu, 8 Jan 2026 14:01:43 +0800 Subject: [PATCH 5/6] and even a bit more --- ...ules-method-stopTrial-StoppingLowestDoseHSRBeta.R | 2 ++ .../Rules-method-stopTrial-StoppingTargetBiomarker.R | 3 ++- examples/Rules-method-stopTrialCIMaxGainSamples.R | 5 +++-- examples/Rules-method-stopTrialCITDsamples.R | 2 +- examples/Simulations-method-summarySIMDualFlexi.R | 4 ++-- ...esign-method-simulateDualResponsesSamplesDesign.R | 2 +- man/simulate-DualResponsesSamplesDesign-method.Rd | 2 +- man/stopTrial.Rd | 12 ++++++++---- man/summary-PseudoDualFlexiSimulations-method.Rd | 4 ++-- 9 files changed, 22 insertions(+), 14 deletions(-) diff --git a/examples/Rules-method-stopTrial-StoppingLowestDoseHSRBeta.R b/examples/Rules-method-stopTrial-StoppingLowestDoseHSRBeta.R index 2a0204197..992f6f0a9 100644 --- a/examples/Rules-method-stopTrial-StoppingLowestDoseHSRBeta.R +++ b/examples/Rules-method-stopTrial-StoppingLowestDoseHSRBeta.R @@ -24,6 +24,7 @@ model <- LogisticLogNormal( # Set-up some MCMC parameters and generate samples from the posterior. options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) +\donttest{ samples <- mcmc(data, model, options) # Define the rule for dose increments and calculate the maximum dose allowed. @@ -66,3 +67,4 @@ stopTrial( model = model, data = data ) +} \ No newline at end of file diff --git a/examples/Rules-method-stopTrial-StoppingTargetBiomarker.R b/examples/Rules-method-stopTrial-StoppingTargetBiomarker.R index f20f12fa2..912e5b363 100644 --- a/examples/Rules-method-stopTrial-StoppingTargetBiomarker.R +++ b/examples/Rules-method-stopTrial-StoppingTargetBiomarker.R @@ -39,6 +39,7 @@ model <- DualEndpointRW( # Set-up some MCMC parameters and generate samples from the posterior options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) +\donttest{ samples <- mcmc(data, model, options) # Define the rule for dose increments and calculate the maximum dose allowed @@ -79,5 +80,5 @@ stopTrial( model = model, data = data ) - +} # nolint end diff --git a/examples/Rules-method-stopTrialCIMaxGainSamples.R b/examples/Rules-method-stopTrialCIMaxGainSamples.R index 002234dbd..209e6cd07 100644 --- a/examples/Rules-method-stopTrialCIMaxGainSamples.R +++ b/examples/Rules-method-stopTrialCIMaxGainSamples.R @@ -27,9 +27,10 @@ Effmodel <- Effloglog( nu = c(a = 1, b = 0.025), data = data ) -##for illustration purpose we use 10 burn-in and generate 50 samples +##for illustration purposes, in reality larger number of burnin and samples shoud be used options <- McmcOptions(burnin = 5, step = 1, samples = 10) ##DLE and efficacy samples must be of 'Samples' class +\donttest{ DLEsamples <- mcmc(data, DLEmodel, options) Effsamples <- mcmc(data, Effmodel, options) @@ -74,5 +75,5 @@ stopTrial( quantile(Gstarsamples, prob = 0.5) } ) - +} # nolint end diff --git a/examples/Rules-method-stopTrialCITDsamples.R b/examples/Rules-method-stopTrialCITDsamples.R index 237f88840..d5f0d258e 100644 --- a/examples/Rules-method-stopTrialCITDsamples.R +++ b/examples/Rules-method-stopTrialCITDsamples.R @@ -18,7 +18,7 @@ model <- LogisticIndepBeta( data = data ) ##define MCMC options -##for illustration purpose we use 10 burn-in and generate 50 samples +## for illustration purposes, in reality larger number of burnin and samples shoud be used options <- McmcOptions(burnin = 5, step = 1, samples = 10) ##samples of 'Samples' class samples <- mcmc(data, model, options) diff --git a/examples/Simulations-method-summarySIMDualFlexi.R b/examples/Simulations-method-summarySIMDualFlexi.R index 36475a331..14958fdad 100644 --- a/examples/Simulations-method-summarySIMDualFlexi.R +++ b/examples/Simulations-method-summarySIMDualFlexi.R @@ -78,8 +78,8 @@ myTruthEff <- c( ## specify the options for MCMC -# For illustration purpose, we use 10 burn-in and generate 100 samples -options <- McmcOptions(burnin = 10, step = 1, samples = 100) +# for illustration purposes, in reality larger number of burnin and samples shoud be used +options <- McmcOptions(burnin = 5, step = 1, samples = 10) ## The simulation ## For illustration purpose only 1 simulation is produced (nsim=1). mySim <- simulate( diff --git a/examples/design-method-simulateDualResponsesSamplesDesign.R b/examples/design-method-simulateDualResponsesSamplesDesign.R index aba88bc65..6f56f9fad 100644 --- a/examples/design-method-simulateDualResponsesSamplesDesign.R +++ b/examples/design-method-simulateDualResponsesSamplesDesign.R @@ -68,7 +68,7 @@ myTruthGain <- function(dose) { } ## simulate the trial for 10 times involving samples -## for illustration purpose we use 10 burn-ins to generate 50 samples +## for illustration purposes, in reality larger number of burnin and samples shoud be used options <- McmcOptions(burnin = 10, step = 1, samples = 50) ## For illustration purpose only 1 simulations are produced (nsim=1). mySim <- simulate( diff --git a/man/simulate-DualResponsesSamplesDesign-method.Rd b/man/simulate-DualResponsesSamplesDesign-method.Rd index aec1666ec..e9ea2aa79 100644 --- a/man/simulate-DualResponsesSamplesDesign-method.Rd +++ b/man/simulate-DualResponsesSamplesDesign-method.Rd @@ -150,7 +150,7 @@ myTruthGain <- function(dose) { } ## simulate the trial for 10 times involving samples -## for illustration purpose we use 10 burn-ins to generate 50 samples +## for illustration purposes, in reality larger number of burnin and samples shoud be used options <- McmcOptions(burnin = 10, step = 1, samples = 50) ## For illustration purpose only 1 simulations are produced (nsim=1). mySim <- simulate( diff --git a/man/stopTrial.Rd b/man/stopTrial.Rd index f697477c4..dd55667ef 100644 --- a/man/stopTrial.Rd +++ b/man/stopTrial.Rd @@ -1068,6 +1068,7 @@ model <- LogisticLogNormal( # Set-up some MCMC parameters and generate samples from the posterior. options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) +\donttest{ samples <- mcmc(data, model, options) # Define the rule for dose increments and calculate the maximum dose allowed. @@ -1110,6 +1111,7 @@ stopTrial( model = model, data = data ) +} # nolint start # Create the data @@ -1151,6 +1153,7 @@ model <- DualEndpointRW( # Set-up some MCMC parameters and generate samples from the posterior options <- McmcOptions(burnin = 5, step = 1, samples = 10) set.seed(94) +\donttest{ samples <- mcmc(data, model, options) # Define the rule for dose increments and calculate the maximum dose allowed @@ -1191,7 +1194,7 @@ stopTrial( model = model, data = data ) - +} # nolint end # Create some data. my_data <- Data( @@ -1404,7 +1407,7 @@ model <- LogisticIndepBeta( data = data ) ##define MCMC options -##for illustration purpose we use 10 burn-in and generate 50 samples +## for illustration purposes, in reality larger number of burnin and samples shoud be used options <- McmcOptions(burnin = 5, step = 1, samples = 10) ##samples of 'Samples' class samples <- mcmc(data, model, options) @@ -1509,9 +1512,10 @@ Effmodel <- Effloglog( nu = c(a = 1, b = 0.025), data = data ) -##for illustration purpose we use 10 burn-in and generate 50 samples +##for illustration purposes, in reality larger number of burnin and samples shoud be used options <- McmcOptions(burnin = 5, step = 1, samples = 10) ##DLE and efficacy samples must be of 'Samples' class +\donttest{ DLEsamples <- mcmc(data, DLEmodel, options) Effsamples <- mcmc(data, Effmodel, options) @@ -1556,7 +1560,7 @@ stopTrial( quantile(Gstarsamples, prob = 0.5) } ) - +} # nolint end # nolint start diff --git a/man/summary-PseudoDualFlexiSimulations-method.Rd b/man/summary-PseudoDualFlexiSimulations-method.Rd index 81bda11d8..acb49cf25 100644 --- a/man/summary-PseudoDualFlexiSimulations-method.Rd +++ b/man/summary-PseudoDualFlexiSimulations-method.Rd @@ -123,8 +123,8 @@ myTruthEff <- c( ## specify the options for MCMC -# For illustration purpose, we use 10 burn-in and generate 100 samples -options <- McmcOptions(burnin = 10, step = 1, samples = 100) +# for illustration purposes, in reality larger number of burnin and samples shoud be used +options <- McmcOptions(burnin = 5, step = 1, samples = 10) ## The simulation ## For illustration purpose only 1 simulation is produced (nsim=1). mySim <- simulate( From 0429a2a522cb915d513ac7de98a60a7e582ca218 Mon Sep 17 00:00:00 2001 From: Daniel Sabanes Bove Date: Thu, 8 Jan 2026 14:33:39 +0800 Subject: [PATCH 6/6] make sure we stop for missing dose in simulation examples --- examples/Design-class-DADesign.R | 2 +- examples/Design-class-Design.R | 4 +++- examples/Design-class-DesignGrouped.R | 4 +++- examples/Design-class-DesignOrdinal.R | 5 ++++- examples/Design-class-DualDesign.R | 2 +- examples/Design-class-DualResponsesDesign.R | 2 +- examples/Design-class-DualResponsesSamplesDesign.R | 2 +- examples/Design-class-TDDesign.R | 2 +- examples/Design-class-TDsamplesDesign.R | 2 +- examples/Simulation-method-show-ReportLabels.R | 3 ++- examples/Simulations-method-plot-DualSimulations.R | 2 +- examples/Simulations-method-plot-SimulationsSummary.R | 2 +- examples/Simulations-method-plotSIMsingle.R | 2 +- examples/Simulations-method-plotSUMDual.R | 2 +- examples/Simulations-method-plotSUMsingle.R | 2 +- examples/Simulations-method-show-SimulationsSummary.R | 2 +- ...ulations-method-show-SimulationsSummary_additionalStats.R | 4 +++- examples/Simulations-method-summary.R | 2 +- examples/Simulations-method-summarySIMDualFlexi.R | 2 +- examples/design-method-examine-DADesign.R | 2 +- examples/design-method-examine-Design.R | 2 +- examples/design-method-simulate-DADesign.R | 2 +- examples/design-method-simulate-Design.R | 2 +- examples/design-method-simulate-DualDesign.R | 2 +- examples/design-method-simulateDualResponsesDesign.R | 2 +- examples/design-method-simulateDualResponsesSamplesDesign.R | 2 +- examples/design-method-simulateTDDesign.R | 2 +- examples/design-method-simulateTDsamplesDesign.R | 2 +- man/DADesign-class.Rd | 2 +- man/Design-class.Rd | 4 +++- man/DesignGrouped-class.Rd | 4 +++- man/DesignOrdinal-class.Rd | 5 ++++- man/DualDesign-class.Rd | 2 +- man/DualResponsesDesign-class.Rd | 2 +- man/DualResponsesSamplesDesign-class.Rd | 2 +- man/TDDesign-class.Rd | 2 +- man/TDsamplesDesign-class.Rd | 2 +- man/examine.Rd | 4 ++-- man/plot-DualSimulations-missing-method.Rd | 2 +- man/plot-GeneralSimulations-missing-method.Rd | 2 +- man/plot-PseudoDualSimulationsSummary-missing-method.Rd | 2 +- man/plot-PseudoSimulationsSummary-missing-method.Rd | 2 +- man/plot-SimulationsSummary-missing-method.Rd | 2 +- man/show-SimulationsSummary-method.Rd | 2 +- man/simulate-DADesign-method.Rd | 2 +- man/simulate-Design-method.Rd | 2 +- man/simulate-DualDesign-method.Rd | 2 +- man/simulate-DualResponsesDesign-method.Rd | 2 +- man/simulate-DualResponsesSamplesDesign-method.Rd | 2 +- man/simulate-TDDesign-method.Rd | 2 +- man/simulate-TDsamplesDesign-method.Rd | 2 +- man/summary-PseudoDualFlexiSimulations-method.Rd | 2 +- man/summary-Simulations-method.Rd | 2 +- 53 files changed, 71 insertions(+), 54 deletions(-) diff --git a/examples/Design-class-DADesign.R b/examples/Design-class-DADesign.R index 8cbf1324d..5a42d3868 100644 --- a/examples/Design-class-DADesign.R +++ b/examples/Design-class-DADesign.R @@ -57,7 +57,7 @@ my_stopping1 <- StoppingTargetProb( my_stopping2 <- StoppingMinPatients(nPatients = 50) -my_stopping <- (my_stopping1 | my_stopping2) +my_stopping <- (my_stopping1 | my_stopping2) | StoppingMissingDose() my_safety_window <- SafetyWindowConst(c(6, 2), 7, 7) diff --git a/examples/Design-class-Design.R b/examples/Design-class-Design.R index 1e898f7aa..0f5245ed4 100644 --- a/examples/Design-class-Design.R +++ b/examples/Design-class-Design.R @@ -32,7 +32,9 @@ my_stopping2 <- StoppingTargetProb( prob = 0.5 ) my_stopping3 <- StoppingMinPatients(nPatients = 20) -my_stopping <- (my_stopping1 & my_stopping2) | my_stopping3 +my_stopping <- (my_stopping1 & my_stopping2) | + my_stopping3 | + StoppingMissingDose() # Choose the rule for dose increments. my_increments <- IncrementsRelative( diff --git a/examples/Design-class-DesignGrouped.R b/examples/Design-class-DesignGrouped.R index a0749f2b5..a98e36066 100644 --- a/examples/Design-class-DesignGrouped.R +++ b/examples/Design-class-DesignGrouped.R @@ -32,7 +32,9 @@ my_stopping2 <- StoppingTargetProb( prob = 0.5 ) my_stopping3 <- StoppingMinPatients(nPatients = 20) -my_stopping <- (my_stopping1 & my_stopping2) | my_stopping3 +my_stopping <- (my_stopping1 & my_stopping2) | + my_stopping3 | + StoppingMissingDose() # Choose the rule for dose increments. my_increments <- IncrementsRelative( diff --git a/examples/Design-class-DesignOrdinal.R b/examples/Design-class-DesignOrdinal.R index f71297a75..41ac42131 100644 --- a/examples/Design-class-DesignOrdinal.R +++ b/examples/Design-class-DesignOrdinal.R @@ -14,7 +14,10 @@ my_stopping2 <- StoppingTargetProb( prob = 0.5 ) my_stopping3 <- StoppingMinPatients(nPatients = 20) -my_stopping <- StoppingOrdinal(1L, (my_stopping1 & my_stopping2) | my_stopping3) +my_stopping <- StoppingOrdinal( + 1L, + (my_stopping1 & my_stopping2) | my_stopping3 | StoppingMissingDose() +) # Initialize the design. design <- DesignOrdinal( diff --git a/examples/Design-class-DualDesign.R b/examples/Design-class-DualDesign.R index 2599da346..ff948df92 100644 --- a/examples/Design-class-DualDesign.R +++ b/examples/Design-class-DualDesign.R @@ -33,7 +33,7 @@ my_stopping1 <- StoppingTargetBiomarker( target = c(0.9, 1), prob = 0.5 ) -my_stopping <- my_stopping1 | StoppingMinPatients(40) +my_stopping <- my_stopping1 | StoppingMinPatients(40) | StoppingMissingDose() # Choose the rule for dose increments. my_increments <- IncrementsRelative( diff --git a/examples/Design-class-DualResponsesDesign.R b/examples/Design-class-DualResponsesDesign.R index 4fba4aab3..953d9571a 100644 --- a/examples/Design-class-DualResponsesDesign.R +++ b/examples/Design-class-DualResponsesDesign.R @@ -25,7 +25,7 @@ my_increments <- IncrementsRelative( ) my_size <- CohortSizeConst(size = 3) -my_stopping <- StoppingMinPatients(nPatients = 36) +my_stopping <- StoppingMinPatients(nPatients = 36) | StoppingMissingDose() design <- DualResponsesDesign( nextBest = my_next_best, diff --git a/examples/Design-class-DualResponsesSamplesDesign.R b/examples/Design-class-DualResponsesSamplesDesign.R index fd6c80f6d..3ac2b8b27 100644 --- a/examples/Design-class-DualResponsesSamplesDesign.R +++ b/examples/Design-class-DualResponsesSamplesDesign.R @@ -33,7 +33,7 @@ my_increments <- IncrementsRelative( increments = c(2, 2) ) my_size <- CohortSizeConst(size = 3) -my_stopping <- StoppingMinPatients(nPatients = 36) +my_stopping <- StoppingMinPatients(nPatients = 36) | StoppingMissingDose() design <- DualResponsesSamplesDesign( nextBest = my_next_best, diff --git a/examples/Design-class-TDDesign.R b/examples/Design-class-TDDesign.R index 7b76953e1..ab6877241 100644 --- a/examples/Design-class-TDDesign.R +++ b/examples/Design-class-TDDesign.R @@ -24,7 +24,7 @@ my_increments <- IncrementsRelative( ) # Stop when the maximum sample size of 36 patients is reached. -my_stopping <- StoppingMinPatients(nPatients = 36) +my_stopping <- StoppingMinPatients(nPatients = 36) | StoppingMissingDose() # The design with all the above information and starting with a dose of 25. # This design incorporates only DLT responses and no DLT samples are involved diff --git a/examples/Design-class-TDsamplesDesign.R b/examples/Design-class-TDsamplesDesign.R index 5f1ff0ae4..6cdfb12e5 100644 --- a/examples/Design-class-TDsamplesDesign.R +++ b/examples/Design-class-TDsamplesDesign.R @@ -27,7 +27,7 @@ my_increments <- IncrementsRelative( ) # Stop when the maximum sample size of 36 patients is reached. -my_stopping <- StoppingMinPatients(nPatients = 36) +my_stopping <- StoppingMinPatients(nPatients = 36) | StoppingMissingDose() # The design with all the above information and starting with a dose of 25. design <- TDsamplesDesign( diff --git a/examples/Simulation-method-show-ReportLabels.R b/examples/Simulation-method-show-ReportLabels.R index e285d3190..8c500c0cc 100644 --- a/examples/Simulation-method-show-ReportLabels.R +++ b/examples/Simulation-method-show-ReportLabels.R @@ -45,7 +45,8 @@ myStopping <- StoppingAny( ), report_label = "StoppingAllLabel" ), - myStopping3 + myStopping3, + StoppingMissingDose() ), report_label = "StoppingAnyLabel" ) diff --git a/examples/Simulations-method-plot-DualSimulations.R b/examples/Simulations-method-plot-DualSimulations.R index 8bac4845a..e559edae7 100644 --- a/examples/Simulations-method-plot-DualSimulations.R +++ b/examples/Simulations-method-plot-DualSimulations.R @@ -123,7 +123,7 @@ myStopping4 <- StoppingTargetBiomarker( target = c(0.9, 1), prob = 0.5 ) -myStopping <- myStopping4 | StoppingMinPatients(40) +myStopping <- myStopping4 | StoppingMinPatients(40) | StoppingMissingDose() my_size1 <- CohortSizeRange( intervals = c(0, 30), diff --git a/examples/Simulations-method-plot-SimulationsSummary.R b/examples/Simulations-method-plot-SimulationsSummary.R index 1e55b2e14..12111f1d4 100644 --- a/examples/Simulations-method-plot-SimulationsSummary.R +++ b/examples/Simulations-method-plot-SimulationsSummary.R @@ -35,7 +35,7 @@ myStopping2 <- StoppingTargetProb( prob = 0.5 ) myStopping3 <- StoppingMinPatients(nPatients = 20) -myStopping <- (myStopping1 & myStopping2) | myStopping3 +myStopping <- (myStopping1 & myStopping2) | myStopping3 | StoppingMissingDose() # Choose the rule for dose increments myIncrements <- IncrementsRelative( diff --git a/examples/Simulations-method-plotSIMsingle.R b/examples/Simulations-method-plotSIMsingle.R index 0e6dd5fa3..af026b78a 100644 --- a/examples/Simulations-method-plotSIMsingle.R +++ b/examples/Simulations-method-plotSIMsingle.R @@ -32,7 +32,7 @@ myIncrements <- IncrementsRelative( increments = c(2, 2) ) ## Specified the stopping rule e.g stop when the maximum sample size of 12 patients has been reached -myStopping <- StoppingMinPatients(nPatients = 12) +myStopping <- StoppingMinPatients(nPatients = 12) | StoppingMissingDose() ## Now specified the design with all the above information and starting with a dose of 25 design <- TDDesign( model = model, diff --git a/examples/Simulations-method-plotSUMDual.R b/examples/Simulations-method-plotSUMDual.R index 21f95a056..6e7edf620 100644 --- a/examples/Simulations-method-plotSUMDual.R +++ b/examples/Simulations-method-plotSUMDual.R @@ -34,7 +34,7 @@ my_increments <- IncrementsRelative(intervals = 0, increments = 2) my_size <- CohortSizeConst(size = 3) # Stop when 10 subjects are treated (for illustration only). -my_stopping <- StoppingMinPatients(nPatients = 10) +my_stopping <- StoppingMinPatients(nPatients = 10) | StoppingMissingDose() ## Now specified the design with all the above information and starting with a dose of 25 diff --git a/examples/Simulations-method-plotSUMsingle.R b/examples/Simulations-method-plotSUMsingle.R index 2a5b6845c..e405ace0d 100644 --- a/examples/Simulations-method-plotSUMsingle.R +++ b/examples/Simulations-method-plotSUMsingle.R @@ -31,7 +31,7 @@ myIncrements <- IncrementsRelative( increments = c(2, 2) ) ## Specified the stopping rule e.g stop when the maximum sample size of 12 patients has been reached -myStopping <- StoppingMinPatients(nPatients = 12) +myStopping <- StoppingMinPatients(nPatients = 12) | StoppingMissingDose() ## Now specified the design with all the above information and starting with a dose of 25 design <- TDDesign( model = model, diff --git a/examples/Simulations-method-show-SimulationsSummary.R b/examples/Simulations-method-show-SimulationsSummary.R index 9fea6e5c5..015e1affa 100644 --- a/examples/Simulations-method-show-SimulationsSummary.R +++ b/examples/Simulations-method-show-SimulationsSummary.R @@ -35,7 +35,7 @@ myStopping2 <- StoppingTargetProb( prob = 0.5 ) myStopping3 <- StoppingMinPatients(nPatients = 20) -myStopping <- (myStopping1 & myStopping2) | myStopping3 +myStopping <- (myStopping1 & myStopping2) | myStopping3 | StoppingMissingDose() # Choose the rule for dose increments myIncrements <- IncrementsRelative( diff --git a/examples/Simulations-method-show-SimulationsSummary_additionalStats.R b/examples/Simulations-method-show-SimulationsSummary_additionalStats.R index 645278a38..4b0c62bec 100644 --- a/examples/Simulations-method-show-SimulationsSummary_additionalStats.R +++ b/examples/Simulations-method-show-SimulationsSummary_additionalStats.R @@ -33,7 +33,9 @@ my_stopping2 <- StoppingTargetProb( prob = 0.5 ) my_stopping3 <- StoppingMinPatients(nPatients = 20) -my_stopping <- (my_stopping1 & my_stopping2) | my_stopping3 +my_stopping <- (my_stopping1 & my_stopping2) | + my_stopping3 | + StoppingMissingDose() # Choose the rule for dose increments my_increments <- IncrementsRelative( diff --git a/examples/Simulations-method-summary.R b/examples/Simulations-method-summary.R index 8dec52380..6aabe8d5d 100644 --- a/examples/Simulations-method-summary.R +++ b/examples/Simulations-method-summary.R @@ -35,7 +35,7 @@ myStopping2 <- StoppingTargetProb( prob = 0.5 ) myStopping3 <- StoppingMinPatients(nPatients = 20) -myStopping <- (myStopping1 & myStopping2) | myStopping3 +myStopping <- (myStopping1 & myStopping2) | myStopping3 | StoppingMissingDose() # Choose the rule for dose increments myIncrements <- IncrementsRelative( diff --git a/examples/Simulations-method-summarySIMDualFlexi.R b/examples/Simulations-method-summarySIMDualFlexi.R index 14958fdad..3cad89928 100644 --- a/examples/Simulations-method-summarySIMDualFlexi.R +++ b/examples/Simulations-method-summarySIMDualFlexi.R @@ -45,7 +45,7 @@ myIncrements <- IncrementsRelative( mySize <- CohortSizeConst(size = 3) ## Stop only when 10 subjects are treated: ## very low sample size is just for illustration here -myStopping <- StoppingMinPatients(nPatients = 10) +myStopping <- StoppingMinPatients(nPatients = 10) | StoppingMissingDose() ## Specified the design design <- DualResponsesSamplesDesign( diff --git a/examples/design-method-examine-DADesign.R b/examples/design-method-examine-DADesign.R index fa15ec221..47fa2328c 100644 --- a/examples/design-method-examine-DADesign.R +++ b/examples/design-method-examine-DADesign.R @@ -51,7 +51,7 @@ myStopping1 <- StoppingTargetProb( ) myStopping2 <- StoppingMinPatients(nPatients = 50) -myStopping <- (myStopping1 | myStopping2) +myStopping <- (myStopping1 | myStopping2) | StoppingMissingDose() # Choose the safety window mysafetywindow <- SafetyWindowConst(c(6, 2), 7, 7) diff --git a/examples/design-method-examine-Design.R b/examples/design-method-examine-Design.R index 2021f6246..a46fade37 100644 --- a/examples/design-method-examine-Design.R +++ b/examples/design-method-examine-Design.R @@ -34,7 +34,7 @@ my_stopping2 <- StoppingTargetProb( prob = 0.5 ) my_stopping3 <- StoppingMinPatients(nPatients = 20) -my_stopping <- (my_stopping1 & my_stopping2) | my_stopping3 +my_stopping <- (my_stopping1 & my_stopping2) | my_stopping3 | StoppingMissingDose() # Choose the rule for dose increments. my_increments <- IncrementsRelative( diff --git a/examples/design-method-simulate-DADesign.R b/examples/design-method-simulate-DADesign.R index c1c8853bb..9c1948883 100644 --- a/examples/design-method-simulate-DADesign.R +++ b/examples/design-method-simulate-DADesign.R @@ -53,7 +53,7 @@ myStopping1 <- StoppingTargetProb( ) myStopping2 <- StoppingMinPatients(nPatients = 50) -myStopping <- (myStopping1 | myStopping2) +myStopping <- (myStopping1 | myStopping2) | StoppingMissingDose() # Choose the safety window mysafetywindow <- SafetyWindowConst(c(6, 2), 7, 7) diff --git a/examples/design-method-simulate-Design.R b/examples/design-method-simulate-Design.R index f74f9508f..79055dc85 100644 --- a/examples/design-method-simulate-Design.R +++ b/examples/design-method-simulate-Design.R @@ -35,7 +35,7 @@ myStopping2 <- StoppingTargetProb( prob = 0.5 ) myStopping3 <- StoppingMinPatients(nPatients = 20) -myStopping <- (myStopping1 & myStopping2) | myStopping3 +myStopping <- (myStopping1 & myStopping2) | myStopping3 | StoppingMissingDose() # Choose the rule for dose increments myIncrements <- IncrementsRelative( diff --git a/examples/design-method-simulate-DualDesign.R b/examples/design-method-simulate-DualDesign.R index efa378631..12fb2b242 100644 --- a/examples/design-method-simulate-DualDesign.R +++ b/examples/design-method-simulate-DualDesign.R @@ -38,7 +38,7 @@ myStopping4 <- StoppingTargetBiomarker( target = c(0.9, 1), prob = 0.5 ) -myStopping <- myStopping4 | StoppingMinPatients(10) +myStopping <- myStopping4 | StoppingMinPatients(10) | StoppingMissingDose() # Choose the rule for dose increments myIncrements <- IncrementsRelative( diff --git a/examples/design-method-simulateDualResponsesDesign.R b/examples/design-method-simulateDualResponsesDesign.R index 1f05c7391..97158f31c 100644 --- a/examples/design-method-simulateDualResponsesDesign.R +++ b/examples/design-method-simulateDualResponsesDesign.R @@ -37,7 +37,7 @@ myIncrements <- IncrementsRelative( ## cohort size of 3 mySize <- CohortSizeConst(size = 3) ## Stop only when 36 subjects are treated -myStopping <- StoppingMinPatients(nPatients = 36) +myStopping <- StoppingMinPatients(nPatients = 36) | StoppingMissingDose() ## Now specified the design with all the above information and starting with a dose of 25 ## Specified the design(for details please refer to the 'DualResponsesDesign' example) diff --git a/examples/design-method-simulateDualResponsesSamplesDesign.R b/examples/design-method-simulateDualResponsesSamplesDesign.R index 6f56f9fad..f7426d5d9 100644 --- a/examples/design-method-simulateDualResponsesSamplesDesign.R +++ b/examples/design-method-simulateDualResponsesSamplesDesign.R @@ -43,7 +43,7 @@ myIncrements <- IncrementsRelative( mySize <- CohortSizeConst(size = 3) ## Stop only when 10 subjects are treated (only for illustration such a low ## sample size) -myStopping <- StoppingMinPatients(nPatients = 10) +myStopping <- StoppingMinPatients(nPatients = 10) | StoppingMissingDose() ## Now specified the design with all the above information and starting with ## a dose of 25 diff --git a/examples/design-method-simulateTDDesign.R b/examples/design-method-simulateTDDesign.R index 9dd8ef967..093da611e 100644 --- a/examples/design-method-simulateTDDesign.R +++ b/examples/design-method-simulateTDDesign.R @@ -40,7 +40,7 @@ myIncrements <- IncrementsRelative( increments = c(2, 2) ) ## Specified the stopping rule e.g stop when the maximum sample size of 36 patients has been reached -myStopping <- StoppingMinPatients(nPatients = 36) +myStopping <- StoppingMinPatients(nPatients = 36) | StoppingMissingDose() ## Specified the design(for details please refer to the 'TDDesign' example) diff --git a/examples/design-method-simulateTDsamplesDesign.R b/examples/design-method-simulateTDsamplesDesign.R index b5efb2700..bfbbe1f2a 100644 --- a/examples/design-method-simulateTDsamplesDesign.R +++ b/examples/design-method-simulateTDsamplesDesign.R @@ -36,7 +36,7 @@ myIncrements <- IncrementsRelative( increments = c(2, 2) ) ## Specified the stopping rule e.g stop when the maximum sample size of 36 patients has been reached -myStopping <- StoppingMinPatients(nPatients = 36) +myStopping <- StoppingMinPatients(nPatients = 36) | StoppingMissingDose() ## Specified the design(for details please refer to the 'TDsamplesDesign' example) design <- TDsamplesDesign( diff --git a/man/DADesign-class.Rd b/man/DADesign-class.Rd index e6bc70dcc..22d76e148 100644 --- a/man/DADesign-class.Rd +++ b/man/DADesign-class.Rd @@ -119,7 +119,7 @@ my_stopping1 <- StoppingTargetProb( my_stopping2 <- StoppingMinPatients(nPatients = 50) -my_stopping <- (my_stopping1 | my_stopping2) +my_stopping <- (my_stopping1 | my_stopping2) | StoppingMissingDose() my_safety_window <- SafetyWindowConst(c(6, 2), 7, 7) diff --git a/man/Design-class.Rd b/man/Design-class.Rd index 879678e25..d7e3db5f2 100644 --- a/man/Design-class.Rd +++ b/man/Design-class.Rd @@ -88,7 +88,9 @@ my_stopping2 <- StoppingTargetProb( prob = 0.5 ) my_stopping3 <- StoppingMinPatients(nPatients = 20) -my_stopping <- (my_stopping1 & my_stopping2) | my_stopping3 +my_stopping <- (my_stopping1 & my_stopping2) | + my_stopping3 | + StoppingMissingDose() # Choose the rule for dose increments. my_increments <- IncrementsRelative( diff --git a/man/DesignGrouped-class.Rd b/man/DesignGrouped-class.Rd index 8791055c7..df2bba391 100644 --- a/man/DesignGrouped-class.Rd +++ b/man/DesignGrouped-class.Rd @@ -119,7 +119,9 @@ my_stopping2 <- StoppingTargetProb( prob = 0.5 ) my_stopping3 <- StoppingMinPatients(nPatients = 20) -my_stopping <- (my_stopping1 & my_stopping2) | my_stopping3 +my_stopping <- (my_stopping1 & my_stopping2) | + my_stopping3 | + StoppingMissingDose() # Choose the rule for dose increments. my_increments <- IncrementsRelative( diff --git a/man/DesignOrdinal-class.Rd b/man/DesignOrdinal-class.Rd index 52f3dc29b..a6ce4df77 100644 --- a/man/DesignOrdinal-class.Rd +++ b/man/DesignOrdinal-class.Rd @@ -87,7 +87,10 @@ my_stopping2 <- StoppingTargetProb( prob = 0.5 ) my_stopping3 <- StoppingMinPatients(nPatients = 20) -my_stopping <- StoppingOrdinal(1L, (my_stopping1 & my_stopping2) | my_stopping3) +my_stopping <- StoppingOrdinal( + 1L, + (my_stopping1 & my_stopping2) | my_stopping3 | StoppingMissingDose() +) # Initialize the design. design <- DesignOrdinal( diff --git a/man/DualDesign-class.Rd b/man/DualDesign-class.Rd index 576cee0cb..c747cd734 100644 --- a/man/DualDesign-class.Rd +++ b/man/DualDesign-class.Rd @@ -82,7 +82,7 @@ my_stopping1 <- StoppingTargetBiomarker( target = c(0.9, 1), prob = 0.5 ) -my_stopping <- my_stopping1 | StoppingMinPatients(40) +my_stopping <- my_stopping1 | StoppingMinPatients(40) | StoppingMissingDose() # Choose the rule for dose increments. my_increments <- IncrementsRelative( diff --git a/man/DualResponsesDesign-class.Rd b/man/DualResponsesDesign-class.Rd index 13cad1cf9..1e2b244de 100644 --- a/man/DualResponsesDesign-class.Rd +++ b/man/DualResponsesDesign-class.Rd @@ -72,7 +72,7 @@ my_increments <- IncrementsRelative( ) my_size <- CohortSizeConst(size = 3) -my_stopping <- StoppingMinPatients(nPatients = 36) +my_stopping <- StoppingMinPatients(nPatients = 36) | StoppingMissingDose() design <- DualResponsesDesign( nextBest = my_next_best, diff --git a/man/DualResponsesSamplesDesign-class.Rd b/man/DualResponsesSamplesDesign-class.Rd index 9e944cd89..11c8240d2 100644 --- a/man/DualResponsesSamplesDesign-class.Rd +++ b/man/DualResponsesSamplesDesign-class.Rd @@ -80,7 +80,7 @@ my_increments <- IncrementsRelative( increments = c(2, 2) ) my_size <- CohortSizeConst(size = 3) -my_stopping <- StoppingMinPatients(nPatients = 36) +my_stopping <- StoppingMinPatients(nPatients = 36) | StoppingMissingDose() design <- DualResponsesSamplesDesign( nextBest = my_next_best, diff --git a/man/TDDesign-class.Rd b/man/TDDesign-class.Rd index fa1ebd96d..639dd37a7 100644 --- a/man/TDDesign-class.Rd +++ b/man/TDDesign-class.Rd @@ -85,7 +85,7 @@ my_increments <- IncrementsRelative( ) # Stop when the maximum sample size of 36 patients is reached. -my_stopping <- StoppingMinPatients(nPatients = 36) +my_stopping <- StoppingMinPatients(nPatients = 36) | StoppingMissingDose() # The design with all the above information and starting with a dose of 25. # This design incorporates only DLT responses and no DLT samples are involved diff --git a/man/TDsamplesDesign-class.Rd b/man/TDsamplesDesign-class.Rd index 74fe62b4c..7f851adfe 100644 --- a/man/TDsamplesDesign-class.Rd +++ b/man/TDsamplesDesign-class.Rd @@ -89,7 +89,7 @@ my_increments <- IncrementsRelative( ) # Stop when the maximum sample size of 36 patients is reached. -my_stopping <- StoppingMinPatients(nPatients = 36) +my_stopping <- StoppingMinPatients(nPatients = 36) | StoppingMissingDose() # The design with all the above information and starting with a dose of 25. design <- TDsamplesDesign( diff --git a/man/examine.Rd b/man/examine.Rd index 987f3429a..c0cda4b06 100644 --- a/man/examine.Rd +++ b/man/examine.Rd @@ -98,7 +98,7 @@ my_stopping2 <- StoppingTargetProb( prob = 0.5 ) my_stopping3 <- StoppingMinPatients(nPatients = 20) -my_stopping <- (my_stopping1 & my_stopping2) | my_stopping3 +my_stopping <- (my_stopping1 & my_stopping2) | my_stopping3 | StoppingMissingDose() # Choose the rule for dose increments. my_increments <- IncrementsRelative( @@ -240,7 +240,7 @@ myStopping1 <- StoppingTargetProb( ) myStopping2 <- StoppingMinPatients(nPatients = 50) -myStopping <- (myStopping1 | myStopping2) +myStopping <- (myStopping1 | myStopping2) | StoppingMissingDose() # Choose the safety window mysafetywindow <- SafetyWindowConst(c(6, 2), 7, 7) diff --git a/man/plot-DualSimulations-missing-method.Rd b/man/plot-DualSimulations-missing-method.Rd index ac65500b7..a2f139f21 100644 --- a/man/plot-DualSimulations-missing-method.Rd +++ b/man/plot-DualSimulations-missing-method.Rd @@ -158,7 +158,7 @@ myStopping4 <- StoppingTargetBiomarker( target = c(0.9, 1), prob = 0.5 ) -myStopping <- myStopping4 | StoppingMinPatients(40) +myStopping <- myStopping4 | StoppingMinPatients(40) | StoppingMissingDose() my_size1 <- CohortSizeRange( intervals = c(0, 30), diff --git a/man/plot-GeneralSimulations-missing-method.Rd b/man/plot-GeneralSimulations-missing-method.Rd index be7d64526..6bb3f6230 100644 --- a/man/plot-GeneralSimulations-missing-method.Rd +++ b/man/plot-GeneralSimulations-missing-method.Rd @@ -68,7 +68,7 @@ myIncrements <- IncrementsRelative( increments = c(2, 2) ) ## Specified the stopping rule e.g stop when the maximum sample size of 12 patients has been reached -myStopping <- StoppingMinPatients(nPatients = 12) +myStopping <- StoppingMinPatients(nPatients = 12) | StoppingMissingDose() ## Now specified the design with all the above information and starting with a dose of 25 design <- TDDesign( model = model, diff --git a/man/plot-PseudoDualSimulationsSummary-missing-method.Rd b/man/plot-PseudoDualSimulationsSummary-missing-method.Rd index 8eb054d4b..74a6dfea1 100644 --- a/man/plot-PseudoDualSimulationsSummary-missing-method.Rd +++ b/man/plot-PseudoDualSimulationsSummary-missing-method.Rd @@ -86,7 +86,7 @@ my_increments <- IncrementsRelative(intervals = 0, increments = 2) my_size <- CohortSizeConst(size = 3) # Stop when 10 subjects are treated (for illustration only). -my_stopping <- StoppingMinPatients(nPatients = 10) +my_stopping <- StoppingMinPatients(nPatients = 10) | StoppingMissingDose() ## Now specified the design with all the above information and starting with a dose of 25 diff --git a/man/plot-PseudoSimulationsSummary-missing-method.Rd b/man/plot-PseudoSimulationsSummary-missing-method.Rd index 367ec4202..939d7e508 100644 --- a/man/plot-PseudoSimulationsSummary-missing-method.Rd +++ b/man/plot-PseudoSimulationsSummary-missing-method.Rd @@ -69,7 +69,7 @@ myIncrements <- IncrementsRelative( increments = c(2, 2) ) ## Specified the stopping rule e.g stop when the maximum sample size of 12 patients has been reached -myStopping <- StoppingMinPatients(nPatients = 12) +myStopping <- StoppingMinPatients(nPatients = 12) | StoppingMissingDose() ## Now specified the design with all the above information and starting with a dose of 25 design <- TDDesign( model = model, diff --git a/man/plot-SimulationsSummary-missing-method.Rd b/man/plot-SimulationsSummary-missing-method.Rd index 488983959..52c8789ac 100644 --- a/man/plot-SimulationsSummary-missing-method.Rd +++ b/man/plot-SimulationsSummary-missing-method.Rd @@ -81,7 +81,7 @@ myStopping2 <- StoppingTargetProb( prob = 0.5 ) myStopping3 <- StoppingMinPatients(nPatients = 20) -myStopping <- (myStopping1 & myStopping2) | myStopping3 +myStopping <- (myStopping1 & myStopping2) | myStopping3 | StoppingMissingDose() # Choose the rule for dose increments myIncrements <- IncrementsRelative( diff --git a/man/show-SimulationsSummary-method.Rd b/man/show-SimulationsSummary-method.Rd index 413e29ddf..946e4f695 100644 --- a/man/show-SimulationsSummary-method.Rd +++ b/man/show-SimulationsSummary-method.Rd @@ -57,7 +57,7 @@ myStopping2 <- StoppingTargetProb( prob = 0.5 ) myStopping3 <- StoppingMinPatients(nPatients = 20) -myStopping <- (myStopping1 & myStopping2) | myStopping3 +myStopping <- (myStopping1 & myStopping2) | myStopping3 | StoppingMissingDose() # Choose the rule for dose increments myIncrements <- IncrementsRelative( diff --git a/man/simulate-DADesign-method.Rd b/man/simulate-DADesign-method.Rd index 6ea7b9281..94a64d0ed 100644 --- a/man/simulate-DADesign-method.Rd +++ b/man/simulate-DADesign-method.Rd @@ -140,7 +140,7 @@ myStopping1 <- StoppingTargetProb( ) myStopping2 <- StoppingMinPatients(nPatients = 50) -myStopping <- (myStopping1 | myStopping2) +myStopping <- (myStopping1 | myStopping2) | StoppingMissingDose() # Choose the safety window mysafetywindow <- SafetyWindowConst(c(6, 2), 7, 7) diff --git a/man/simulate-Design-method.Rd b/man/simulate-Design-method.Rd index 920a7bffe..677a5eced 100644 --- a/man/simulate-Design-method.Rd +++ b/man/simulate-Design-method.Rd @@ -101,7 +101,7 @@ myStopping2 <- StoppingTargetProb( prob = 0.5 ) myStopping3 <- StoppingMinPatients(nPatients = 20) -myStopping <- (myStopping1 & myStopping2) | myStopping3 +myStopping <- (myStopping1 & myStopping2) | myStopping3 | StoppingMissingDose() # Choose the rule for dose increments myIncrements <- IncrementsRelative( diff --git a/man/simulate-DualDesign-method.Rd b/man/simulate-DualDesign-method.Rd index b11ad6249..95edf56ec 100644 --- a/man/simulate-DualDesign-method.Rd +++ b/man/simulate-DualDesign-method.Rd @@ -112,7 +112,7 @@ myStopping4 <- StoppingTargetBiomarker( target = c(0.9, 1), prob = 0.5 ) -myStopping <- myStopping4 | StoppingMinPatients(10) +myStopping <- myStopping4 | StoppingMinPatients(10) | StoppingMissingDose() # Choose the rule for dose increments myIncrements <- IncrementsRelative( diff --git a/man/simulate-DualResponsesDesign-method.Rd b/man/simulate-DualResponsesDesign-method.Rd index 01e32a398..e9945666f 100644 --- a/man/simulate-DualResponsesDesign-method.Rd +++ b/man/simulate-DualResponsesDesign-method.Rd @@ -102,7 +102,7 @@ myIncrements <- IncrementsRelative( ## cohort size of 3 mySize <- CohortSizeConst(size = 3) ## Stop only when 36 subjects are treated -myStopping <- StoppingMinPatients(nPatients = 36) +myStopping <- StoppingMinPatients(nPatients = 36) | StoppingMissingDose() ## Now specified the design with all the above information and starting with a dose of 25 ## Specified the design(for details please refer to the 'DualResponsesDesign' example) diff --git a/man/simulate-DualResponsesSamplesDesign-method.Rd b/man/simulate-DualResponsesSamplesDesign-method.Rd index e9ea2aa79..fe1123584 100644 --- a/man/simulate-DualResponsesSamplesDesign-method.Rd +++ b/man/simulate-DualResponsesSamplesDesign-method.Rd @@ -125,7 +125,7 @@ myIncrements <- IncrementsRelative( mySize <- CohortSizeConst(size = 3) ## Stop only when 10 subjects are treated (only for illustration such a low ## sample size) -myStopping <- StoppingMinPatients(nPatients = 10) +myStopping <- StoppingMinPatients(nPatients = 10) | StoppingMissingDose() ## Now specified the design with all the above information and starting with ## a dose of 25 diff --git a/man/simulate-TDDesign-method.Rd b/man/simulate-TDDesign-method.Rd index d873b77c4..b8a38d74b 100644 --- a/man/simulate-TDDesign-method.Rd +++ b/man/simulate-TDDesign-method.Rd @@ -99,7 +99,7 @@ myIncrements <- IncrementsRelative( increments = c(2, 2) ) ## Specified the stopping rule e.g stop when the maximum sample size of 36 patients has been reached -myStopping <- StoppingMinPatients(nPatients = 36) +myStopping <- StoppingMinPatients(nPatients = 36) | StoppingMissingDose() ## Specified the design(for details please refer to the 'TDDesign' example) diff --git a/man/simulate-TDsamplesDesign-method.Rd b/man/simulate-TDsamplesDesign-method.Rd index 6a9bcd087..63267bf58 100644 --- a/man/simulate-TDsamplesDesign-method.Rd +++ b/man/simulate-TDsamplesDesign-method.Rd @@ -100,7 +100,7 @@ myIncrements <- IncrementsRelative( increments = c(2, 2) ) ## Specified the stopping rule e.g stop when the maximum sample size of 36 patients has been reached -myStopping <- StoppingMinPatients(nPatients = 36) +myStopping <- StoppingMinPatients(nPatients = 36) | StoppingMissingDose() ## Specified the design(for details please refer to the 'TDsamplesDesign' example) design <- TDsamplesDesign( diff --git a/man/summary-PseudoDualFlexiSimulations-method.Rd b/man/summary-PseudoDualFlexiSimulations-method.Rd index acb49cf25..19043a45d 100644 --- a/man/summary-PseudoDualFlexiSimulations-method.Rd +++ b/man/summary-PseudoDualFlexiSimulations-method.Rd @@ -90,7 +90,7 @@ myIncrements <- IncrementsRelative( mySize <- CohortSizeConst(size = 3) ## Stop only when 10 subjects are treated: ## very low sample size is just for illustration here -myStopping <- StoppingMinPatients(nPatients = 10) +myStopping <- StoppingMinPatients(nPatients = 10) | StoppingMissingDose() ## Specified the design design <- DualResponsesSamplesDesign( diff --git a/man/summary-Simulations-method.Rd b/man/summary-Simulations-method.Rd index fd503e0fe..ca3c5caeb 100644 --- a/man/summary-Simulations-method.Rd +++ b/man/summary-Simulations-method.Rd @@ -64,7 +64,7 @@ myStopping2 <- StoppingTargetProb( prob = 0.5 ) myStopping3 <- StoppingMinPatients(nPatients = 20) -myStopping <- (myStopping1 & myStopping2) | myStopping3 +myStopping <- (myStopping1 & myStopping2) | myStopping3 | StoppingMissingDose() # Choose the rule for dose increments myIncrements <- IncrementsRelative(