sim_study: Simulate multiple studies and collect results

Description Usage Arguments Value

View source: R/sim_study.R

Description

Simulate multiple studies and collect results

Usage

1
2
3
sim_study(doses, truth, max_n_cohort, cohort_size, n_sims, starting_dose,
  max_cohort_size, max_n, max_p_target, add_random = FALSE,
  frac_target = 0.75, over_limit_end = NA, n_iter = 2500)

Arguments

doses

A list containing doses on the original and log scale.

truth

A vector of 'true' p(DLT)'s, corresponding to the rows of 'log_doses'.

max_n_cohort

The maximum number of cohorts.

cohort_size

The number of patients per cohort.

n_sims

The number of simulations.

max_cohort_size

Maximum size of cohort. If this is reached, and the max_n or max_p_target is reached then the trial can stop.

max_n

Maximum total sample size. If this is reached and the max_cohort_size is reached for recommended dose then the trial can stop.

max_p_target

Maximum probability of targeted toxicity. If this is reached and the max_cohort_size is reached for recommended dose then the trial can stop.

add_random

Should some randomness be added to choice of next dose? Default is FALSE.

frac_target

If randomness is added, how close to the 'best' dose is acceptable. Default is 75 percent of P(target toxicity).

over_limit_end

The safety limit to be applied at the end of the trial

n_iter

Number of iterations in MCMC.

Value

A matrix of results. 3 columns: n, n_dlt, mtd. One row per simulation.


dominicmagirr/dosecombo documentation built on May 6, 2019, 4:32 p.m.