Numerical precision issue: p-values of zero in MaAsLin3 (possibly related to multcomp)

Hi,

I encountered a numerical precision issue in MaAsLin3 where an abundance association returned a p-value of exactly zero, resulting in individual and joint FDR values of zero.

I investigated this and found that the issue may originate from the multcomp package, which MaAsLin3 uses for median-comparison testing.

The underlying linear regression produced a coefficient of 0.05755 and a standard error of 0.00634, which I could reproduce independently. However, testing against the reported median null hypothesis using multcomp::glht() also returned a p-value of zero.

For the corresponding simplified contrast (t = 8.85), I obtained:

# Numerically unstable calculation
2 * (1 - pt(abs(t_stat), df))
# 0

# Numerically stable calculation
2 * pt(abs(t_stat), df, lower.tail = FALSE)
# 4.76e-18

This suggests that the zero p-value results from numerical precision loss when calculating upper-tail probabilities, rather than an issue with the underlying regression.

Is this a known issue, and would it be more appropriate to address it with developers of multcomp?

Thanks for your help and for maintaining MaAsLin3!

Best wishes,
Daniel

Hi,

Do you need the exact value or is it fine to just treat it as “<2e^-16” (which I think is the R cut-off in this case)? Presumably the p-value is very very small and exactly how small shouldn’t affect subsequent analyses.

Will

Hi Will,

Yes, treating it as <2e-16 is fine. Thank you for clarifying!

Best,
Daniel