# Maaslin2 for univariable analysis (one fixed-effect)

**URL:** <https://forum.biobakery.org/t/maaslin2-for-univariable-analysis-one-fixed-effect/2873>\
**Category:** MaAsLin\
**Created:** [December 7, 2021, 9:57am UTC](https://forum.biobakery.org/t/maaslin2-for-univariable-analysis-one-fixed-effect/2873 "2021-12-07T09:57:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![NicolasB](https://avatars.discourse-cdn.com/v4/letter/n/d78d45/32.png) [@NicolasB](https://forum.biobakery.org/u/NicolasB)\
**Post date:** [December 7, 2021, 9:57am UTC](https://forum.biobakery.org/t/maaslin2-for-univariable-analysis-one-fixed-effect/2873/1 "2021-12-07T09:57:04Z")

</div>

Hello,

I am using Maaslin2 for analysis with only one fixed effect (3 variables, 1 reference). Results are quite interesting and fit my hypothesis.  
However, as Maaslin2 is designed to perform multivariable analysis, do you think for only one categorical variable, this is still correct to use it ?  
Second: I am puzzled by the fact that, in opposition with what is usually seen in multivariable logistic regression model, you can still have variables associated with the parameter used as reference. Do you have any insight for this point ? Or maybe I miss something…

Thank you again for this very powerful and easy-to-use tool!

Best,

Nicolas

---

<div class="post-metadata">

**Author:** ![Kelsey\_Thompson](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/kelsey_thompson/32/65_2.png) [@Kelsey\_Thompson](https://forum.biobakery.org/u/Kelsey_Thompson)\
**Post date:** [December 10, 2021, 2:56pm UTC](https://forum.biobakery.org/t/maaslin2-for-univariable-analysis-one-fixed-effect/2873/2 "2021-12-10T14:56:28Z")

</div>

Hi @NicolasB,

Thank you for the question. I don’t think it’s wrong per se to run the tool with only one fixed effect, we designed the tool as is since we tend to have other variables we want to adjust for in human gut microbiome samples.

To your second question - that shouldn’t be the case, as you correctly state the reference should have no listed associations. Do any of your three variables have no associations? If so, MaAsLin may have incorrectly set that as the reference. Can you share the code you used to run MaAsLin?

Best,  
Kelsey

---

<div class="post-metadata">

**Author:** ![NicolasB](https://avatars.discourse-cdn.com/v4/letter/n/d78d45/32.png) [@NicolasB](https://forum.biobakery.org/u/NicolasB)\
**Post date:** [December 10, 2021, 3:11pm UTC](https://forum.biobakery.org/t/maaslin2-for-univariable-analysis-one-fixed-effect/2873/3 "2021-12-10T15:11:30Z")

</div>

Hi Kelsy,

Thank you very much for your response.  
Here is the code I used:

fit\_data\_NephroIgA\_clearCPLM\_NONE\_CKDasRef ← Maaslin2(  
input\_data=“feature-table-l7.tsv”, input\_metadata=“sampleMetadata\_NephroIgA\_All\_151121\_CKD\_Other.txt”, output=‘Maaslin2\_Nephro\_IgA\_CPLM\_NONE\_CKDasRef\_output’, transform = “NONE”,  
fixed\_effects = c(‘Group’),  
analysis\_method = “CPLM”,  
normalization = ‘NONE’,  
reference = ‘Group, CKD Other’,  
standardize = FALSE)

Thank you again for your input!

Best,

Nicolas

---

<div class="post-metadata">

**Author:** ![Kelsey\_Thompson](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/kelsey_thompson/32/65_2.png) [@Kelsey\_Thompson](https://forum.biobakery.org/u/Kelsey_Thompson)\
**Post date:** [December 13, 2021, 2:38pm UTC](https://forum.biobakery.org/t/maaslin2-for-univariable-analysis-one-fixed-effect/2873/4 "2021-12-13T14:38:09Z")

</div>

Hi @NicolasB,

Thanks for providing your code! As a first step - can you try adding a \_ in the `CKD Other` variable? That space might be throwing off the code. Additionally, when you re-run can you format it so that the reference call looks like this `reference = c("Group,CKD_Other"),`, with no space after the comma. Otherwise, that code looks okay to me.

If those small corrections do not seem to work can you send me a minimally reproducible example of this so I can test it out on our side? You can either attach it to a message here or email it to me.

Best,  
Kelsey

---

<div class="post-metadata">

**Author:** ![NicolasB](https://avatars.discourse-cdn.com/v4/letter/n/d78d45/32.png) [@NicolasB](https://forum.biobakery.org/u/NicolasB)\
**Post date:** [December 13, 2021, 8:49pm UTC](https://forum.biobakery.org/t/maaslin2-for-univariable-analysis-one-fixed-effect/2873/5 "2021-12-13T20:49:33Z")

</div>

Hi Kelsey,

Thank you very much! The correction you proposed solved my problem. Indeed, it was the space between CKD & Other that threw off the code.

Thank you !

Best,

Nicolas
