Skip to content
Prev 384656 / 398525 Next

how to calculate odd ratios with R?

A review (sorry in Japanese) on the calculation of odds ratios 
with confidence intervals using several packages in R is given
by Prof. Okumura, Mie Univ.

https://oku.edu.mie-u.ac.jp/~okumura/stat/2by2.html

x <- matrix(c(6, 3, 4, 5), 2)
# using vcd
library(vcd)
res <- oddsratio(x)
exp(confint(res))
summary(res)
# Note: summary(oddsratio(x, log=FALSE)) gives inappropriate p-value.
# using fmsb
library(fmsb)
oddsratio(x, p.calc.by.independence=FALSE)

Best,
Minato Nakazawa

On Mon, 6 Jul 2020 15:01:34 +0200
Luigi Marongiu <marongiu.luigi at gmail.com> wrote: