welch_anova.mc {WAnova} | R Documentation |
Monte Carlo simulation to assess residual normality and homoscedasticity across multiple groups by generating simulated data based on provided means, standard deviations, and sample sizes.
welch_anova.mc(
means,
sd,
n,
n_sim = 1000,
sim_func = NULL,
alpha = 0.05,
adj = TRUE
)
means |
Vector of means for each group. |
sd |
Vector of standard deviations for each group. |
n |
Vector of sample sizes for each group. |
n_sim |
Number of simulations to perform. Defaults to 1000. |
sim_func |
Function used for generating random samples. Defaults to rnorm(). |
alpha |
Significance level for normality and homoscedasticity tests. Defaults to 0.05. |
adj |
Logical, if TRUE applies continuity correction for proportions. Defaults to TRUE. |
A list of class "simres" containing the proportion of simulations where residuals are normally distributed and homoscedastic.
means <- c(50, 55, 60)
sds <- c(10, 12, 15)
n <- c(30, 35, 40)
result <- welch_anova.mc(means = means, sd = sds, n = n, n_sim = 1000, alpha = 0.05)
print(result)