Study Confounder Specification in MaAsLin2

Dear MaAsLin2 Team,

Thank you for developing and maintaining MaAsLin2—it’s an invaluable tool for microbiome data analysis.

I have a question regarding the specification of a study confounder in the model formula. Should a study confounder be included as a fixed effect, a random effect, or could both approaches be valid depending on the context?

I would appreciate any guidance on best practices for selecting the appropriate model structure.

Thank you in advance for your time and assistance.

Hi,

It depends what kind of confounder you have. In general, if the study confounder is some sort of categorical variable that groups the samples but that you don’t care about interpreting (person ID when you have repeated samples, enrollment site if there are multiple hospitals, etc.), you should use a random effect. For everything else, fixed effects are better.

Will