Skip to content

Instantly share code, notes, and snippets.

@GuiMarthe
Last active October 24, 2017 21:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GuiMarthe/68ac1044a367c95f3ccfd1549a87f5c9 to your computer and use it in GitHub Desktop.
Save GuiMarthe/68ac1044a367c95f3ccfd1549a87f5c9 to your computer and use it in GitHub Desktop.
quick log odds, odds, probability equivalence
library(dplyr)
tibble(
prob = seq(0, 1, 0.01),
complement = 1 - prob,
odds_ratio = prob/complement,
log_odds_ratio = log(odds_ratio)
) %>%
arrange(-abs(log_odds_ratio)) %>%
print(n = nrow(.))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment