[R] replicating the odds ratio from a published study
Michael Dewey
info at aghmed.fsnet.co.uk
Fri Jan 26 14:06:58 CET 2007
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
More information about the R-help
mailing list