# Spurious and indirection correlations pairwise halla?

**URL:** <https://forum.biobakery.org/t/spurious-and-indirection-correlations-pairwise-halla/1770>\
**Category:** HAllA\
**Created:** [March 11, 2021, 7:48am UTC](https://forum.biobakery.org/t/spurious-and-indirection-correlations-pairwise-halla/1770 "2021-03-11T07:48:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marc0314](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@marc0314](https://forum.biobakery.org/u/marc0314)\
**Post date:** [March 11, 2021, 7:48am UTC](https://forum.biobakery.org/t/spurious-and-indirection-correlations-pairwise-halla/1770/1 "2021-03-11T07:48:06Z")

</div>

Dear all

I have performed multiple pairwise halla runs between my taxonomic (e.g. kraken2 data), functional (humann3 data), metabolite data, and an environmental measurement dataset. I managed to get a large number of significant correlations after residualizing my datasets.

However, I can’t help but think that some of the correlations are spurious or indirect correlations.

For example, if my hypothesis is that exposure to the said environment variable results in an association with a microbial function, and in turn that function results in the synthesis of the metabolite, then the significant association between the environmental variable and the metabolite should not be there. I notice that in my dataset, there are quite a number of correlations where the edges between the environmental variable, the function, and the metabolite form a triangle in a network representation plot.

Is there a way that, after the correlation output to identify such spurious correlations and remove them from the results? Thank you very much

Kind regards

Marcus

---

<div class="post-metadata">

**Author:** ![andrewGhazi](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/andrewghazi/32/2950_2.png) [@andrewGhazi](https://forum.biobakery.org/u/andrewGhazi)\
**Post date:** [March 17, 2021, 2:43pm UTC](https://forum.biobakery.org/t/spurious-and-indirection-correlations-pairwise-halla/1770/2 "2021-03-17T14:43:44Z")

</div>

Hi Marcus. HAllA is aimed at identifying associations between a pair of high-dimensional datasets. Looking at the network structure between more than two datasets and accounting for some known or unknown influence structure between them is unfortunately beyond HAllA’s scope.

---

<div class="post-metadata">

**Author:** ![marc0314](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@marc0314](https://forum.biobakery.org/u/marc0314)\
**Post date:** [March 22, 2021, 8:49am UTC](https://forum.biobakery.org/t/spurious-and-indirection-correlations-pairwise-halla/1770/3 "2021-03-22T08:49:21Z")

</div>

Hi Andrew thanks for the response.

In this case, how did the authors of the manuscript below account for any potential spurious indirect correlations by their pairwise HAllA analyses?

Thanks 🙂  
Marcus

Lloyd-Price et al. 2019. Multi-omics of the gut microbial ecosystem in inflammatory bowel diseases  
[https://www.nature.com/articles/s41586-019-1237-9](https://www.nature.com/articles/s41586-019-1237-9)

---

<div class="post-metadata">

**Author:** ![andrewGhazi](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/andrewghazi/32/2950_2.png) [@andrewGhazi](https://forum.biobakery.org/u/andrewGhazi)\
**Post date:** [March 22, 2021, 7:30pm UTC](https://forum.biobakery.org/t/spurious-and-indirection-correlations-pairwise-halla/1770/4 "2021-03-22T19:30:32Z")

</div>

I believe in that instance they are accounting for additional covariates by first regressing them out using a mixed-effects model. Then HAllA was run on the matrices of residuals instead of the matrices of raw data.

So in your example, you’d run a mixed effects model to regress out the effect of the environment variable that you think might cause confounding.

Given how dataset-specific this modelling would need to be, HAllA doesn’t include the functionality to run the model and extract the residuals. You can see more discussion about this type of process in this thread:

> [@Adjusting for covariates in HAllA](https://forum.biobakery.org/t/adjusting-for-covariates-in-halla/1559):
>
> Dear all I would like to perform HAllA on a two datasets (both of which quantitative variables). However, I also have qualitative covariates that I would like to adjust for prior to HAllA. I read the manuscript for Lloyd-Price et al. 2019 and some other manuscripts out there, and it says that the dataset needs to first be “residualized” based on a linear mixed effects model from the differential abundance analysis, and the HAllA tutorial mentions that any covariates need to be regressed out usi…
