rr.r | R Documentation |
risk ratio to correlation coefficient use crosstab.rr() to calculate rr and use crosstab.prev() to calculate prevalence of the outcome in reference group then use the following to calculate rr to r
rr.r(rr, prev, n1, n2)
rr |
the risk ratio |
prev |
the prevalence of the outcome in the reference group |
n1 |
the cell size of group 1 (if unknown, leave blank, assumes correcting factor a = 4 where n1 = n2) |
n2 |
the cell size of group 2 (if unknown, leave blank, assumes correcting factor a = 4 where n1 = n2) |
rr.r(4.05, 1.56, 10.51, 141, 8)
dat %>% mutate (r_from_rr = rr.r(rr, rr_lowerci, rr_upperci, rr_n, rr_predictors)) -> dat
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.