| sl.sim | R Documentation |
Run dose-finding simulations based on a customized decision table for one or more scenarios read from a file.
sl.sim(decTable, file, header = TRUE, sep = ",", ...)
decTable |
A customized decision table in the same format as the output
of |
file |
The name of the file containing the scenario definitions. See
|
header |
Logical; if |
sep |
The field separator character. Defaults to |
... |
Additional arguments passed to |
In each row of the input file, the parameters must be ordered as
start.level, nsim, and truep. The
dose-finding algorithm is described in dec.sim.
An object of class "dec.sim" (for one scenario) or
"sl.sim" (for multiple scenarios). Use summary to
obtain and print a summary of the results. The returned object is a list
containing:
mtd |
A vector of dose levels giving the recommended maximum tolerated dose (MTD) at the end of each trial. |
n.patients |
The average number of patients treated at each dose level. |
truep |
The input true toxicity probabilities. |
start.level |
The input starting dose level. |
nsim |
The input number of simulated trials. |
Wenchuan Guo <wguo1017@gmail.com>
dt <- dec.table(0.6,0.4,0.2,0.3,c(3,3,3))
test.file <- system.file("extdata", "testS.csv", package = "tsdf")
# use a customized decision table
table.file <- system.file("extdata", "decTable.csv", package = "tsdf")
dec <- read.csv(table.file, row.names = 1, check.names = FALSE)
out1 <- sl.sim(as.matrix(dt$table), test.file)
out2 <- sl.sim(dec, test.file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.