Re: [R] replicating the odds ratio from a published study

From: Michael Dewey <info_at_aghmed.fsnet.co.uk>
Date: Fri 26 Jan 2007 - 13:06:58 GMT

At 09:04 26/01/2007, Bob Green wrote:
>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)

For an odds ratio you require two odds from which you form the odds ratio. You only have one odds.
Do you have another one lying around somewhere?

>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
>
>

Michael Dewey
http://www.aghmed.fsnet.co.uk



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 Sat Jan 27 00:12:44 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 - 14: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.