Description Usage Arguments Value Examples
Generates synthetic data from Gaussian distributions
1 2 3 |
n.metrics |
Number of metrics. |
n.observations |
Number of observations. |
mu.pre |
Vector or scalar representing the mean during the pre-period for each metric. |
sigma.pre |
Vector or scalar representing the standard deviation during the pre-period for each metric. |
rho.ctrl |
Vector or scalar representing the correlation between the pre-period and the post-period for the control group for each metric. |
rho.trmt |
Vector or scalar representing the correlation between the pre-period and the post-period for the treatment group for each metric. If missing, set equal to rho.ctrl. |
mu.ctrl |
Vector or scalar representing the mean during the post-period for the control group for each metric. If missing, set equal to mu.pre. |
sigma.ctrl |
Vector or scalar representing the standard deviation during the post-period for the control group for each metric. If missing, set equal to sigma.pre. |
mu.trmt |
Vector or scalar representing the mean during the post-period for the treatment group for each metric. If missing, set equal to mu.pre. |
sigma.trmt |
Vector or scalar representing the standard deviation during the post-period for the treatment group for each metric. If missing, set equal to sigma.pre. |
spread |
If TRUE, the output has a horizontal structure
with a |
A data.frame
which can be used as input for the PrePost
and the PreCheck
functions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | data <- SampleData(n.metrics = 10)
ans <- PrePost(data)
n.metrics <- 10
mu.pre <- 100
mu.ctrl <- 100
mu.trmt <- c(110, rep(100, n.metrics - 1))
data <- SampleData(n.metrics = n.metrics,
mu.pre = mu.pre,
mu.ctrl = mu.ctrl,
mu.trmt = mu.trmt)
ans <- PrePost(data)
data <- SampleData(n.metrics = n.metrics,
mu.pre = mu.pre,
mu.ctrl = mu.ctrl,
mu.trmt = mu.trmt,
spread = TRUE)
std.data <- ReshapeData(data)
ans <- PrePost(std.data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.