# Beta-diversity for data with zeros

Background
I am looking into enterotyping the gut microbiome data, obtained by shotgun sequencing. This essentially means performing the Principal Coordinates Analysis (PCoA) of the beta-diversity matrix (distance matrix), based on the abundance table of species/gene-counts for all possible species/genes in all samples: for sample $$i$$ the counts of species/genes are $$\mathbf{x}_i=(x_{i1}, x_{i2},...,x_{im})$$. Such a table necessarily contains many zeros, whenever a species/gene is not present in a sample. Some of the possible beta-diversity measures are listed in table 1 of this article.

Problem
Statisticallys peaking, such data are considered to be an example of compositional data, i.e., the meaningful information is contained only in the ratios of the counts, which makes log-based distances the most suitable ones. These are used in many statistical methods (see, e.g., here). However, the log-transofmation is meaningful only when all the entries in the count table are strictly positive $$x_{ik}>0$$. One thus faces a problem of dealing with zero entries.

Possible solutions

• Using metrics not sensitive to zero entries (excluding alr, ilr and other similar log-transformations, highly recommended by statisticians - this limits the choice of statistical methods)
• Imputation of zeros: this requires a principled/biologically-sound way of imputing the zeros, since the results may be potentially very sensitive to this choice.

Question
What are the commongly used imputation methods? What is their advantages/disadvantages and justification for their use?

Some references

• An appropriate way to handle this is with a so-called zero-inflated model: paul-buerkner.github.io/brms/articles/…. May 20 at 6:24
• I'll often use the pseudocount method for exploratory analyses. Basically just apply a pseudocount of 1 to every count in the table (since Log(1) = 0), so the action you actually end up performing is Log(x+1). May 20 at 15:52
• @MikeyC Pseudocount is what I meant by "imputation of zeros": it is certainly a good method when one is interested only in the most abundant species (those that have counts), but I see how it may create problems when detecting low abandance species is important. May 26 at 9:46
• @vkehayas if I understand correctly, zero inflation corrects for undersampled species - one will still have actual zeros in the count table? May 26 at 9:48
• Correct, you still keep them in the sample. The model estimates parameter values for a separate process leading to ratios at zero and parameter values for a separate process leading to values $\in (0, 1)$. A great introduction to similar models can be found in McElreath's Statistical Rethinking book (slides, lecture 13). May 26 at 11:46