Description Usage Arguments Details Note References Examples
Sample size calculations for factorial ANOVAs
1 2 3 
iv1 
The list of data for treatment 1. 
iv2 
The list of data for treatment 2. 
iv3 
(optional) The list of data for treatment 3. 
iv4 
(optional) The list of data for treatment 4. 
interaction.eta2 
(optional) Either a character string or numeric value of the desired eta squared. Default is set to "small". 
sig.level 
(optional) Desired significance level. Default value is 0.05. 
power 
(optional) Desired level of power. Default value is 0.80. 
result 
The amount of data that will be output to the user (default = "all"). The following are the three output options the user may specify:

... 
Extra interactions to pass in. In order to change the effect size of a specific interaction an interaction effect may be added to the function. It must take the form: int# = int.eff.#. 
Acceptable effect size character string values and their numeric equivalents are: "small" (0.01), "med" (0.06), and "large" (0.14).
Sample size recommendations are rounded up to the nearest integer. More detailed examples on n.multiway can be viewed in the vignette.
Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Hillsdale, N.J.: Lawrence Erlbaum Associates.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  # Exercise 8.15, p.400 from Cohen (1988)
# Defining the treatments
main.eff.1 < list(name = "R", levels = 2, eta.sq = 0.123)
main.eff.2 < list(name = "C", levels = 4, eta.sq = 0.215)
# Running n.multiway
n.multiway(iv1=main.eff.1, iv2=main.eff.2, interaction.eta2 = 0.079)
# To just view highest
n.multiway(iv1=main.eff.1, iv2=main.eff.2, interaction.eta2 = 0.079, result = "highest")
# Exercise 8.14, p.397 from Cohen (1988)
# Defining the treatments and interaction
main.eff.1 < list(name = "Sex", levels = 2, eta.sq = 0.0099)
main.eff.2 < list(name = "Age", levels = 3, eta.sq = 0.0588)
main.eff.3 < list(name = "Conditions", levels = 4, eta.sq = 0.1506)
# Running n.multiway
n.multiway(iv1=main.eff.1, iv2=main.eff.2, iv3=main.eff.3, interaction.eta2 = 0.0588)

The following sample size recommendations are for each treatment and all possible interactions.
Sample sizes are calculated independently using the estimated effect size to achieve
the desired power level.
Desired power: 0.80
Significance level: 0.05
Effect size used in calculations: Cohen's fsquared
Cutoffs: small = 0.01, med = 0.06, large = 0.14
Treatment Effect Size Total n per cell
R 0.123 64 8
C 0.215 48 6
R*C 0.079 136 17
The following is the largest recommended total sample size.
Desired power: 0.80
Significance level: 0.05
Effect size used in calculations: Cohen's fsquared
Cutoffs: small = 0.01, med = 0.06, large = 0.14
Treatment: R*C
Effect Size: 0.079
Total N: 136
n per cell: 17
The following sample size recommendations are for each treatment and all possible interactions.
Sample sizes are calculated independently using the estimated effect size to achieve
the desired power level.
Desired power: 0.80
Significance level: 0.05
Effect size used in calculations: Cohen's fsquared
Cutoffs: small = 0.01, med = 0.06, large = 0.14
Treatment Effect Size Total n per cell
Sex 0.0099 809 34
Age 0.0588 179 8
Conditions 0.1506 86 4
Sex*Age 0.0588 179 8
Sex*Conditions 0.0588 199 9
Age*Conditions 0.0588 242 11
Sex*Age*Conditions 0.0588 242 11
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.