estimate_lift_vs_baseline: Estimate Lift vs Baseline

View source: R/estimate_lift_vs_baseline.R

estimate_lift_vs_baselineR Documentation

Estimate Lift vs Baseline

Description

Estimate Lift vs Baseline

Usage

estimate_lift_vs_baseline(
  input_df,
  distribution,
  priors = list(),
  wrt_option,
  metric = "lift",
  threshold = 0.7
)

Arguments

input_df

Dataframe containing option_name (str) and various other columns depending on the distribution type. See vignette for more details.

distribution

String of the distribution name

priors

Optional list of priors. Defaults will be use otherwise.

wrt_option

string the option loss is calculated with respect to (wrt). Required.

metric

string the type of loss. absolute will be the difference, on the outcome scale. 0 when best = wrt_option lift will be the (best - wrt_option) / wrt_option, 0 when best = wrt_option relative_risk will be the ratio best/wrt_option, 1 when best = wrt_option

threshold

Lift percentage threshold between 0 and 1. (0.7 threshold is "at least 70% lift"). Defaults to 0.7.

Value

numeric value remaining at the specified threshold

Examples

input_df <- tibble::tibble(option_name = c("A", "B", "C"),
    sum_clicks = c(1000, 1000, 1000),
    sum_conversions = c(100, 120, 110))
estimate_lift_vs_baseline(input_df, distribution = "conversion_rate", wrt_option = "A")


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