inference | R Documentation |
For a single provided data sets (y0, n0, y1, n1) calculate approximate and quasi-exact test statistics of the null value p1-p0=psi.
inference(y0, n0, y1, n1, psi = 0, sided = 1, dec.places = 4)
y0 |
number of successes for control |
n0 |
control sample size |
y1 |
number of successes for treatment |
n1 |
treatment sample size |
psi |
null value of risk difference p1-p0 |
sided |
1-sided or 2-sided test |
dec.places |
decimal places of output T and P values |
List with elements
y |
the data vector y0,y1 |
n |
the sample size vector n0,n1 |
approx |
approximate T-value and p-value |
quasi.exact |
quasi.exact T-value and p-value |
pmle |
profile maximum likelihood estimate of baseline probability |
psi |
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")}
y0=25
y1=41
n0=65
n1=82
# Non-inferiority test of p1-p0>-0.1. Evidence is strong.
inference(y0,n0,y1,n1,psi=-0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.