dose_esc: Plot dose escalation

View source: R/plot2.R

dose_escR Documentation

Plot dose escalation

Description

Plot results of a dose-escalation study.

Usage

dose_esc(
  dose,
  col.dose,
  nstep = 3L,
  dose.exp,
  col.exp,
  xlab = "Time",
  ylab = "Dose",
  xlim = NULL,
  ylim = NULL,
  squish = length(dose)%/%3L
)

Arguments

dose, col.dose

vector of dose levels for each observation; colors should correspond to DLT or similar

nstep

number entered at each step, recycled as necessary; for 3+3 or 4+2 studies for example, the value should be 3 or c(4,2), respectively

dose.exp, col.exp

optional vectors for expansion cohort

xlab, ylab

x- and y-axis label for each dose level

xlim, ylim

x- and y-axis limits

squish

numeric value describing a squishing factor; larger values result in plot being compressed

Examples

## 3 + 3
d33 <- c(1,1,1,2,2,2,3,3,3,3,3,3,4,4,4)
c33 <- c(3,3,3,3,3,3,3,3,2,3,3,3,3,2,2)
dose_esc(d33, c33)
legend(0, 4, col = 2:3, pch = 16, pt.cex = 4, xpd = NA, bty = 'n',
       legend = paste(c('','Non-'), 'DLT'), y.intersp = 1.5)

## 3 + 3 with expansion
dose_esc(d33, c33, dose.exp = rep(4, 10), col.exp = rep(3, 10))
dose_esc(d33, c33, dose.exp = rep(3, 4), col.exp = rep(3, 4))

## 4 + 4
dose_esc(c(1,1,1,1, 2,2,2,2, 2,2,2,2, 3,3,3), nstep = 4,
         col.dose = c(3,3,3,3, 3,3,2,3, 3,3,3,3, 3,2,2),
         ylab = parse(text = paste0(1:2, '~mg^2')))

## 4 + 2
dose_esc(c(1,1,1,1,1,1, 2,2,2,2,2), nstep = c(4,2),
         col.dose = c(3,3,3,2,3,3, 2,3,3,3,2))
         

raredd/plotr documentation built on Nov. 19, 2023, 4:09 a.m.