FrederickHuangLin / ANCOMBC

Differential abundance (DA) and correlation analyses for microbial absolute abundance data
https://www.nature.com/articles/s41467-020-17041-7
107 stars 29 forks source link

Changed reference group - different p value #238

Open PKoteja opened 9 months ago

PKoteja commented 9 months ago

Hi, I understand why, even if there are only two groups of a factor, after changing the reference group not only the sign, but also the value of the effect - the LFC - changes. However, I noticed that the p-value for this effect also changes - and I do not quite understand why this should happen in a model with only two categories. When the reference changes, the estimated ratio obviously changes, but I thought (perhaps naively) that SE should also change accordingly, so that W and p remain the same. Indeed SE changes, but in a counterintuitive way, so that the version of coding that leads to a higher LFC results in lower SE... In regular linear model the choice of which of two groups is the reference, or how the groups are coded, affects only the coefficients, but not the test of "significance". Is it a property of ancombc2, that p value also changes? If yes, this means that choosing the reference is much more important than in the usual framework of linear models, and I have missed information on this issue. Best Pawel

lizgehret commented 5 months ago

Hey @PKoteja,

I may have run into this as well - just out of curiosity, did your p-values become 0?

PKoteja commented 3 months ago

I am sorry, I should have answered immediately: no, the p values did not collapse to zero.

Maggie8888 commented 1 month ago

Thanks for your question. I'm wondering when you saying the p-value changed, did you mean the absolute values changed? Or you observe the significant results changed? IT will be helpful for us if you could provide some of your output.

PKoteja commented 1 month ago

I am sorry - it was a long time ago when I did the analyses and I will not respond out of hand. However, certainly when I said that p values changed I did mean the p values, not the judgement of "significance".BestPawelPaweł Koteja, INoS UJ (Wysłane ze smartfona - przepraszam  za ewentualne literówki, czasem zabawne...) -------- Oryginalna wiadomość --------Od: ThisIsMaggie @.> Data: 27.09.2024 20:49 (GMT+01:00) Do: FrederickHuangLin/ANCOMBC @.> DW: PKoteja @.>, Mention @.> Temat: Re: [FrederickHuangLin/ANCOMBC] Changed reference group - different p value (Issue #238)

 

UWAGA: Wiadomość pochodzi od zewnętrznego nadawcy.

 

Thanks for your question. I'm wondering when you saying the p-value changed, did you mean the absolute values changed? Or you observe the significant results changed? IT will be helpful for us if you could provide some of your output. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>