plot.dec.sim {tsdf}R Documentation

plot simulation results from a dec.sim object

Description

Three plots are currently available: a plot of true toxicity at each dose level (type = "s"); a bar plot of the probability of selecting as the MTD for each dose level (type = "prob"); a bar plot of the average number of patients treated at each dose level (type = "np"); a bar plot of the average number of patients experienced DLT at each dose level (type = "dlt") and type = "all" generates all above plots.

Usage

## S3 method for class 'dec.sim'
plot(
  x,
  pt,
  s = 1,
  type = c("all", "s", "prob", "np", "dlt"),
  label = TRUE,
  col = "cornflowerblue",
  text.col = "darkblue",
  cex = 1,
  ...
)

Arguments

x

an object of class "dec.sim" or "sl.sim", a result of a call to dec.sim or sl.sim.

pt

a vector with target toxicity for each scenario.

s

scenario to be plotted. Defaults to 1.

type

plot type. See descriptions above.

label

a logical value indicating if values are shown on plot.

col

graphical parameter col; see details par.

text.col

plotting color of text shown.

cex

graphical parameter col; see details par.

...

arguments to be passed to plot methods.

Examples

# generate decision table
dt <- dec.table(0.6,0.4,0.2,0.3,c(3,3,3))
# simulate trials from test data 
test.file <- system.file("extdata", "testS.csv", package = "tsdf")
out <- sl.sim(dt$table, test.file)
plot(out, pt=rep(0.3,2), s=1, type="all")
plot(out, pt=rep(0.3,2), s=2, type="prob")
plot(out, pt=rep(0.3,2), s=1, type="np")
plot(out, pt=rep(0.3,2), s=2, type="dlt")

[Package tsdf version 1.1-8 Index]