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

View source: R/sl.sim.R

sl.simR Documentation

Dose-finding simulations for a list of scenarios

Description

Run dose-finding simulations based on a customized decision table for one or more scenarios read from a file.

Usage

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

Arguments

decTable

A customized decision table in the same format as the output of dec.table.

file

The name of the file containing the scenario definitions. See read.table for details.

header

Logical; if TRUE, the file contains variable names in the first line. See read.table for details.

sep

The field separator character. Defaults to ",". See read.table for details.

...

Additional arguments passed to read.table.

Details

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.

Value

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.

Author(s)

Wenchuan Guo <wguo1017@gmail.com>

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.csv(table.file, row.names = 1, check.names = FALSE)
out1 <- sl.sim(as.matrix(dt$table), test.file)
out2 <- sl.sim(dec, test.file)

tsdf documentation built on April 26, 2026, 1:06 a.m.