bootstrap_measures: Bootstrap customer data from an A/B-test

View source: R/bootstrap_measures.R

bootstrap_measuresR Documentation

Bootstrap customer data from an A/B-test

Description

Bootstrap customer data from an A/B-test

Usage

bootstrap_measures(input_data_frame, bootstrap_iterations = 100, ...)

Arguments

input_data_frame

A grouped data frame with one row per customer/visitor. It should contain a (grouped-by) column with the test variant and additional columns for each measure in the test for that customer/visitor.

bootstrap_iterations

The number of bootstrap iterations to calculate, the default is 100.

...

<data-masking> Name-value pairs of summary functions. The name will be the name of the variable in the result.

The value can be:

  • A vector of length 1, e.g. min(x), n(), or sum(is.na(y)).

  • A vector of length n, e.g. quantile().

  • A data frame, to add multiple columns from a single expression.

Value

Returns a boot_strap object (a data frame) with bootstrap_iterations rows containing columns as defined in ...

Examples

example_data <- data.frame(
                x = rep(stats::runif(10),2),
                group = c("A", "B")
                ) %>%
                group_by(group)
bootstrap_measures(example_data, kpi1=mean(x))

nivr/bootabc documentation built on April 23, 2024, 5:02 p.m.