Calculates all possible values of the (signed) LR statistic for testing p1-p0 greater than a provided null value psi.
lr.rd(
n0,
n1,
Y0 = NULL,
Y1 = NULL,
psi = 0,
sided = 1,
mod = 1e-07,
dec.places = 10
)A list with elements
data sets (scalar or vector)
quasi-exact P-value(s) and equivalent T-value(s)
profile ML estimates of baseline probability
consistent code to select a single outcome
scalar null value of p1-p0
control sample size
treatment sample size
number of successes for control (see details)
number of successes for treatment (see details)
null value of risk difference p1-p0
(1 or 2 sided test) #' @param sided 1-sided or 2-sided test
A very small adjustment to account for 0*log0 in certain likelihood calculations. Should not need adjustment.
number of decimal places of t-values and p-value.
Chris J. Lloyd
If Y0,Y1 is not supplied then all possible values are output. If specific values for Y0, Y1 are supplied then only these outcomes of the SRLR are calculated.
C.J. Lloyd (2022) Exact samples sizes for clinical trials subject to size and power constraints. Preprint. tools:::Rd_expr_doi("10.13140/RG.2.2.11828.94085")