Learn R Programming

trialr (version 0.0.7)

crm_process: Process RStan samples from a CRM model

Description

Process RStan samples from a CRM model to make inferences about dose-toxicity and which dose should be recommended next. Typically, this function is not required to be called explicitly by the user because stan_crm will call it implicitly.

Usage

crm_process(dat, fit)

Arguments

dat

An instance of crm_params, a list of CRM parameters.

fit

An instance of rstan::stanmodel, derived by fitting one of the trialr CRM models.

Value

An instance of crm_fit.

See Also

stan_crm crm_params

Examples

Run this code
# NOT RUN {
dat <- list(
  num_doses = 5,
  skeleton = c(0.05, 0.12, 0.25, 0.40, 0.55),
  target = 0.25,
  beta_sd = sqrt(1.34),
  num_patients = 3,
  doses = c(1, 2, 3),
  tox = c(0, 0, 1)
)
samp <- rstan::sampling(stanmodels$CrmEmpiricNormalPrior,
                        data = dat, seed = 123)
decision <- crm_process(dat, samp)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab