Description Usage Arguments Value Examples
View source: R/log_odds_to_prob.r
Logistic regression can tell you the log odds of the outcome occurring for each observation. In particular, broom::augment
will add a column .fitted
to your df with the log odds. Often you'll want to know the probability rather than log odds. This transforms a log odds into probability. You can get the same values using predict(f, df, type='response')
.
1 |
x |
vector of log odds |
vector with probabilities
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.