Is it possible to revert calculation of odds ratio in mosaic::oddsRatio ?

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.

Hi
It looks simple, but you need to tell is it what you are looking for

if you change the second row as first row, you get the same 0.7051 results even with epiR package
tab2 <- matrix(c(33,334,44,314), nrow=2, byrow = TRUE)

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.