computeConfidenceSequence2x2PropDiff: Helper function: Computes the savi confidence sequence for...

View source: R/newsafe2x2Test.R

computeConfidenceSequence2x2PropDiffR Documentation

Helper function: Computes the savi confidence sequence for propDiff

Description

Row i is the interval of computeConfidenceInterval2x2PropDiff() on blocks ⁠1..i⁠, found by advancing one e-process per grid candidate and reading off the run of candidates below 1 / alpha, each bound refined outward by a secant.

Usage

computeConfidenceSequence2x2PropDiff(
  ya,
  yb,
  na,
  nb,
  betaParameter,
  alpha,
  runningIntersection,
  nGrid = 2000L
)

Arguments

ya

positive observations/ events per data block in group A: a numeric with integer values between (and including) 0 and na, the number of observations in group A per block.

yb

positive observations/ events per data block in group B: a numeric with integer values between (and including) 0 and nb, the number of observations in group B per block.

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.

betaParameter

list(betaA1, betaA2, betaB1, betaB2), the Beta prior shapes on thetaA and thetaB for "eBeta", each a single finite positive number; NULL means 1 / (2 * na) and 1 / (2 * nb), taking block 1's sizes with a warning when they vary by block. A given prior keeps its own block 1: the test does not replace it by the UMP e-value. For "grow" on propDiff, the test puts Beta(betaA1, betaA2) on thetaA rescaled to its feasible interval on the curve, B's shapes unused, and NULL means uniform; planning ignores it.

alpha

numeric in (0, 1), one minus the confidence level.

runningIntersection

logical, if TRUE then intersect each row of the blockwise confidence sequence with the previous one; NULL keeps the constructor's FALSE.

nGrid

integer > 0, the number of candidates strictly inside ⁠(-1, 1)⁠.

Value

an ⁠nBlocks x 2⁠ matrix that contains the lower and upper bound of the savi confidence sequence per block; an empty set is an NA row, and with runningIntersection the rows are nested and stay NA after the first empty row.


safestats documentation built on Oct. 5, 2026, 9:07 a.m.