95% confidence interval of coef - MaAsLin2

Hi there,

I have coef values from the MaAsLin2 output and wondering how to calculate the 95% confidence interval of them. Some of my q-values are just above 0.05 for certain taxa, but it looks like their CI range would not include 0.

Would it simply be CI (95%) = coef +/- 1.96*std error?

Many thanks!

Sam

1 Like

Hi Sam,

Yes - that would be the confidence interval, but note that that confidence interval isn’t corrected for multiple hypothesis testing. The q-value is above 0.05 despite a CI not including 0 because the q-value corrects for multiple hypothesis testing whereas the CI doesn’t. (There are ways to do multiple hypothesis corrected CIs, but you can probably find better material online than I can explain here.)

Will

1 Like

Thanks Will,

Another question I had was regarding the data type in the metadata used by MaAsLin2.

My metadata is essentially a factorial table with each sample (rows) assigned with variables that have integers (-1, for low conc of a variable and +1 for high conc). Is it fine for MaAsLin2 to use integer levels rather than factors to do the multiple regression? The coef values I get from the model output are around half of that when doing the coef calculations manually using the fitted values. I think this is because the model coef is just for 1 unit difference, whereas when done manually with the fitted values I’m calculating the log-fold difference over 2 units between -1 and +1.

Would you recommend converting the integers to factors and running the analysis on categories?

Thanks,

Sam

Yes - I think you’re correct that the coefficients are half the size because the metadata difference you’re putting in is “2”. If you have categorial variables, it’s standard (and probably more interpretable) to just use 0 and 1.