crm_path_analysis: Fit a CRM model to the incrementally observed outcomes on a...

View source: R/crm_path_analysis.R

crm_path_analysisR Documentation

Fit a CRM model to the incrementally observed outcomes on a trial pathway.

Description

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.

Usage

crm_path_analysis(outcome_str, skeleton, target, model, verbose = FALSE, ...)

Arguments

outcome_str

A string representing the outcomes observed hitherto. See df_parse_outcomes for a description of syntax and examples. Alternatively, you may provide doses_given and tox parameters. See Details.

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 skeleton, but that is not a requirement.

model

Character string to denote desired model. One of empiric, logistic, logistic_gamma, or logistic2. The choice of model determines which extra parameters are required by .... See Details.

verbose

logical, TRUE to get log messages.

...

Extra parameters passed to stan_crm.

Details

Different model choices require that different parameters are provided. See below.

Value

A list of dose_finding_path_node objects.

Parameter requirements of empiric model

  • beta_sd

Parameter requirements of logistic model

  • a0

  • beta_mean

  • beta_sd

Parameter requirements of logistic_gamma model

  • a0

  • beta_shape

  • beta_inverse_scale

Parameter requirements of logistic2 model

  • alpha_mean

  • alpha_sd

  • beta_mean

  • beta_sd

Author(s)

Kristian Brock

See Also

df_parse_outcomes, stan_crm, dose_finding_path_node

Examples

## 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)

trialr documentation built on April 1, 2023, 12:03 a.m.