# Multiple variables used as the references

**URL:** <https://forum.biobakery.org/t/multiple-variables-used-as-the-references/2854>\
**Category:** MaAsLin\
**Created:** [November 30, 2021, 1:52pm UTC](https://forum.biobakery.org/t/multiple-variables-used-as-the-references/2854 "2021-11-30T13:52:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Jennifer\_Berkowitz](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/jennifer_berkowitz/32/1392_2.png) [@Jennifer\_Berkowitz](https://forum.biobakery.org/u/Jennifer_Berkowitz)\
**Post date:** [April 17, 2022, 10:53pm UTC](https://forum.biobakery.org/t/multiple-variables-used-as-the-references/2854/4 "2022-04-17T22:53:03Z")

</div>

Hi Kelsey,

I tried doing that and keep getting the same error. What am I missing? Here’s my code:

metadat.sub$Treatmentmod= factor(metadat.sub$Treatment,  
levels = c(“Bare”, “Mustard”, “Radish”))

fit\_data = Maaslin2(  
input\_data = otus.r,  
input\_metadata = metadat.sub,  
output = “16S\_output.trt”,  
fixed\_effects = c(“Treatmentmod”),  
reference = c(“Bare”,“Mustard”,“Radish”))

It keeps returning this error:

Error in Maaslin2(input\_data = otus.r, input\_metadata = metadat.sub, output = “16S\_output.trt”, :  
Please provide the reference for the variable ‘Treatmentmod’ which includes more than 2 levels: Bare, Radish, Mustard.

---

_[View the full topic](https://forum.biobakery.org/t/multiple-variables-used-as-the-references/2854)._
