In the typical output of PERMANOVA you get R2 values (also called Eta-squared). These can be interpreted as variance explained. They are calculated from the Sum of Squares for the variables. However, these values can be biased, especially with small sample sizes, and they are not always comparable between variables with different degrees of freedom, as more degrees of freedom give higher Sum of Squares and therefore higher R2 values.
In this notebook we will see how to calculate (partial) Omega-squared values, which are unbiased estimators of effect sizes. The Omega-squared values can be interpreted as the Eta-squared (R2).
The "partial" in partial Omega-squared is optional, and is a way to account for the effects sizes for other variables in the models. It has no effect on models with 1 variable, but is recommended for models with more than 1 variable. It is akin to adjusted R2 in a linear model, in that there is a penalty for each added degree of freedom.
# Load data and packages
library(phyloseq)
library(vegan)
library(MicEco)
load("../data/physeq.RData")
# Run UniFrac
UF <- UniFrac(phy)
# Run PERMANOVA
Samp <- data.frame(sample_data(phy))
per <- adonis(UF ~ Time + Patient, data = Samp)
# Standard summary
per
The Time variable explains around 22% and is highly significant. However, the Patient variable explains 26%, but is not significant.
# Add partial Omega-squared values
adonis_OmegaSq(per, partial = TRUE)
With the Omega-squared values we see that the Patient effect is actually tiny, and it was inflated due to the many degrees of freedom.