View source: R/crm_path_analysis.R
crm_path_analysis | R Documentation |
Fit a continuous reassessment method (CRM) model to the outcomes cumulatively observed at the end of each cohort in a trial pathway. E.g. if the trial pathway is 1NN 2NN 3NT, we have three cohorts of two patients. This function will fit the model to the following four states: before any patients have been evaluated; after 1NN; after 1NN 2NN; and finally after 1NN 2NN 3NT. This allows us to analyse how the trial model is evolving in its estimation as trial data is accumulated.
crm_path_analysis(outcome_str, skeleton, target, model, verbose = FALSE, ...)
outcome_str |
A string representing the outcomes observed hitherto.
See |
skeleton |
a vector of the prior guesses of toxicity at doses. This should be a monotonically-increasing vector of numbers between 0 and 1. |
target |
the target toxicity probability, a number between 0 and 1.
This value would normally be one of the values in |
model |
Character string to denote desired model. One of |
verbose |
logical, TRUE to get log messages. |
... |
Extra parameters passed to |
Different model choices require that different parameters are provided. See below.
A list
of dose_finding_path_node
objects.
empiric
modelbeta_sd
logistic
modela0
beta_mean
beta_sd
logistic_gamma
modela0
beta_shape
beta_inverse_scale
logistic2
modelalpha_mean
alpha_sd
beta_mean
beta_sd
Kristian Brock
df_parse_outcomes
,
stan_crm
,
dose_finding_path_node
## Not run:
# CRM example
target <- 0.25
skeleton <- c(0.05, 0.15, 0.25, 0.4, 0.6)
paths <- crm_path_analysis(
outcome_str = '1NNN 2NTN 2NNN',
skeleton = skeleton, target = target, model = 'empiric',
beta_sd = 1, seed = 123, refresh = 0)
length(paths) # 4
names(paths)[1] # ""
names(paths)[2] # "1NNN"
names(paths)[3] # "1NNN 2NTN"
names(paths)[4] # "1NNN 2NTN 2NNN"
# Each node is an analysis fit to the cumulative outcomes
# Converting to a tibble presents some nice tidyverse-related opportunities
library(tibble)
df <- as_tibble(paths)
df
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.