Description Usage Arguments Examples
log_odds
computes the log odds ratio between two binary outcomes.
1 | log_odds(n00, n01, n10, n11, alpha = 0.05, print.result = "df")
|
n00 |
(numeric) A scalar for the number of observations exposed with the condition. |
n01 |
(numeric) A scalar for the number of observations exposed without the condition. |
n10 |
(numeric) A scalar for the number of observations not exposed with the condition. |
n11 |
(numeric) A scalar for the number of observations not exposed without the condition. |
alpha |
(numeric) A value defining the probability for the wald confidence interval. Default is an alpha of 0.05, corresponding to a 0.95 % confidence interval. |
print.result |
(character) Either "vector" for output given in a vector or "df" for output given within a tibble (default). |
1 2 3 4 5 6 7 | # If we have a hypothetical group of smokers (exposed) and non-smokers (not exposed),
# then we can look for the rate of lung cancer (condition).
# 20 smokers have lung cancer (n00),
# 80 smokers do not have lung cancer (n01),
# one non-smoker has lung cancer (n10),
# and 99 non-smokers do not have lung cancer (n11).
log_odds(20, 80, 1, 99)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.