or.midp {epitools} | R Documentation |
Calculates odds ratio by median-unbiased estimation and exact confidence interval using the mid-p method (Rothman 1998).
or.midp(x, conf.level = 0.95, byrow = TRUE, interval = c(0, 1000))
x |
input data can be 2x2 matrix or vector of length 4 |
conf.level |
|
byrow |
|
interval |
Calculates odds ratio by median-unbiased estimation and exact confidence interval using the mid-p method (Rothman 1998, p. 251).
This function expects the following 2x2 table struture:
exposed not exposed disease a1 a0 no disease b1 b0or a numeric vector of the form c(a1, a0, b1, b0).
This function is used by oddsratio.midp
.
x |
table that was used in analysis |
data |
same table as x but with marginal totals |
estimate |
median unbiased odds ratio |
conf.level |
confidence level used |
Visit http://www.epitools.net for the latest.
Tomas Aragon, aragon@berkeley.edu, http://www.medepi.com
Kenneth J. Rothman and Sander Greenland (1998), Modern Epidemiology, Lippincott-Raven Publishers
##rothman p. 243 z1 <- matrix(c(12,2,7,9),2,2,byrow=TRUE) z2 <- z1[2:1,2:1] ##jewell p. 79 z3 <- matrix(c(347,555,20,88),2,2,byrow=TRUE) z4 <- z3[2:1,2:1] or.midp(z1) or.midp(z2) or.midp(z3) or.midp(z4)