Effect size computation and interpretation
Metabolites and lipids univariate statistical analysis in R
Thus far we have been focused on determining the statistical significance, namely the p-value. We investigated if a difference exists between two or more biological groups. At this step, it is important to mention that the statistical significance is influenced by the collected sample sizes. Hence, if sample sizes are large even a small difference between two groups can be found statistically significant.
Now, we would like to show you an important measure that should be reported together with statistical significance - it is called effect size. The effect size is the magnitude of a difference between biological groups, showing if this effect is large enough to be meaningful, e.g., useful for further investigation. It is difficult to make such a judgment using p-values only, considering the influence of sample sizes on statistical significance. In the effect, as mentioned above, many journals expect to report effect sizes together with the p-values.
Here, you will find information about how effect size can be computed in R using rstatix or ggstatsplot libraries and what effect size can be used with statistical tests from the previous subchapters.
Selecting effect size for basic statistical tests
Below you will find exemplary effect sizes, which can be computed and reported together with the t-test, Mann-Whitney U test, ANOVA, and Kruskal-Wallis test:
t-test
1 - Cohen’s d,
2 - Hedges’ g
0.2 - small effect, 0.5 - medium effect, 0.8 and more - large effect
Mann-Whitney U test
1 - r value 2 - Rank biserial correlation
For r value: <0.3 small effect, 0.5 - moderate effect, 0.5 and more - large effect For rank biserial correlation: -1 - perfect negative relationship, 0 - no effect, 1 - perfect positive relationship
ANOVA
1 - η2 Eta Squared
0.01 - small effect size, 0.06 - medium effect size, 0.14 and more - large effect size
Kruskal-Wallis test
1 - ε2 Epsilon Squared 2 - η2 Eta Squared
0.01 - small effect size, 0.06 - medium effect size, 0.14 and more - large effect size
Computing effect size in R
The rstatix library contains dedicated functions for computing effect sizes. You will find examples in the code blocks below:
We obtain:
We obtain the following tibble:
NOTE: If you carefully check the tibble with ANOVA test results obtained from the anova_test() function, you will find the last column named 'ges', which stands for generalized eta squared. It is the effect size computed automatically:
Here is the exemplary tibble:
The package also provides a function called eta_squared(). Using it, you can compute the effect size for the base ANOVA model built through the aov() function, for instance:
The output in the R console:
You will find exactly the same value in the 'ges' column of tibble with the ANOVA test results.
We obtain:
Effect sizes were also automatically computed by the ggstatsplot library. Look at the examples below:
We obtain:
Last updated