R/crystallised_dose_paths.R
crystallised_dose_paths.Rd
dose_paths
reflect all possible paths a dose-finding trial may
take. When the probability of those paths is calculated using an assumed set
of true dose-event probabilities, in this package those paths are said to be
crysallised. Once crystallised, operating charactersitics can be calculated.
crystallised_dose_paths(
dose_paths,
true_prob_tox,
true_prob_eff = NULL,
terminal_nodes
)
Object of type dose_paths
vector of toxicity probabilities at doses 1..n
vector of efficacy probabilities at doses 1..n, optionally NULL if efficacy not evaluated.
tibble of terminal nodes on the dose-paths
An object of type crystallised_dose_paths
# Calculate dose paths for the first three cohorts in a 3+3 trial of 5 doses:
paths <- get_three_plus_three(num_doses = 5) %>%
get_dose_paths(cohort_sizes = c(3, 3, 3))
# Set the true probabilities of toxicity
true_prob_tox <- c(0.12, 0.27, 0.44, 0.53, 0.57)
# Crytallise the paths with the probabilities of toxicity
x <- paths %>% calculate_probabilities(true_prob_tox)
# And then examine, for example, the probabilities of recommending each dose
# at the terminal nodes of these paths:
prob_recommend(x)
#> NoDose 1 2 3 4 5
#> 0.12854451 0.33600635 0.19081343 0.29807918 0.04655654 0.00000000