perform_simulation | R Documentation |
Perform a simulation of A/B testing based on a data frame of parameters
perform_simulation(params, days = 20, per_day = 100, proportion_A = 0.1, ...)
params |
A data frame of parameters, each of which will be passed on to
|
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 |
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.