View source: R/estimate_win_prob_given_posterior.R
estimate_win_prob_given_posterior | R Documentation |
Estimate Win Probability Given Posterior Distribution
estimate_win_prob_given_posterior(posterior_samples, winner_is_max = TRUE)
posterior_samples |
Tibble of data in long form with 2 columns 'option_name' and 'samples' |
winner_is_max |
Boolean. This should almost always be TRUE. If a larger number is better then this should be TRUE. This should be FALSE for metrics such as CPA or CPC where a higher cost is not necessarily better. |
Tibble of each option_name and the win probability expressed as a percentage and a decimal 'raw'
# Requires posterior_samples dataframe. See `sample_from_posterior()`
# for an example.
## Not run:
estimate_win_prob_given_posterior(posterior_samples = posterior_samples)
estimate_win_prob_given_posterior(
posterior_samples = posterior_samples,
winner_is_max = TRUE
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.