simcrm | R Documentation |
Simulate a CRM dose-escalation study.
simcrm(probs, expansion = 0L, target = 1/6, nptmax = length(probs) * 6L, ...)
probs |
vector of true rates of DLTs |
expansion |
(optional) integer giving size of expansion cohort |
target |
target AE rate |
nptmax |
max number of patients used on study (not including the expansion cohort) |
... |
additional arguments passed to |
A list with following components:
$data |
|
$level |
mtd level (i.e., row of |
$mtd |
DLT rate of dose level selected |
$expansion |
observed rate of DLT in expansion cohort |
$cohort |
observed rate of DLT in all patients |
$enrolled |
total number of patients enrolled on study |
sim3p3
pr <- 1:5 / 10
simcrm(pr)
## run 100 crm studies
sim1 <- replicate(100L, simcrm(pr), simplify = FALSE)
op <- par(mfrow = c(1, 2), las = 1L)
out <- sapply(sim1, function(x) c(x$level, x$enrolled))
barplot(
prop.table(table(out[1, ])),
main = 'Dose selected',
xlab = 'RP2D',
ylab = 'Proportion selected'
)
boxplot(
split(out[2, ], out[1, ]),
ylim = c(0, length(pr) * 6 + 10),
main = 'N used to select dose x',
xlab = 'Dose selected\n(0 - no safe dose)',
ylab = 'Total size'
)
par(op)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.