View source: R/Transform_Functions.R
p2or | R Documentation |
This function converts a pair of probability values into an odds ratio.
p2or(p0, p1)
p0 |
A numeric value (or vector) for the probabilities of success in the reference group or category (i.e., the denominator for the odds ratio). NA values are acceptable, but will return NA. All numeric values must fall in the closed unit interval, [0, 1]. |
p1 |
A numeric value (or vector) for the probabilities of success in the focal group or category (i.e., the numerator for the odds ratio). NA values are acceptable, but will return NA. All numeric values must fall in the closed unit interval, [0, 1]. |
=============================================================================
This function uses the formula OR = (p1/(1 - p1))/(p0/(1 - p0)).
A numeric value (or vector) for the odds ratio values.
To be added later.
p2or(p0 = .3, p1 = .6)
p2or(p0 = c(.3, .4), p1 = c(.6, .5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.