Hi,
I just want to know is it possible to "revert" calculation of odds ratio in package mosaic oddsRatio() function?
According to help pages: " This function calculates the odds ratio and relative risk for a 2 x 2 contingency table and a confidence interval (default conf.level
is 95 percent) for the each estimate. x
should be a matrix, data frame or table. "Successes" should be located in column 1 of x
, and the treatment of interest should be located in row 2. The odds ratio is calculated as (Odds row 2) / (Odds row 1). The confidence interval is calculated from the log(OR) and backtransformed."
Is it possible somehow for it to be calculated as: (Odds row 1) / (Odds row 2) in order to look in a more standard way like any other functions ?
For example:
tab2 <- matrix(c(44,314,33,334), nrow=2, byrow = TRUE)
colnames(tab2) <- c("yes", "no")
rownames(tab2) <- c("female", "male")
epiR::epi.2by2(tab2)
gives 1.42 (0.88, 2.28) odds ratio, when:
mosaic::Odds Ratio: 0.7051
any ideas would be appreciated, thank you.