Learn R Programming

ORCI (version 1.1)

Cornfieldmidp.CI: Compute Cornfield midp confidence interval for the odds ratio

Description

Compute Cornfield midp confidence interval for the odds ratio of two independent binomial proportions.

Usage

Cornfieldmidp.CI(x1, n1, x2, n2, conf = 0.95, interval = c(1e-08, 1e+08))

Arguments

x1
number of events in group 1.
n1
number of trials in group 1.
x2
number of events in group 2.
n2
number of trials in group 2.
conf
confidence level.
interval
solution finding range.

References

Cornfield, J. (1956). A statistical problem arising from retrospective studies. In Proceedings of the third Berkeley symposium on mathematical statistics and probability, volume 4, pages 135-148. University of California Press Berkeley.

Lancaster, H. (1961). Significance tests in discrete distributions. Jornal of the American Statistical Association, 56(294):223-234.

Examples

Run this code
# x1=2, n1=14, x2=1, n2=11
# 95% confidence interval for the odds ratio 

Cornfieldmidp.CI(2, 14, 1, 11)

Run the code above in your browser using DataLab