Description Usage Arguments Value Examples
Generates data using the mvrnorm function from the MASS package according to user-specified means and effect sizes (ie. differences in means) for variables.
1 2 | generate_data(num_samples_trt, num_samples_control, means, delta,
cor_matrix = NULL, num_reps = 1000)
|
num_samples_trt |
The number of samples in the group that has an effect applied to the mean specified. |
num_samples_control |
The number of samples in the group that maintains the mean specified by the user. |
means |
A vector specifying the mean for each feature in the dataset. |
delta |
A vector specifying the difference in the mean for each feature in the dataset. |
cor_matrix |
The correlation matrix. If not specified an appropriately sized identity matrix is generated. Default: NULL |
num_reps |
Number of repetitions of the data that will be generated. Default: 1000 |
A dataframe with (num_samples_trt+num_samples_control)*num_reps rows and length(means) columns as well as a column for sample number, treatment assignment, iteration number, and total number of samples n.
1 | generate_data(50, 50, c(1, 2, 3), c(0.3, 0, 0.7))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.