sl.sim: Dose-finding simulations for a list of scenarios

Description Usage Arguments Details Value Author(s) Examples

View source: R/sl.sim.R

Description

Run dose-finding simulations based on a customized decision table for a list of scenarios.

Usage

1
sl.sim(decTable, file, header = TRUE, sep = ",", ...)

Arguments

decTable

A customized decision table. (same format as output of dec.table)

file

The name of the file which the data are to be read from. See details in read.table.

header

A logical value indicating whether the file contains the names of the variables as its first line. Default is FALSE. See details in read.table.

sep

The field separator character. Default is ",". See details in read.table.

...

arguments to be passed to read.table methods.

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

1
2
3
4
5
6
7
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)

tsdf documentation built on July 1, 2020, 6:18 p.m.