[R] Odds ratio in fisher.test()

Achim Zeileis zeileis at ci.tuwien.ac.at
Wed Feb 26 08:43:03 CET 2003


On Wednesday 26 February 2003 05:10, Andrew Criswell wrote:

> Hello:
>
> Please help me through my confusion. I am having trouble reconciling
> the difference between what I believe is the conventional definition
> of an odds ratio for a 2-by-2 table and the output produced by
> fisher.test()
>
> in R. Consider the following example:
> > Discrim <- matrix(c(1,10,24,17),
>
> +            nr = 2,
> +            dimnames = list(AGE    = c('young', 'old'),
> +                            EMPLOY = c('fired', 'kept')))
>
> > Discrim
>
>        EMPLOY
> AGE     fired kept
>   young     1   24
>   old      10   17
>
> The conventional odds ratio is computed as
>
> > (1 * 17) / (24 * 10)
>
> [1] 0.07083333
>
> Why is it, when I use fisher.test(), I get an estimated odds ratio
> like that reported below? There, the difference seems slight, but
> with other cases it can be quite large.



More information about the R-help mailing list