Convert between Odds and Probabilities
odds_to_probs(odds, log = FALSE, ...)# S3 method for data.frame
odds_to_probs(odds, log = FALSE, select = NULL, exclude = NULL, ...)
probs_to_odds(probs, log = FALSE, ...)
# S3 method for data.frame
probs_to_odds(probs, log = FALSE, select = NULL, exclude = NULL, ...)
convert_odds_to_probs(odds, log = FALSE, ...)
convert_probs_to_odds(probs, log = FALSE, ...)
The Odds (or log(odds)
when log = TRUE
) to convert.
Take in or output log odds (such as in logistic models).
Arguments passed to or from other methods.
When a data frame is passed, character or list of of column names to be transformed.
When a data frame is passed, character or list of column names to be excluded from transformation.
Probability values to convert.
# NOT RUN {
odds_to_probs(3)
odds_to_probs(1.09, log = TRUE)
probs_to_odds(0.95)
probs_to_odds(0.95, log = TRUE)
# }
Run the code above in your browser using DataLab