[R] replicating the odds ratio from a published study

From: Bob Green <bgreen_at_dyson.brisnet.org.au>
Date: Fri 26 Jan 2007 - 09:04:27 GMT


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. Received on Fri Jan 26 20:08:08 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 26 Jan 2007 - 13:30:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.