Infer the prior beliefs consistent with the parameters and model
form for a CRM dose-finding trial. This function could be interpreted as
fitting the model to no data, thus examining the beliefs on dose-toxicity
that are suggested by the parameter priors alone. This function provides the
task analagous to stan_crm
before any data has been collected.
crm_prior_beliefs( skeleton, target, model = c("empiric", "logistic", "logistic_gamma", "logistic2"), a0 = NULL, alpha_mean = NULL, alpha_sd = NULL, beta_mean = NULL, beta_sd = NULL, beta_shape = NULL, beta_inverse_scale = NULL, ... )
skeleton | a vector of the prior guesses of toxicity at doses. This should be a monotonically-increasing vector of numbers between 0 and 1. |
---|---|
target | the target toxicity probability, a number between 0 and 1.
This value would normally be one of the values in |
model | Character string to denote desired model. One of |
a0 | Value of fixed intercept parameter. Only required for certain models. See Details. |
alpha_mean | Prior mean of intercept variable for normal prior. Only required for certain models. See Details. |
alpha_sd | Prior standard deviation of intercept variable for normal prior. Only required for certain models. See Details. |
beta_mean | Prior mean of gradient variable for normal prior. Only required for certain models. See Details. |
beta_sd | Prior standard deviation of slope variable for normal prior. Only required for certain models. See Details. |
beta_shape | Prior shape parameter of slope variable for gamma prior. Only required for certain models. See Details. |
beta_inverse_scale | Prior inverse scale parameter of slope variable for gamma prior. Only required for certain models. See Details. |
... | extra parameters passed to |
An object of class crm_fit
Different model choices require that different parameters are provided. See below.
empiric
modelbeta_sd
logistic
modela0
beta_mean
beta_sd
logistic_gamma
modela0
beta_shape
beta_inverse_scale
logistic2
modelalpha_mean
alpha_sd
beta_mean
beta_sd
O'Quigley, J., Pepe, M., & Fisher, L. (1990). Continual reassessment method: a practical design for phase 1 clinical trials in cancer. Biometrics, 46(1), 33-48. https://www.jstor.org/stable/2531628
Cheung, Y.K. (2011). Dose Finding by the Continual Reassessment Method. CRC Press. ISBN 9781420091519
skeleton <- c(0.05, 0.1, 0.15, 0.33, 0.5) target <- 0.33 prior_fit1 <- crm_prior_beliefs(skeleton, target, model = 'empiric', beta_sd = sqrt(1.34))#> #> SAMPLING FOR MODEL 'CrmEmpiricNormalPrior' NOW (CHAIN 1). #> Chain 1: #> Chain 1: Gradient evaluation took 4.7e-05 seconds #> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 0.47 seconds. #> Chain 1: Adjust your expectations accordingly! #> Chain 1: #> Chain 1: #> Chain 1: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 1: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 1: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 1: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 1: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 1: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 1: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 1: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 1: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 1: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 1: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 1: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 1: #> Chain 1: Elapsed Time: 0.014754 seconds (Warm-up) #> Chain 1: 0.014227 seconds (Sampling) #> Chain 1: 0.028981 seconds (Total) #> Chain 1: #> #> SAMPLING FOR MODEL 'CrmEmpiricNormalPrior' NOW (CHAIN 2). #> Chain 2: #> Chain 2: Gradient evaluation took 5e-06 seconds #> Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 0.05 seconds. #> Chain 2: Adjust your expectations accordingly! #> Chain 2: #> Chain 2: #> Chain 2: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 2: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 2: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 2: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 2: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 2: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 2: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 2: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 2: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 2: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 2: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 2: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 2: #> Chain 2: Elapsed Time: 0.016529 seconds (Warm-up) #> Chain 2: 0.01388 seconds (Sampling) #> Chain 2: 0.030409 seconds (Total) #> Chain 2: #> #> SAMPLING FOR MODEL 'CrmEmpiricNormalPrior' NOW (CHAIN 3). #> Chain 3: #> Chain 3: Gradient evaluation took 7e-06 seconds #> Chain 3: 1000 transitions using 10 leapfrog steps per transition would take 0.07 seconds. #> Chain 3: Adjust your expectations accordingly! #> Chain 3: #> Chain 3: #> Chain 3: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 3: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 3: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 3: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 3: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 3: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 3: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 3: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 3: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 3: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 3: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 3: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 3: #> Chain 3: Elapsed Time: 0.015157 seconds (Warm-up) #> Chain 3: 0.013391 seconds (Sampling) #> Chain 3: 0.028548 seconds (Total) #> Chain 3: #> #> SAMPLING FOR MODEL 'CrmEmpiricNormalPrior' NOW (CHAIN 4). #> Chain 4: #> Chain 4: Gradient evaluation took 6e-06 seconds #> Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 0.06 seconds. #> Chain 4: Adjust your expectations accordingly! #> Chain 4: #> Chain 4: #> Chain 4: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 4: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 4: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 4: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 4: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 4: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 4: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 4: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 4: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 4: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 4: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 4: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 4: #> Chain 4: Elapsed Time: 0.0154 seconds (Warm-up) #> Chain 4: 0.016564 seconds (Sampling) #> Chain 4: 0.031964 seconds (Total) #> Chain 4:prior_fit2 <- crm_prior_beliefs(skeleton, target, model = 'logistic_gamma', a0 = 3, beta_shape = 1, beta_inverse_scale = 2)#> #> SAMPLING FOR MODEL 'CrmOneParamLogisticGammaPrior' NOW (CHAIN 1). #> Chain 1: #> Chain 1: Gradient evaluation took 1.5e-05 seconds #> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 0.15 seconds. #> Chain 1: Adjust your expectations accordingly! #> Chain 1: #> Chain 1: #> Chain 1: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 1: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 1: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 1: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 1: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 1: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 1: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 1: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 1: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 1: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 1: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 1: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 1: #> Chain 1: Elapsed Time: 0.029193 seconds (Warm-up) #> Chain 1: 0.06384 seconds (Sampling) #> Chain 1: 0.093033 seconds (Total) #> Chain 1: #> #> SAMPLING FOR MODEL 'CrmOneParamLogisticGammaPrior' NOW (CHAIN 2). #> Chain 2: Rejecting initial value: #> Chain 2: Log probability evaluates to log(0), i.e. negative infinity. #> Chain 2: Stan can't start sampling from this initial value. #> Chain 2: Rejecting initial value: #> Chain 2: Log probability evaluates to log(0), i.e. negative infinity. #> Chain 2: Stan can't start sampling from this initial value. #> Chain 2: Rejecting initial value: #> Chain 2: Log probability evaluates to log(0), i.e. negative infinity. #> Chain 2: Stan can't start sampling from this initial value. #> Chain 2: Rejecting initial value: #> Chain 2: Log probability evaluates to log(0), i.e. negative infinity. #> Chain 2: Stan can't start sampling from this initial value. #> Chain 2: Rejecting initial value: #> Chain 2: Log probability evaluates to log(0), i.e. negative infinity. #> Chain 2: Stan can't start sampling from this initial value. #> Chain 2: #> Chain 2: Gradient evaluation took 7e-06 seconds #> Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 0.07 seconds. #> Chain 2: Adjust your expectations accordingly! #> Chain 2: #> Chain 2: #> Chain 2: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 2: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 2: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 2: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 2: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 2: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 2: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 2: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 2: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 2: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 2: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 2: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 2: #> Chain 2: Elapsed Time: 0.055292 seconds (Warm-up) #> Chain 2: 0.04421 seconds (Sampling) #> Chain 2: 0.099502 seconds (Total) #> Chain 2: #> #> SAMPLING FOR MODEL 'CrmOneParamLogisticGammaPrior' NOW (CHAIN 3). #> Chain 3: Rejecting initial value: #> Chain 3: Log probability evaluates to log(0), i.e. negative infinity. #> Chain 3: Stan can't start sampling from this initial value. #> Chain 3: Rejecting initial value: #> Chain 3: Log probability evaluates to log(0), i.e. negative infinity. #> Chain 3: Stan can't start sampling from this initial value. #> Chain 3: #> Chain 3: Gradient evaluation took 1.6e-05 seconds #> Chain 3: 1000 transitions using 10 leapfrog steps per transition would take 0.16 seconds. #> Chain 3: Adjust your expectations accordingly! #> Chain 3: #> Chain 3: #> Chain 3: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 3: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 3: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 3: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 3: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 3: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 3: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 3: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 3: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 3: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 3: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 3: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 3: #> Chain 3: Elapsed Time: 0.049131 seconds (Warm-up) #> Chain 3: 0.059071 seconds (Sampling) #> Chain 3: 0.108202 seconds (Total) #> Chain 3: #> #> SAMPLING FOR MODEL 'CrmOneParamLogisticGammaPrior' NOW (CHAIN 4). #> Chain 4: #> Chain 4: Gradient evaluation took 1e-05 seconds #> Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 0.1 seconds. #> Chain 4: Adjust your expectations accordingly! #> Chain 4: #> Chain 4: #> Chain 4: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 4: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 4: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 4: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 4: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 4: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 4: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 4: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 4: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 4: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 4: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 4: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 4: #> Chain 4: Elapsed Time: 0.038154 seconds (Warm-up) #> Chain 4: 0.01572 seconds (Sampling) #> Chain 4: 0.053874 seconds (Total) #> Chain 4:#> Warning: There were 2011 divergent transitions after warmup. See #> http://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup #> to find out why this is a problem and how to eliminate them.#> Warning: Examine the pairs() plot to diagnose sampling problems#> Warning: Bulk Effective Samples Size (ESS) is too low, indicating posterior means and medians may be unreliable. #> Running the chains for more iterations may help. See #> http://mc-stan.org/misc/warnings.html#bulk-ess