# How to calculate 95% CI for odds, risk, rate (not ratio!) in R using epiR or another package?

I use the great epiR package to calculate the odds ratio, the risk ratio, the rate ratio and CI. But how can I get 95%CI for absolute risk, odds, rate (not for the ratio) in this or another package in R? I would very much like to be able to do this with a package epiR.

To calculate a confidence interval for an odds (risk, rate, smr) use the function `epi.conf` in epiR. Here we use the two-by-two table data from the documentation for function `epi.2by2`:

``````tab <- matrix(c(13,2163,5,3349), nrow = 2, byrow = TRUE)
rownames(tab) <- c("DF+", "DF-"); colnames(dat) <- c("FUS+", "FUS-"); tab
``````
``````epi.2by2(dat = as.table(tab), method = "case.control",
conf.level = 0.95, units = 100, outcome = "as.columns")
``````

Calculate the confidence interval for the odds of disease in the exposed:

``````pos <- 13; neg <- 2163
epi.conf(dat = as.matrix(cbind(pos, neg)), ctype = "odds", N = 1000,
design = 1, conf.level = 0.95)
``````

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.