View source: R/newsafe2x2Test.R
| solveWorstCaseTheta2x2PropDiff | R Documentation |
The pair on the curve of each alternative at which the e-process grows slowest, so a block count planned there holds for every baseline. The expected log e-increment per block is the KL divergence of the truth from its pooled null projection,
R(theta) = nLow KL(theta || theta0) + nHigh KL(theta + d || theta0), theta0 = theta + nHigh d / (nLow + nHigh),
with theta the lower proportion, nLow its group size and nHigh the
size of the group at theta + d. Its minimiser is the root of
nLow logit(theta) + nHigh logit(theta + d) = (nLow + nHigh) logit(theta0),
summed over blocks when the sizes vary per block. Equal sizes give
exactly the midpoint (1 - d) / 2; in general the root is
(1 - d) / 2 + d (nHigh - nLow) / (6 (nLow + nHigh)) + O(d^3). The rate
ignores the first-block UMP factor, which moves the simulated worst case
when one group is very small.
solveWorstCaseTheta2x2PropDiff(
propDiffMin,
na,
nb,
alternative = c("twoSided", "greater", "less")
)
propDiffMin |
numeric in (-1, 1) that defines the minimal relevant
difference in proportions |
na |
number of observations in group A per data block, one value or one per block. |
nb |
number of observations in group B per data block, one value or one per block. |
alternative |
a character string specifying the alternative hypothesis. Must be one of "twoSided" (default), "greater" or "less", where "greater" means that group A has the larger proportion. |
"greater": thetaA = thetaB + d, so thetaB is the lower proportion
and nLow = nb. "less": thetaA = thetaB - d, so thetaA is the
lower one and nLow = na. "twoSided" gives both, greater first.
A data frame with one row per curve and columns thetaA, thetaB.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.