sl.sim {tsdf} | R Documentation |
Dose-finding simulations for a list of scenarios
Description
Run dose-finding simulations based on a customized decision table for a list of scenarios.
Usage
sl.sim(decTable, file, header = TRUE, sep = ",", ...)
Arguments
decTable |
A customized decision table. (same format as output of |
file |
The name of the file which the data are to be read from. See details in |
header |
A logical value indicating whether the file contains the names of the variables as its first line. Default is |
sep |
The field separator character. Default is |
... |
arguments to be passed to |
Details
In each line of the input file, the parameters must be ordered in accordance as follows: pt
, start.level
, nsim
, truep
. See details in read.table
. The algorithm for dose-finding is described in dec.sim
.
Value
The function summary
is used to obtain and print a summary table of the results. An object of class "dec.sim"
(1 scenario) or "sl.sim"
(more than 1 scenarios)is a list containing:
MTD |
A vector of dose levels giving the recommended maximum tolerated dose (MTD) at the end of the trial. |
n.patients |
The average number of patients dosed at each level. |
truep |
input; true probabilities of toxicity. |
start.level |
input; starting dose level. |
nsim |
input; number of simulated trails. |
Author(s)
Wenchuan Guo <wguo007@ucr.edu>
Examples
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.table(table.file, sep=",", col.names=c(3,4,8,10), row.names = 1, check.names = FALSE)
out1 <- sl.sim(dt$table, test.file)
out2 <- sl.sim(dec, test.file)