Generate random dummy data for simulation studies. For details, see Section 4.3 in Deng et al. (2017).
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
"Bernoulli"(default) or"normal". You can specify just the initial letter.- xi
numeric value specifying the treatment effect variation (TEV) under the Bernoulli model, where \(TEV = 2\xi\). This argument is ignored if the
modelargument is set to"normal". The default is 0.- sigma
numeric value specifying the treatment effect variation (TEV) under the normal model, where \(TEV = \sigma\). This argument is ignored if the
modelargument is set to"Bernoulli". The default is 0.- lambda
numeric value specifying the Poisson rate parameter for the number of sessions and page-views generated by a single user.
- random_unit
character string specifying the randomization unit. It must be one of
"user"(default),"session", or"pageview". You can specify just the initial letter. The default is 0.- 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