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

View source: R/newsafe2x2Test.R

computeConfidenceSequence2x2LogOddsR Documentation

Helper function: Computes the savi confidence sequence for logOdds

Description

Row i is the interval of computeConfidenceInterval2x2LogOdds() on blocks ⁠1..i⁠. The eGauss numerator at block i is that of the test on blocks ⁠1..i⁠, as every factor is fixed given its block's total or predictable, so the test's numerator vector serves all rows; the root finding is repeated per prefix.

Usage

computeConfidenceSequence2x2LogOdds(
  ya,
  yb,
  na,
  nb,
  logNumerator,
  alpha,
  runningIntersection
)

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.

logNumerator

numeric vector, the eGauss log numerator on blocks ⁠1..i⁠ for element i: the plain cumulative log e-process, before the UMP replacement of block 1, plus the cumulative hypergeometric log likelihood.

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.

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 stay NA after the first empty row.


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