View source: R/draw_sample_mixture.R
draw_sample_mixture | R Documentation |
Draws exemplary samples with a certain effect size for the sequential one-oway ANOVA or the sequential t-test, see Steinhilber et al. (2023) doi:10.31234/osf.io/m64ne
draw_sample_mixture(k_groups, f, max_n, counter_n = 100, verbose = FALSE)
k_groups |
number of groups (levels of factor_A) |
f |
Cohen's f. The simulated effect size. |
max_n |
sample size for the groups (total sample size = max_n*k_groups) |
counter_n |
number of times the function tries to find a possible parameter combination for the distribution. Default value is set to 100. |
verbose |
|
returns a data.frame with the columns y (observations) and x (factor_A).
set.seed(333)
data <- sprtt::draw_sample_mixture(
k_groups = 2,
f = 0.40,
max_n = 2
)
data
data <- sprtt::draw_sample_mixture(
k_groups = 4,
f = 1.2, # very large effect size
max_n = 4,
counter_n = 1000, # increase of counter is necessary
verbose = TRUE # prints more information to the console
)
data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.