AIP and gallstones: Furthermore, even after adjusting for AIP, the relationship between dietary magnesium intake and gallstones remained statistically significant (P < 0.001), demonstrating a significant direct effect.