SinglePrePost: SinglePrePost returns the percentage change and the...

Description Usage Arguments Value

Description

SinglePrePost returns the percentage change and the difference between the treatment and the control in an AB test for Gaussian data. When available, pre-period data can also be used to improve the statistical power of the test.

Usage

1
SinglePrePost(data, weights = NULL, n.nodes = 50, ci.level = 0.95)

Arguments

data

A data.frame with 4 columns for each sample. The column condition indicating whether the sample is from the control or treatment group. A column pre indicating the observed value in the pre-period. A column post indicating the observed value in the experiment period. If the column pre is missing, the test is based only on the experiment period. A column metric indicating the name of the metric.

weights

An optional data.frame with two variables and a single row. The variables control and treatment indicate the weight of the two groups. The weight must be proportional to the traffic proportion of observations in the condition group. If NULL, equal weights are are used in the fitting process.

n.nodes

The number of nodes used to approximate each univariate distribution.

ci.level

Coverage of the confidence intervals.

Value

A data.frame with 2 rows and 7 columns: lower, center, upper: the lower limit, the median and the upper limit of the credible interval. mean: the posterior mean. var: the posterior variance. p.value: the p-value. type: a string equal to percent.change or difference.


google/abpackage documentation built on May 8, 2019, 11:44 a.m.