lr.rd | R Documentation |
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
)
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. |
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.
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 |
Chris J. Lloyd
C.J. Lloyd (2022) Exact samples sizes for clinical trials subject to size and power constraints. Preprint. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.13140/RG.2.2.11828.94085")}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.