View source: R/newsafe2x2Test.R
| computePowerSavi2x2 | R Documentation |
Runs sampleStoppingTimesSavi2x2() with nMax = nBlocks and reports,
per curve, the fraction of paths that cross 1 / alpha within
nBlocks; the worst case is the smallest, since the test must meet its
target whatever the baseline is.
computePowerSavi2x2(
propDiffMin,
na,
nb,
nBlocks,
alpha = 0.05,
alternative = c("twoSided", "less", "greater"),
nSim = 1000L,
nBoot = nSim,
seed = NULL,
wantSamplePaths = FALSE,
pb = TRUE
)
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. |
nBlocks |
integer > 0, the planned number of data blocks. |
alpha |
numeric in (0, 1) that specifies the tolerable type I error and the null rejection rule e >= 1/alpha. |
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. |
nSim |
integer > 0, the number of simulations needed to compute power or the number of samples paths for the savi 2x2 test under continuous monitoring. |
nBoot |
integer > 0 representing the number of bootstrap samples to assess the accuracy of the approximations of the power, or the number of blocks for the savi 2x2 test under continuous monitoring. |
seed |
integer, seed number. Default seed=NULL yields seed=2026. |
wantSamplePaths |
logical, if |
pb |
logical, if |
a list which contains at least power (the worst case over the
curves) and an adapted bootObject bootObjPower of class
boot::boot() on that baseline; further powerVec (one per curve),
worstCaseThetaA, worstCaseThetaB, nBlocks, and the sampler's
thetaA, thetaB, stoppingTimes, breakVector, eValuesStopped,
samplePaths, n1Vector.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.