How to calculate the Aitchison distance in R using two center logratio transformations (CC194)

March 11, 2022 • PD Schloss • 1 min read

The Aitchison distance is the Euclidean distance calculated on species counts subjected to a center logratio transformation (clr). There are several papers that claim whether this distance is invariant or insensitive to differences in sampling depth. Is that true? In this episode, Pat tests Aitchison distances calculated using the robust clr as well as the traditional clr calculated on a count matrix where zero values are imputed using functions from the zComparisons package. He’ll compare it to non-rarefied, non-transformed Euclidean distances and to rarefied, non-transformed Euclidean distances. Which approach do you think is most sensitive to uneven sampling effort? He’ll show how to synthesize and visualize the data using tools from vegan, dplyr, ggplot2 and other tidyverse packages.


You can browse the state of the repository at the