This function returns an object that can be used to fit a Neuenschwander, Branson and Gsponer (NBG) model for dose-finding using methods provided by the trialr package.

get_trialr_nbg(
  parent_selector_factory = NULL,
  real_doses,
  d_star,
  target,
  alpha_mean,
  alpha_sd,
  beta_mean,
  beta_sd,
  ...
)

Arguments

parent_selector_factory

optional object of type selector_factory that is in charge of dose selection before this class gets involved. Leave as NULL to just use this model from the start.

real_doses

Doses under investigation, a non-decreasing vector of numbers.

d_star

Numeric, reference dose for calculating the covariate log(dose / d_star) when fitting the model. Sometimes (but not always) taken to be the max dose in real_doses.

target

We seek a dose with this probability of toxicity.

alpha_mean

Prior mean of intercept variable for normal prior. See Details. Also see documentation for trialr package for further details.

alpha_sd

Prior standard deviation of intercept variable for normal prior. See Details. Also see documentation for trialr package for further details.

beta_mean

Prior mean of gradient variable for normal prior. See Details. Also see documentation for trialr package for further details.

beta_sd

Prior standard deviation of slope variable for normal prior. See Details. Also see documentation for trialr package for further details.

...

Extra args are passed to stan_nbg.

Value

an object of type selector_factory that can fit the NBG model to outcomes.

Details

The model form implemented in trialr is:

\(F(x_{i}, \alpha, \beta) = 1 / (1 + \exp{-(\alpha + \exp{(\beta)} log(x_i / d_*))}) \)

with normal priors on alpha and beta.

Dose selectors are designed to be daisy-chained together to achieve different behaviours. This class is a **resumptive** selector, meaning it carries on when the previous dose selector, where present, has elected not to continue. For example, this allows instances of this class to be preceded by a selector that follows a fixed path in an initial escalation plan, such as that provided by follow_path. In this example, when the observed trial outcomes deviate from that initial plan, the selector following the fixed path elects not to continue and responsibility passes to this class. See examples under get_dfcrm.

References

Neuenschwander, B., Branson, M., & Gsponer, T. (2008). Critical aspects of the Bayesian approach to phase I cancer trials. Statistics in Medicine, 27, 2420–2439. https://doi.org/10.1002/sim.3230

Brock, K. (2020). trialr: Clinical Trial Designs in 'rstan'. R package version 0.1.5. https://github.com/brockk/trialr

Brock, K. (2019). trialr: Bayesian Clinical Trial Designs in R and Stan. arXiv preprint arXiv:1907.00161.

Examples

real_doses <- c(5, 10, 25, 40, 60) d_star <- 60 target <- 0.25 model <- get_trialr_nbg(real_doses = real_doses, d_star = d_star, target = target, alpha_mean = 2, alpha_sd = 1, beta_mean = 0.5, beta_sd = 1) # Refer to the trialr documentation for more details on model & priors. outcomes <- '1NNN 2NTN' fit <- model %>% fit(outcomes) fit %>% recommended_dose()
#> [1] 2
fit %>% mean_prob_tox()
#> [1] 0.1218123 0.2504148 0.5658892 0.7301690 0.8297591