% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dec.table.R
\name{dec.table}
\alias{dec.table}
\title{Generate a dose-finding decision table}
\usage{
dec.table(alpha.l, alpha.r, alpha.u, pt, n, sf.param = 4, pe.par = 0.25, ...)
}
\arguments{
\item{alpha.l}{Left-side overall type I error. This controls the upper bound
for dose escalation.}

\item{alpha.r}{Right-side overall type I error. This controls the lower bound
for dose de-escalation.}

\item{alpha.u}{Right-side overall type I error used to determine the lower
bound for \code{"DU"}.}

\item{pt}{A numeric vector of target toxicities. It should have length 1, or
length 2 when the target is an interval.}

\item{n}{A vector of sample sizes at each stage. \code{sum(n)} is the total
sample size. For A+B designs, \code{n} has length 2; for A+B+C designs,
\code{n} has length 3.}

\item{sf.param}{A single real value specifying the gamma parameter for the
Hwang-Shih-DeCani spending function. The allowable range is [-40, 40].
Larger values spend more error early and leave less for later stages.
Defaults to 4.}

\item{pe.par}{Alternative hypothesis offset used to calculate power and the
type II error. The alternative is defined as \code{pe = pt + pe.par}.
Defaults to 0.25.}

\item{...}{Unused arguments.}
}
\value{
An object of class \code{"dec.table"}, returned as a list
  containing:
  \item{table}{The generated decision table.}
  \item{alpha.two}{A vector of true type I errors for the two-sided test.}
  \item{alpha.one}{A vector of true type I errors for the right-sided test.}
  \item{beta}{The true type II error, which depends on the alternative
  hypothesis.}
  \item{E}{A vector of \code{"E"} boundaries.}
  \item{D}{A vector of \code{"D"} boundaries.}
  \item{DU}{A vector of \code{"DU"} boundaries.}
  \item{pt}{The input target toxicity vector.}
  \item{n}{The input stage-wise sample sizes.}
  \item{sf.param}{The input alpha-spending parameter.}
}
\description{
Generate a two- or three-stage dose-finding decision table.
}
\details{
An alpha-spending method is available for two- and three-stage
  designs. \code{dec.table} uses the Hwang-Shih-DeCani spending function.
}
\examples{
alpha.l <- 0.6
alpha.r <- 0.4
alpha.u <- 0.1
pt <- 0.3
# Print the decision table for a 3+3+3 design
n <- rep(3, 3)
dec.table(alpha.l, alpha.r, alpha.u, pt, n)$table
# 3+3 design
n <- rep(3, 2)
dec.table(alpha.l, alpha.r, alpha.u, pt, n)$table
}
\author{
Wenchuan Guo <wguo1017@gmail.com>
}
