R/RcppExports.R
riskDiffExactPValue.RdObtains the p-value for exact unconditional test of risk difference.
riskDiffExactPValue(
n1 = NA_integer_,
y1 = NA_integer_,
n2 = NA_integer_,
y2 = NA_integer_,
riskDiffH0 = 0,
directionUpper = TRUE
)The sample size for the active treatment group.
The number of responses for the active treatment group.
The sample size for the control group.
The number of responses for the control group.
The risk difference under the null hypothesis. Defaults to 0.
Whether larger values represent better responses.
A data frame containing the following variables:
riskDiffH0: The risk difference under the null hypothesis.
directionUpper: Whether larger values represent better
responses.
riskDiff: The observed risk difference.
zstat: The observed value of the Z test statistic.
pvalue: The one-sided p-value for the unconditional exact test.
pi2star: The value of pi2 that yields the p-value.
riskDiffExactPValue(riskDiffH0 = 0, directionUpper = 1,
n1 = 68, y1 = 2, n2 = 65, y2 = 1)
#> riskDiffH0 directionUpper riskDiff zstat pvalue pi2star
#> 1 0 TRUE 0.01402715 0.5445955 0.3543871 0.02046496