perform_simulation: Perform a simulation of A/B testing based on a data frame of...

View source: R/simulation.R

perform_simulationR Documentation

Perform a simulation of A/B testing based on a data frame of parameters

Description

Perform a simulation of A/B testing based on a data frame of parameters

Usage

perform_simulation(params, days = 20, per_day = 100, proportion_A = 0.1, ...)

Arguments

params

A data frame of parameters, each of which will be passed on to conversion_expected_loss

days

Number of days to run

per_day

Number of "clicks" per day; overridden if present in params

proportion_A

"Clickthrough rate" in treatment A

...

Extra arguments, passed on to conversion_expected_loss

Examples


library(dplyr)

sim <- tibble(replicate = seq_len(nreps)) %>%
  mutate(proportion_A = .001, effect = 0, per_day = 10000) %>%
  perform_simulation()

library(ggplot2)
ggplot(sim, aes(day, expected_loss, group = replicate)) +
  geom_line(alpha = .5) +
  scale_y_log10()


dgrtwo/splittestr documentation built on May 15, 2022, 3:16 p.m.