Fit Neuenschwander, Branson & Gsponer logit model for dose-finding using Stan for full Bayesian inference.
stan_nbg( outcome_str = NULL, real_doses, d_star, target, alpha_mean = NULL, alpha_sd = NULL, beta_mean = NULL, beta_sd = NULL, doses_given = NULL, tox = NULL, weights = NULL, ... )
outcome_str | A string representing the outcomes observed hitherto.
See |
---|---|
real_doses | A vector of numbers, the doses under investigation. They should be ordered from lowest to highest and be in consistent units. E.g. to conduct a dose-finding trial of doses 10mg, 20mg and 50mg, use c(10, 20, 50). |
d_star | d_star, numeric reference dose-level. The linear covariate
in this logit model is |
target | the target toxicity probability, a number between 0 and 1. |
alpha_mean | Prior mean of intercept variable for normal prior. See Details. |
alpha_sd | Prior standard deviation of intercept variable for normal prior. See Details. |
beta_mean | Prior mean of gradient variable for normal prior. See Details. |
beta_sd | Prior standard deviation of slope variable for normal prior. 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
|
tox | An optional vector of toxicity outcomes for patients
1:num_patients, where 1=toxicity and 0=no toxicity. Only required when
|
weights | An optional vector of numeric weights for the observations
for patients 1:num_patients, thus facilitating a time-to-event (TITE) design.
Can be used with |
... | Extra parameters are passed to |
An object of class nbg_fit
, which inherits behaviour from
crm_fit
.
The quickest and easiest way to fit this 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.
The two-parameter model form is:
\(F(x_{i}, \alpha, \beta) = 1 / (1 + \exp{-(\alpha + \exp{(\beta)} log(x_i / d_star))}) \)
and the required parameters are:
alpha_mean
alpha_sd
beta_mean
beta_sd
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
if (FALSE) { # Non-TITE example: fit1 <- stan_nbg('1NNN 2NNN 3TTT', real_doses = c(10, 20, 50, 100, 200), d_star = 200, target = 0.25, alpha_mean = -1, alpha_sd = 2, beta_mean = 0, beta_sd = 1, seed = 123) fit1$recommended_dose # 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 fit2 <-stan_nbg(real_doses = c(10, 20, 50, 100, 200), d_star = 200, target = 0.25, doses_given = c(3, 3, 3, 3), tox = c(0, 0, 0, 0), weights = c(73, 66, 35, 28) / 126, alpha_mean = -1, alpha_sd = 2, beta_mean = 0, beta_sd = 1, seed = 123) fit2$recommended_dose }