stefpeschel / NetCoMi

Network construction, analysis, and comparison for microbial compositional data
GNU General Public License v3.0
143 stars 24 forks source link

Differential test threshold #77

Closed TimFaro closed 1 year ago

TimFaro commented 1 year ago

Hi Stefanie,

as far as I understood, when using diffnet(), the hypothesis to test for differential associations is if the difference between the association in condition 1 and condition 2 is equal to zero, correct? That would mean if asso1 = 0.6 and asso2 = 0.61 then they are regarded as differential? Is it possible to adjust this to allow for some "tolerance", e.g. if the difference is greater than 0.05 then they are differentially associated?

Best

Tim

stefpeschel commented 1 year ago

Hi Tim,

Yes the difference is tested for being different from zero. The associations are, however, transformed into Fisher's z-values to follow a Normal distribution. The difference of the z-values is then tested for being significantly different from zero using a standard two-tailed test. So, there is already a tolerance used, namely +-1.96 (which are the 0.025 and 0.975 quantiles of the Normal distribution) if you are using the common significance level of 5%. The difference is only considered as significant if the absolute difference of z-values is greater than this critical value.

The test is described in more detail in the supplement of our manuscript (page 10): https://oup.silverchair-cdn.com/oup/backfile/Content_public/Journal/bib/22/4/10.1093_bib_bbaa290/1/netcomi_supplement_bbaa290.pdf...

Best, Stefanie

TimFaro commented 1 year ago

Great, thanks for the explanation!