efftox_parse_outcomes: Parse a string of EffTox outcomes to binary vector notation.

View source: R/efftox_parse_outcomes.R

efftox_parse_outcomesR Documentation

Parse a string of EffTox outcomes to binary vector notation.

Description

Parse a string of EffTox outcomes to the binary vector notation required by Stan for model invocation. The outcome string describes the doses given and outcomes observed. The format of the string is described in Brock et al. (2017). The letters E, T, N and B are used to represents patients that experienced (E)fficacy only, (T)oxicity only, (B)oth efficacy and toxicity, and (N)either. These letters are concatenated after numerical dose-levels to convey the outcomes of cohorts of patients. For instance, 2ETB represents a cohort of three patients that were treated at dose-level 2, and experienced efficacy, toxicity and both events, respectively. The results of cohorts are separated by spaces. Thus, 2ETB 1NN extends our previous example, where the next cohort of two were treated at dose-level 1 and both patients experienced neither efficacy nor toxicity. See examples.

We present the notation in the EffTox setting but it is applicable in general seamless phase I/II dose-finding scenarios.

Usage

efftox_parse_outcomes(outcome_string, as.list = TRUE)

Arguments

outcome_string

character string, conveying doses given and outcomes observed.

as.list

TRUE (be default) to return a list; FALSE to return a data.frame

Value

If as.list == TRUE, a list with elements eff, tox, doses and num_patients. These elements are congruent with those of the same name in efftox_params. If as.list == FALSE, a data.frame with columns eff, tox, and doses.

References

Brock, K., Billingham, L., Copland, M., Siddique, S., Sirovica, M., & Yap, C. (2017). Implementing the EffTox dose-finding design in the Matchpoint trial. BMC Medical Research Methodology, 17(1), 112. https://doi.org/10.1186/s12874-017-0381-x

Examples

x = efftox_parse_outcomes('1NNE 2EEN 3TBB')
x$num_patients == 9
x$eff == c(0, 0, 1, 1, 1, 0, 0, 1, 1)
sum(x$tox) == 3


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