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

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Fri 26 Jan 2007 - 22:01:11 GMT

Bob Green wrote:
> Peetr & Michael,
>
> I now see my description may have confused the issue. I do want to compare
> odds ratios across studies - in the sense that I want to create a table
> with the respective odds ratio for each study. I do not need to
> statistically test two sets of odds ratios.
>
> What I want to do is ensure the method I use to compute an odds ratio is
> accurate and intended to check my method against published sources.
>
> The paper I selected by Schanda et al (2004). Homicide and major mental
> disorders. Acta Psychiatr Scand, 11:98-107 reports a total sample of 1087.
> Odds ratios are reported separately for men and women. There were 961 men
> all of whom were convicted of homicide. Of these 961 men, 41 were diagnosed
> with schizophrenia. The unadjusted odds ratio is for this group of 41 is
> cited as 6.52 (4.70-9.00). They also report the general population aged
> over 15 with schizophrenia =20,109 and the total population =2,957,239.
>
> Any further clarification is much appreciated,
>
>
A fisher.test on the following matrix seems about right:  > matrix(c(41,920,20109-41,2957239-20109-920),2)

[,1] [,2]
[1,] 41 20068
[2,] 920 2936210

> fisher.test(matrix(c(41,920,20109-41,2957239-20109-920),2))

Fisher's Exact Test for Count Data

data: matrix(c(41, 920, 20109 - 41, 2957239 - 20109 - 920), 2) p-value < 2.2e-16
alternative hypothesis: true odds ratio is not equal to 1 95 percent confidence interval:
4.645663 8.918425
sample estimates:
odds ratio
6.520379

The c.i. is not precisely the same as your source. This could be down to a different approximation (R's is based on the noncentral hypergeometric distribution), but the classical asymptotic formula gives

> exp(log(41*2936210/920/20068)+qnorm(c(.025,.975))*sqrt(sum(1/M))) [1] 4.767384 8.918216

which is closer, but still a bit narrower.

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 09:05:35 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 Sun 28 Jan 2007 - 14:30:25 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.