% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utility.R
\name{plot.dec.sim}
\alias{plot.dec.sim}
\title{Plot simulation results from a "dec.sim" object}
\usage{
\method{plot}{dec.sim}(
  x,
  pt,
  s = 1,
  type = c("all", "s", "prob", "np", "dlt"),
  label = TRUE,
  col = "cornflowerblue",
  text.col = "darkblue",
  cex = 1,
  ...
)
}
\arguments{
\item{x}{An object of class \code{"dec.sim"} or \code{"sl.sim"}, returned
by \code{\link{dec.sim}} or \code{\link{sl.sim}}.}

\item{pt}{A vector of target toxicity values, one for each scenario.}

\item{s}{The scenario to plot. Defaults to 1.}

\item{type}{Plot type. See the description above.}

\item{label}{Logical; if \code{TRUE}, values are displayed on the plot.}

\item{col}{Graphical parameter \code{col}; see \code{\link{par}}.}

\item{text.col}{Color used for text labels.}

\item{cex}{Graphical parameter \code{cex}; see \code{\link{par}}.}

\item{...}{Arguments passed to plotting functions.}
}
\description{
Available plot types are: true toxicity at each dose level
  (\code{type = "s"}); a bar plot of the probability of selecting each dose
  as the MTD (\code{type = "prob"}); a bar plot of the average number of
  patients treated at each dose level (\code{type = "np"}); and a bar plot
  of the average number of DLTs at each dose level (\code{type = "dlt"}).
  Setting \code{type = "all"} produces all four plots.
}
\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")
}
