% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/adj.two.R
\name{adj.two}
\alias{adj.two}
\title{Adjust Zhong's two-stage Phase II design}
\usage{
adj.two(n1, r1, s1, n2, alpha1, alpha2, beta, pc, pe, ...)
}
\arguments{
\item{n1}{Sample size at stage 1.}

\item{r1}{Inefficacy boundary at stage 1.}

\item{s1}{Efficacy boundary at stage 1. If there is no early stopping for
efficacy, \code{s1} should equal \code{n1}.}

\item{n2}{Sample size at stage 2.}

\item{alpha1}{Left-side overall type I error.}

\item{alpha2}{right-side overall type I error.}

\item{beta}{Type II error.}

\item{pc}{A numeric vector of response rates. It should have length 1 or 2.}

\item{pe}{Alternative hypothesis response rate.}

\item{...}{Unused arguments.}
}
\value{
An object of class \code{"opt.design"}, returned as a list
  containing:
  \item{bdry}{The rejection boundaries.}
  \item{error}{The true type I and type II errors.}
  \item{n}{The sample size at each stage.}
  \item{complete}{The complete list of feasible designs.}
  \item{alpha1}{The input left-side type I error.}
  \item{alpha2}{The input right-side type I error.}
  \item{beta}{The input type II error.}
  \item{pc}{The input response-rate vector.}
  \item{pe}{The input alternative response rate.}
  \item{stage}{The number of stages in the selected design.}
}
\description{
Adjust Zhong's two-stage design for over-running or
  under-running.
}
\details{
This function enumerates feasible second-stage boundaries after the
  first-stage sample size and boundaries have been fixed.
}
\examples{
 n1 <- 22
 r1 <- 6
 s1 <- 22
 n2 <- 24
 pc <- 0.4
 pe <- pc + 0.15
 alpha1 <- 0.3
 alpha2 <- 0.1
 beta <- 0.2
 out <- adj.two(n1, r1, s1, n2, alpha1, alpha2, beta, pc, pe)
}
\author{
Wenchuan Guo <wguo1017@gmail.com>, Jianan Hui <jiananhuistat@gmail.com>
}
