solveUmpLogOdds: Uniformly most powerful log odds ratio of a one-sided...

View source: R/newsafe2x2Test.R

solveUmpLogOddsR Documentation

Uniformly most powerful log odds ratio of a one-sided conditional test

Description

Solves the conditional KL divergence of the alternative at logOdds from logOddsNull equal to log(1 / alpha), searching up to searchBound from logOddsNull in the direction of alternative.

Usage

solveUmpLogOdds(
  na,
  nb,
  totalSuccesses,
  alpha,
  alternative = c("greater", "less"),
  logOddsNull = 0,
  searchBound = 100
)

Arguments

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.

totalSuccesses

nonnegative integer, the total successes ya + yb in the table, at most na + nb.

alpha

numeric in (0, 1) that specifies the tolerable type I error and the null rejection rule e >= 1/alpha.

alternative

"greater" or "less", the side searched.

logOddsNull

numeric, the null log odds ratio.

searchBound

numeric > 0, the width of the search interval.

Value

A numeric, or NULL with a warning when the target is not reached on the search interval.


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