stan_crm: Fit a CRM model

Description Usage Arguments Details Value The empiric model The logistic model The logistic_gamma model The logistic2 model Author(s) References See Also Examples

View source: R/stan_crm.R

Description

Fit a continual reassessment method (CRM) model for dose-finding using Stan for full Bayesian inference. There are several likelihood and prior combinations supported. See model-specific sections below.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
stan_crm(
  outcome_str = NULL,
  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,
  doses_given = NULL,
  tox = NULL,
  weights = NULL,
  ...
)

Arguments

outcome_str

A string representing the outcomes observed hitherto. See df_parse_outcomes for a description of syntax and examples. Alternatively, you may provide doses_given and tox parameters. See Details.

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 skeleton, but that is not a requirement.

model

Character string to denote desired model. One of empiric, logistic, logistic_gamma, or logistic2. The choice of model determines which parameters are required. See Details.

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.

doses_given

A optional vector of dose-levels given to patients 1:num_patients, where 1=lowest dose, 2=second dose, etc. Only required when outcome_str is not provided.

tox

An optional vector of toxicity outcomes for patients 1:num_patients, where 1=toxicity and 0=no toxicity. Only required when outcome_str is not provided.

weights

An optional vector of numeric weights for the observations for patients 1:num_patients, thus facilitating the TITE-CRM design. Can be used with outcome_str, or with doses_given and tox. It is generally tidier to specify doses_given, tox and weights when a TITE-CRM analysis is desired.

...

Extra parameters are passed to rstan::sampling. Commonly used options are iter, chains, warmup, cores, and control.

Details

The quickest and easiest way to fit a CRM model to some observed outcomes is to describe the outcomes using trialr's syntax for dose-finding outcomes. See df_parse_outcomes for full details and examples.

Different model choices require that different parameters are provided. See sections below.

Value

An object of class crm_fit

The empiric model

The model form is:

F(x_{i}, β) = x_{i}^{\exp{β}}

and the required parameters are:

The logistic model

The model form is:

F(x_{i}, β) = 1 / (1 + \exp{(-a_{0} - \exp{(β)} x_{i}}))

and the required parameters are:

The logistic_gamma model

The model form is:

F(x_{i}, β) = 1 / (1 + \exp{(-a_{0} - \exp{(β)} x_{i}}))

and the required parameters are:

The logistic2 model

The model form is:

F(x_{i}, alpha, β) = 1 / (1 + \exp{(-α - \exp{(β)} x_i)})

and the required parameters are:

Author(s)

Kristian Brock

References

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

See Also

crm_fit sampling

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
# CRM example
fit1 <- stan_crm('1N 2N 3T', skeleton = c(0.1, 0.2, 0.35, 0.6),
                 target = 0.2, model = 'empiric', beta_sd = sqrt(1.34),
                 seed = 123)

fit2 <- stan_crm('1NNN 2NNN 3TTT', skeleton = c(0.1, 0.2, 0.35, 0.6),
                 target = 0.2, model = 'logistic', a0 = 3, beta_mean = 0,
                 beta_sd = sqrt(1.34), seed = 123)

# The seed is passed to the Stan sampler. The usual Stan sampler params like
# cores, iter, chains etc are passed on too via the ellipsis operator.

# TITE-CRM example, p.124 of Dose Finding by the CRM, Cheung (2010)
fit3 <-stan_crm(skeleton = c(0.05, 0.12, 0.25, 0.40, 0.55), target = 0.25,
                doses_given = c(3, 3, 3, 3),
                tox = c(0, 0, 0, 0),
                weights = c(73, 66, 35, 28) / 126,
                model = 'empiric', beta_sd = sqrt(1.34), seed = 123)
fit3$recommended_dose

## End(Not run)

trialr documentation built on Oct. 23, 2020, 8 p.m.