% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{getCI_mams}
\alias{getCI_mams}
\title{Confidence Interval After Trial Termination for Multi-Arm
Multi-Stage Design}
\usage{
getCI_mams(
  M = NA_integer_,
  r = 1,
  corr_known = TRUE,
  L = NA_integer_,
  zL = NA_real_,
  IMax = NA_real_,
  informationRates = NA_real_,
  efficacyStopping = NA_integer_,
  criticalValues = NULL,
  alpha = 0.025,
  typeAlphaSpending = "sfOF",
  parameterAlphaSpending = NA_real_,
  spendingTime = NA_real_
)
}
\arguments{
\item{M}{Number of active treatment arms.}

\item{r}{Randomization ratio of each active arm to the common control.}

\item{corr_known}{Logical. If \code{TRUE}, the correlation between Wald
statistics is derived from the randomization ratio \eqn{r}
as \eqn{r / (r + 1)}. If \code{FALSE}, a conservative correlation of
0 is used.}

\item{L}{The termination look.}

\item{zL}{The vector of z-test statistics at the termination look.}

\item{IMax}{Maximum information for any active arm versus the common
control.}

\item{informationRates}{The information rates up to look \code{L}.}

\item{efficacyStopping}{Indicators of whether efficacy stopping is
allowed at each stage up to look \code{L}.
Defaults to \code{TRUE} if left unspecified.}

\item{criticalValues}{The matrix of by-level upper boundaries on the
max z-test statistic scale for efficacy stopping up to look \code{L}.
The first column is for level \code{M}, the second column is for
level \code{M - 1}, and so on, with the last column for level 1.
If left unspecified, the critical values will be computed based
on the specified alpha spending function.}

\item{alpha}{The significance level. Defaults to 0.025.}

\item{typeAlphaSpending}{The type of alpha spending for the trial.
One of the following:
\code{"OF"} for O'Brien-Fleming boundaries,
\code{"P"} for Pocock boundaries,
\code{"WT"} for Wang & Tsiatis boundaries,
\code{"sfOF"} for O'Brien-Fleming type spending function,
\code{"sfP"} for Pocock type spending function,
\code{"sfKD"} for Kim & DeMets spending function,
\code{"sfHSD"} for Hwang, Shi & DeCani spending function, and
\code{"none"} for no early efficacy stopping.
Defaults to \code{"sfOF"}.}

\item{parameterAlphaSpending}{The parameter value for the alpha spending.
Corresponds to \eqn{\Delta} for \code{"WT"}, \eqn{\rho} for \code{"sfKD"},
and \eqn{\gamma} for \code{"sfHSD"}.}

\item{spendingTime}{The error spending time up to look \code{L}.
Defaults to missing, in which case, it is the same as
\code{informationRates}.}
}
\value{
A data frame with the following components:
\itemize{
\item \code{level}: Number of individual hypotheses considered for multiplicity.
\item \code{index}: The treatment arm with max Z among the active arms.
\item \code{pvalue}: p-value for rejecting the null hypothesis.
\item \code{thetahat}: Point estimate of the parameter.
\item \code{cilevel}: Confidence interval level.
\item \code{lower}: Lower bound of confidence interval.
\item \code{upper}: Upper bound of confidence interval.
}
}
\description{
Obtains the p-value, conservative point estimate, and
confidence interval after the end of a multi-arm multi-stage trial.
}
\details{
If \code{typeAlphaSpending} is \code{"OF"}, \code{"P"}, \code{"WT"}, or
\code{"none"}, then \code{informationRates}, \code{efficacyStopping},
and \code{spendingTime} must be of full length \code{kMax}, and
\code{informationRates} and \code{spendingTime} must end with 1.
}
\examples{
getCI_mams(
  L = 2, zL = c(2.075, 2.264),
  M = 2, r = 1, corr_known = FALSE,
  IMax = 300 / 4, informationRates = c(1/2, 1),
  alpha = 0.025, typeAlphaSpending = "sfOF")

}
\references{
Ping Gao, Yingqiu Li.
Adaptive multiple comparison sequential design (AMCSD) for clinical trials.
Journal of Biopharmaceutical Statistics, 2024, 34(3), 424-440.
}
\author{
Kaifeng Lu, \email{kaifenglu@gmail.com}
}
