I've run two sample size calculations with the WebPower package in R and G*Power simultaneously. The conditions I've done are;
Case 1
Cohen's f = 0.2756987
Number of groups = 1
Number of repeated measures = 4
Non-sphericity correction = 0.672
alpha = 0.05
power = 0.80
one group, within-effect (for WebPower, within factors for G*Power)
The result is as follows;
> WebPower::wp.rmanova(ng = 1,
nm = 4,
f = 0.2756987,
nscor = 0.672,
alpha = 0.05, power = 0.80,
type = 1) -> n
> n
Repeated-measures ANOVA analysis
n f ng nm nscor alpha power
190.5745 0.2756987 1 4 0.672 0.05 0.8
NOTE: Power analysis for within-effect test
URL: http://psychstat.org/rmanova
> n$n
[1] 190.5745
> n$n/3+1
[1] 64.52483
> ceiling(n$n/3+1)
[1] 65
And GPower (performed under "options -> as in SPSS," you can find the option button at the lower part of the GPower window.
F tests - ANOVA: Repeated measures, within factors
Analysis: A priori: Compute required sample size
Input: Effect size f(U) = 0.2756987
α err prob = 0.05
Power (1-β err prob) = 0.8
Number of groups = 1
Number of measurements = 4
Nonsphericity correction ε = 0.672
Output: Noncentrality parameter λ = 9.9603207
Critical F = 3.0568300
Numerator df = 2.0160000
Denominator df = 131.04
Total sample size = 66
Actual power = 0.8032615
What I wonder is why I should divide the calculated number in WebPower with the df of repeated measures number and add the group number (not df of group number) to get the final sample size? I referred to this method of dividing and adding some numbers from the YouTube video "Power Analysis in G*Power & RStudio (RM ANOVA)" by Lacey Maths & Stats Consultancy (https://www.youtube.com/watch?v=Ya3KdVFhcdY&t=1355s). You can recognize his explanation without detailed comments from the video 14:25.
In addition, If I run the G*Power option of "as in Cohen(1988) - recommended", then the output is;
F tests - ANOVA: Repeated measures, within factors
Analysis: A priori: Compute required sample size
Input: Effect size f(V) = 0.2756987
α err prob = 0.05
Power (1-β err prob) = 0.8
Number of groups = 1
Number of measurements = 4
Nonsphericity correction ε = 0.672
Output: Noncentrality parameter λ = 9.7560064
Critical F = 3.0108542
Numerator df = 2.0160000
Denominator df = 383.04
Total sample size = 191
Actual power = 0.8009450
It is same with WebPower before additional calculations. Then, Which number (191 vs 66) is a right one for me:
Case 2
Cohen's f = 0.001630609 (I know this is a silly number, but it makes the difference between the two methods)
Number of groups = 3
Number of repeated measures = 4
Non-sphericity correction = 0.672
alpha = 0.05
power = 0.80
Three groups, interaction effect (for WebPower, within-between interaction for G*Power)
The result is as follows;
> WebPower::wp.rmanova(ng = 3,
nm = 4,
f = 0.001630609,
nscor = 0.672,
alpha = 0.05, power = 0.80,
type = 2) -> two.rmanova.n
> two.rmanova.n
Repeated-measures ANOVA analysis
n f ng nm nscor alpha power
6696827 0.001630609 3 4 0.672 0.05 0.8
NOTE: Power analysis for interaction-effect test
URL: http://psychstat.org/rmanova
> two.rmanova.n$n
[1] 6696827
> two.rmanova.n$n/3+3
[1] 2232279
And G*Power (as in SPSS)
F tests - ANOVA: Repeated measures, within-between interaction
Analysis: A priori: Compute required sample size
Input: Effect size f(U) = 0.001630609
α err prob = 0.05
Power (1-β err prob) = 0.8
Number of groups = 6
Number of measurements = 4
Nonsphericity correction ε = 0.672
Output: Noncentrality parameter λ = 16.2870663
Critical F = 1.8271026
Numerator df = 10.0800000
Denominator df = 6125523
Total sample size = 3038460
Actual power = 0.8000005
G*Power as in Cohen (1988) - recommended
F tests - ANOVA: Repeated measures, within-between interaction
Analysis: A priori: Compute required sample size
Input: Effect size f(V) = 0.001630609
α err prob = 0.05
Power (1-β err prob) = 0.8
Number of groups = 3
Number of measurements = 4
Nonsphericity correction ε = 0.672
Output: Noncentrality parameter λ = 11.9657047
Critical F = 2.3659662
Numerator df = 4.0320000
Denominator df = 1.350081e+007
Total sample size = 6696831
Actual power = 0.8000001
As you see, the calculated number from WebPower is the same as those of GPower (Cohen); there is no need to divide df of repeated measures number and add the number of groups.
But, GPower (as in SPSS) results never get from the additional calculation of WebPower.
Should I do additional calculations of WebPower results or Not?
This query will help with many RM ANOVA sample size-related questions. I am waiting for a brilliant answer to this. Thank you in advance for answering my question.