PrePost: Compute credible intervals

Description Usage Arguments Details Value Examples

Description

Compute credible intervals

Usage

1
2
PrePost(data, weights = NULL, ci.level = 0.95, p.threshold = 0.05,
  p.method = "none", n.nodes = 50)

Arguments

data

A data.frame with several variables. The variable condition indicates the treatment assignment (control or treatment) for each row. The variable post indicates the observed value during the experiment period for each row. The variable pre indicates the observed value during the pre-period for each row. If omitted, the pre-period is not used to estimate the treatment effect. The variable metric indicates the name of each metric. If omitted, all rows are assumed to be from the same 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.

ci.level

Confidence level for credible intervals.

p.threshold

P-value threshold used to identify statistically significant effects. See p.adjust function for more details.

p.method

Correction method for multiple comparison. See p.adjust function for more details.

n.nodes

Number of nodes used for estimation.

Details

Compute percent change and difference estimation between treatment and control for one or several metrics.

Value

An object of class ab.

Examples

1
2
3
4
5
6
7
data <- SampleData(n.metrics = 20)
(ans <- PrePost(data))
plot(ans)

data.no.pre <- dplyr::select(data, -pre)
(ans.no.pre <- PrePost(data.no.pre))
plot(ans.no.pre)

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