% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{powerRiskRatioExact}
\alias{powerRiskRatioExact}
\title{Power for Exact Unconditional Test of Risk Ratio}
\usage{
powerRiskRatioExact(
  n = NA_integer_,
  riskRatioH0 = 1,
  pi1 = NA_real_,
  pi2 = NA_real_,
  allocationRatioPlanned = 1,
  alpha = 0.025,
  calculateAttainedAlpha = TRUE
)
}
\arguments{
\item{n}{The total sample size.}

\item{riskRatioH0}{The risk ratio under the null hypothesis.
Defaults to 1.}

\item{pi1}{The assumed probability for the active treatment group.}

\item{pi2}{The assumed probability for the control group.}

\item{allocationRatioPlanned}{Allocation ratio for the active treatment
versus control. Defaults to 1 for equal randomization.}

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

\item{calculateAttainedAlpha}{Whether to calculate the attained alpha.}
}
\value{
A data frame with the following variables:
\itemize{
\item \code{alpha}: The specified one-sided significance level.
\item \code{attainedAlpha}: The attained one-sided significance level if
requested.
\item \code{power}: The power.
\item \code{n}: The sample size.
\item \code{riskRatioH0}: The risk ratio under the null hypothesis.
\item \code{pi1}: The assumed probability for the active treatment group.
\item \code{pi2}: The assumed probability for the control group.
\item \code{allocationRatioPlanned}: Allocation ratio for the active
treatment versus control.
\item \code{zstatRiskRatioBound}: The critical value on the scale of
score test statistic for risk ratio.
\item \code{pi2star}: The response probability in the control group
at which the critical value of the test statistic is attained.
}
}
\description{
Obtains the power given sample size for exact unconditional
test of risk ratio.
}
\examples{

powerRiskRatioExact(n = 68, pi1 = 0.6, pi2 = 0.25, alpha = 0.05)

}
\author{
Kaifeng Lu, \email{kaifenglu@gmail.com}
}
\keyword{internal}
