Learn R Programming

grizbayr (version 1.2.3)

find_best_option: Find Best Option

Description

Samples from posterior, calculates win probability, and selects the best option. Note: this can be inefficient if you already have the win probability dataframe. Only use this if that has not already been calculated.

Usage

find_best_option(posterior_samples, distribution)

Arguments

posterior_samples

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

distribution

String: name of the distribution

Value

String: the best option name

Examples

Run this code
# NOT RUN {
# Requires posterior distribution
# }
# NOT RUN {
find_best_option(posterior_samples = posterior_samples, distribution = "conversion_rate")
# }

Run the code above in your browser using DataLab