Compositional Data Warning
Compositional data are measurements that represent parts of a whole —relative abundances in microbiome studies, flow cytometry fractions, tissue composition percentages, dietary component proportions. They carry a unique constraint: the components sum to a constant (often 1 or 100%). Using standard OLS regression on compositional data introduces spurious correlations and produces fundamentally misleading results.
STEP 1 —The Pitfall
The spurious correlation problem in compositional data is mathematical: if five bacterial taxa sum to 100%, then an increase in one necessarily decreases the others. Standard correlation and regression treat each component as an independent variable —but they cannot be independent by construction. This creates negative correlations between components that have no biological meaning, and suppresses true positive correlations.
The problem is particularly acute in microbiome research (16S rRNA relative abundances), immunology (T cell subset frequencies), and any multi-component outcome data. The same problem applies when compositional data are used as predictors in a regression model.
STEP 2 —Journal Requirement
Microbiome research guidelines (STORMS checklist, Microbiome journal) require that compositional data be analyzed with methods appropriate for compositions. PLOS Computational Biology and Nature Methods have published methodological papers establishing that OLS on relative abundance data is invalid. Reviewers in microbiome, immunology, and metabolomics increasingly require log-ratio or Dirichlet-based analysis.
STEP 3 —Licklider Solution
Input
- Outcome variable type declared via Outcome Type Lock (compositional / proportion / continuous)
- Or: auto-detection from data (multiple columns that sum to 1 within each row, or values in [0, 1] with sum constraint)
- Predictor variables for regression models
Output
- Compositional data detection: sum-to-constant pattern flagged across columns
- OLS block: standard regression on compositional outcome or compositional predictors flagged
- Transformation options: centered log-ratio (CLR), isometric log-ratio (ILR), additive log-ratio (ALR) —with explanation of each
- Alternative model options: Dirichlet regression (for compositional outcomes), linear models on log-ratio-transformed data
- Zero-handling advisory: compositional methods require non-zero values —pseudo-count or multiplicative replacement options offered
Guard
Standard OLS regression on compositional outcomes is blocked. The guard requires either: (1) transformation to log-ratio scale, (2) use of Dirichlet regression, or (3) explicit declaration that each component is being analyzed separately (with acknowledgment of the resulting spurious correlation issue). For compositional predictors used in OLS regression, a Warning (not block) is issued with recommendations.
STEP 4 —Draft Output (Draft / Needs review)
Microbiome relative abundance data were analyzed as compositional data
using centered log-ratio (CLR) transformation (Aitchison, 1986) to
address the sum-to-1 constraint inherent in relative abundance measurements.
Zeros were replaced with a pseudo-count (ホエ = 0.5) prior to transformation.
Linear regression was performed on CLR-transformed values. Standard OLS
regression on raw relative abundances was not used due to the spurious
correlation structure introduced by the compositional constraint.