Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

format.safetytab

Format a phase 1 trial safety tabulation to show significant digits only


Description

The essential insight of package precautionary is distilled into the safety tabulation which it generates from trial simulations, reporting the expected number of patients who will experience each grade of toxicity. To render this table for easy interpretation, these expectations are simply displayed with a number of significant digits appropriate to their Monte Carlo standard errors (MCSEs).

Usage

## S3 method for class 'safetytab'
format(x, ...)

Arguments

x

A safety tabulation as found in the safety component of the list returned by summary.precautionary.

...

Unused; included for compatibility with generic signature

Note

The MCSEs of safety tabulations remain available for inspection (see example), but are omitted from standard displays because they may lend themselves to misinterpretation as confidence bounds on the number of patients who will experience each toxicity grade in any given trial.

Examples

mtdi_gen <- hyper_mtdi_lognormal(CV = 1
                                ,median_mtd = 5
                                ,median_sdlog = 0.5
                                ,units="mg/kg")
ordinalizer <- function(MTDi, r0 = 1.5)
  MTDi * r0 ^ c(Gr1=-2, Gr2=-1, Gr3=0, Gr4=1, Gr5=2)
old <- options(dose_levels = c(0.5, 1, 2, 4, 6)
              ,ordinalizer = ordinalizer)
get_boin(num_doses = 5, target = 0.25) %>%
  stop_at_n(n = 24) %>%
  simulate_trials(
    num_sims = 60
  , true_prob_tox = mtdi_gen) -> boin_hsims
safety <- summary(boin_hsims)$safety
safety # The print method invokes 'format.safetytab' ..
# .. but we can also inspect the underlying matrix by indexing:
safety[,]  # indexing strips 'safetytab' class, returning plain matrix
# Note that, by extend()ing the simulation we can increase precision:
if (interactive()) { # may run a bit too long for CRAN servers' taste
  boin_hsims %>% extend(target_mcse = 0.1) -> boin_hsimsX 
  summary(boin_hsimsX)$safety
}
options(old)

precautionary

Safety Diagnostics for Dose-Escalation Trial Designs

v0.2-1
MIT + file LICENSE
Authors
David C. Norris [aut, cre, cph] (<https://orcid.org/0000-0001-9593-6343>), Markus Triska [ctb]
Initial release
2021-01-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.