gen.simu.data {LiftTest} | R Documentation |
A Bootstrap Proportion Test for Brand Lift Testing (Liu et al., 2023)
Description
This function generates binomial random samples for the control group
(with sample size n_1
and success probability p_1
) and the treatment
group (with sample size n_2
and success probability p_2
).
Usage
gen.simu.data(n1, n2, p1, p2, summary=TRUE)
Arguments
n1 |
sample size of the control group |
n2 |
sample size of the treatment group |
p1 |
success probability of the control group |
p2 |
success probability of the treatment group |
summary |
boolean variable. if TRUE it returns 2x2 contingency table; if FALSE it returns raw binomial random samples. By default, summary=TRUE. |
Details
The a 2x2 contingency table is of the following form
col1 | col 2 |
control sample size | control positive response count |
treatment sample size | treatment positive response count |
Value
A list of simulated data for the control group and the treatment group if summary=FALSE or a 2x2 contingency table if summary=TRUE
Examples
n1 <- 100; n2 <- 100; p1 <- 0.1; p2 <- 0.2
set.seed(1)
sim.data <- gen.simu.data(n1, n2, p1, p2)
sim.data
[Package LiftTest version 0.2.0 Index]