generate_dummy_data {deltatest} | R Documentation |
Generate Dummy Data
Description
Generate random dummy data for simulation studies. For details, see Section 4.3 in Deng et al. (2017).
Usage
generate_dummy_data(
n_user,
model = c("Bernoulli", "normal"),
xi = 0,
sigma = 0,
random_unit = c("user", "session", "pageview"),
treatment_ratio = 0.5
)
Arguments
n_user |
integer value specifying the number of users included in the generated data. Since multiple rows are generated for each user, the number of rows in the data exceeds the number of users. |
model |
character string specifying the model that generates the
potential outcomes. It must be one of |
xi |
numeric value specifying the treatment effect variation (TEV) under
the Bernoulli model, where |
sigma |
numeric value specifying the treatment effect variation (TEV)
under the normal model, where |
random_unit |
character string specifying the randomization unit. It
must be one of |
treatment_ratio |
numeric value specifying the ratio assigned to treatment. The default value is 0.5. |
Value
data.frame with the columns user_id, group, and metric, where each row represents a metric value for a page-view.
References
Deng, A., Lu, J., & Litz, J. (2017). Trustworthy Analysis of Online A/B Tests: Pitfalls, challenges and solutions. Proceedings of the Tenth ACM International Conference on Web Search and Data Mining. doi:10.1145/3018661.3018677
Examples
library(deltatest)
set.seed(314)
generate_dummy_data(n_user = 2000)