inference {exact.n}R Documentation

Approximate and exact tests for single data set

Description

For a single provided data sets (y0, n0, y1, n1) calculate approximate and quasi-exact test statistics of the null value p1-p0=psi.

Usage

inference(y0, n0, y1, n1, psi = 0, sided = 1, dec.places = 4)

Arguments

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

Value

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

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

Examples


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)



[Package exact.n version 1.1.1 Index]