Determine sample size with the Classical power analysis method
Source:R/ssp_power_traditional_anova.R
      ssp_power_traditional_anova.RdThis method is used to estimate the minimum sample size that a design needs to reach a statistical power, given a desired significance level and expected effect size.
Usage
ssp_power_traditional_anova(
  effect = c("Main Effect 1", "Main Effect 2", "Interaction Effect"),
  iter = 1000,
  max_n,
  mu,
  sigma,
  seed = NULL,
  tpr,
  alpha = 0.05
)Arguments
- effect
 Character. The effect of interest (main effect 1, main effect 2, interaction effect).
- iter
 Integer. The number of iterations.
- max_n
 Integer. The maximum number of participants per group (both groups are assumed to have equal sample size).
- mu
 Numeric. The mean of the DV for each group.
- sigma
 Numeric. The standard deviation of the DV for the groups.
- seed
 Numeric. The seed for reproducibility.
- tpr
 Numeric. The desired long-run probability of obtaining a significant result, given the means.
- alpha
 Numeric. The level of significance.
Value
The function returns a list of one named numeric vector. The vector called `n1` contains the determined sample size per group for the given design.
Examples
if (FALSE) { # \dontrun{
SampleSizePlanner::ssp_power_traditional_anova(
  tpr = 0.8, max_n = 400, mu = c(1, 1.2, 1.5, 1.3), sigma = 2,
  seed = NULL, alpha = 0.05
 )
} # }