I wanted to compare odds ratio across studies and tried to replicate the results from a study but have not been able to determine how to do this in R.
The study reported a sample of 961 men, of whom 41 had a disorder. The reported raw odds ratio was 6.52 (4.70-9.00) I did a search of the archives and came across script that looks like it should perform this task, however the results I obtained did not match > prop.test(41,961) 1-sample proportions test with continuity correction data: 41 out of 961, null probability 0.5 X-squared = 802.1686, df = 1, p-value < 2.2e-16 alternative hypothesis: true p is not equal to 0.5 95 percent confidence interval: 0.03115856 0.05795744 sample estimates: p 0.04266389 > > ci.p <- prop.test(920, 961)$conf > ci.odds <- ci.p/(1-ci.p) > ci.odds [1] 16.25404 31.09390 attr(,"conf.level") [1] 0.95 Any advice regarding the script I require is appreciated, regards bob Green ______________________________________________ R-help@stat.math.ethz.ch 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.