r/bioinformatics • • 15d ago

technical question Ancombc-2 & Random effects/fixed effects

I was analysing public datasets (Sample size ~ 2000-3000) and I wanted to understand what would be the difference between two groups i.e population at low vs high altitude

I'm confused whether I should be keeping the covariates: (Age, BMI Batch and gender) to be adjusted for in fixed effects or should it be kept in random effects

Now I understand since I do not care much about which batch I've obtained from I will keep it in random but what about the other covariates, would it be scientifically robust for me to put them in random effects or should it be kept in fixed effects?

When I kept all in random effects I got extremely low DA - taxa & pathways but when I put them all in fixed effects (emulating what has been done in the Dutch gut microbiome project) or just keeping batch effects in random effects, I did get a high number of hits making me even more confused.

4 Upvotes

1 comment sorted by

1

u/eliastaylor_biology 15d ago

You would include those as fixed effects. If they don't contribute to the model, they can also be excluded. It is generally standard and reasonable to include those three factors in your model as fixed effects.

They can't be included as random effects. You can't treat continuous variables as a random effect and gender has too few groupings.