This is not an odds ratio. You simply calculated 27/131 = .206, which is the odds of having the disease given <40%. You can calculate a confidence interval for this with:
exp(log(27/131) - 1.96 * sqrt(1/27 - 1/(27+131))) exp(log(27/131) + 1.96 * sqrt(1/27 - 1/(27+131))) which yields (0.146, 0.291). Wolfgang ________________________________________ From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of C W [tmrs...@gmail.com] Sent: Tuesday, August 14, 2012 9:06 PM To: Nordlund, Dan (DSHS/RDA) Cc: r-help Subject: Re: [R] What package to use to calculate odds ratio and the confidence interval? The table did not come out on rich text format. So what I wrote was, <40% >40% Total No disease 131 75 206 Have diease 27 6 33 239 My odds ratio: 27/(27+131))/(131/(27+131)) = 0.206 I am looking for the confidence interval. Mike ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.