lr.rd {exact.n} | R Documentation |
Likelihood ratio statistics for one-sided tests of risk difference.
Description
Calculates all possible values of the (signed) LR statistic for testing p1-p0 greater than a provided null value psi.
Usage
lr.rd(
n0,
n1,
Y0 = NULL,
Y1 = NULL,
psi = 0,
sided = 1,
mod = 1e-07,
dec.places = 10
)
Arguments
n0 |
control sample size |
n1 |
treatment sample size |
Y0 |
number of successes for control (see details) |
Y1 |
number of successes for treatment (see details) |
psi |
null value of risk difference p1-p0 |
sided |
(1 or 2 sided test) #' @param sided 1-sided or 2-sided test |
mod |
A very small adjustment to account for 0*log0 in certain likelihood calculations. Should not need adjustment. |
dec.places |
number of decimal places of t-values and p-value. |
Details
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.
Value
A list with elements
y0 , y1 |
data sets (scalar or vector) |
T , P |
quasi-exact P-value(s) and equivalent T-value(s) |
pmle |
profile ML estimates of baseline probability |
index |
consistent code to select a single outcome |
psi |
scalar null value of p1-p0 |
Author(s)
Chris J. Lloyd
References
C.J. Lloyd (2022) Exact samples sizes for clinical trials subject to size and power constraints. Preprint. doi:10.13140/RG.2.2.11828.94085