Created
September 16, 2024 06:42
-
-
Save danlewer/e164f6422c843384a342669ce76d6d4c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
risk2odds <- function (risk) risk / (1-risk) | |
odds2risk <- function (odds) odds / (1+odds) | |
or2rr <- function (OR, p0) OR / ((1 - p0) + (p0 * OR)) | |
rr2or <- function(RR, p0) RR * (1 - p0) / (1 - RR * p0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment