estimate_win_prob_vs_baseline_given_posterior: Estimate Win Probability vs. Baseline Given Posterior

View source: R/estimate_win_prob_vs_baseline_given_posterior.R

estimate_win_prob_vs_baseline_given_posteriorR Documentation

Estimate Win Probability vs. Baseline Given Posterior

Description

Calculates the win probability of the best option compared to a single other option given a posterior distribution.

Usage

estimate_win_prob_vs_baseline_given_posterior(
  posterior_samples,
  distribution,
  wrt_option
)

Arguments

posterior_samples

Tibble returned from sample_from_posterior with 3 columns 'option_name', 'samples', and 'sample_id'.

distribution

String: the distribution name

wrt_option

String: the option to compare against the best option.

Value

Tibble of each option_name and the win probability expressed as a percentage and a decimal 'raw'

Examples

# Requires posterior_samples dataframe. See `sample_from_posterior()`
# for an example.
## Not run: 
estimate_win_prob_vs_baseline_given_posterior(
    posterior_samples = posterior_samples,
    distribution = "conversion_rate",
    wrt_option = "A")

## End(Not run)


grizbayr documentation built on Oct. 9, 2023, 5:10 p.m.