I am using pingouin.power_anova(eta=None, k=None, n=None, power=None, alpha=0.05)
in python for the calculation of sample size.
I have the information about control_group_historic_mean
, control_group_historic_std_deviation
and minimum_detectable_effect
. I read about the definition of eta
from here. But not able to figure out how should i use the given information to calculate eta
.
Sorry if I am missing something basic, I am new to statistics.
The simplest way to deal with
eta
is to look at the sums of squares (SSs), whereeta
equals the ratio of the SS between the groups (SSbetween or SSeffect) to the total SS (SSbetween + SSerror).Obviously you need access to the individual data points in order to compute the variances within and between the groups.
But, you can also reconstruct the ANOVA table from the summary data. SSbetween is the sum of the squared difference between the group mean Yi and the grand mean Y multiplied by the number of values in each group.
For example:
with the grand mean Y = (41 + 38 + 14 + 37) / 4 = 32.5
For SSerror (also called SSwithin), we don't have access to the individual data points Yij, but we have access to the standard deviation for each group. We know that the variance is the average of the sum of squares, therefore SSwithin is the sum of the squared standard deviation multiplied by the number or values minus 1 in each group as shown below:
Eta² = 3720 / (3720 + 503.02)