# Nested factors in MaAsLin2

**URL:** https://forum.biobakery.org/t/nested-factors-in-maaslin2/6553
**Category:** MaAsLin
**Created:** [January 30, 2024, 9:17pm UTC](https://forum.biobakery.org/t/nested-factors-in-maaslin2/6553 "2024-01-30T21:17:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![matt-bakker](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/matt-bakker/32/2696_2.png) [@matt-bakker](https://forum.biobakery.org/u/matt-bakker)
#### Post date: [January 30, 2024, 9:17pm UTC](https://forum.biobakery.org/t/nested-factors-in-maaslin2/6553/1 "2024-01-30T21:17:53Z")

</div>

For the model in MaAsLin2, what is the syntax (if supported) for specifying nesting of one factor within another?  
E.g., in a field experiment that moved between years, blocks only exist within a given year.

---

<div class="post-metadata">

### Author: ![nearinj](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/nearinj/32/2135_2.png) [@nearinj](https://forum.biobakery.org/u/nearinj)
#### Post date: [February 5, 2024, 8:53pm UTC](https://forum.biobakery.org/t/nested-factors-in-maaslin2/6553/2 "2024-02-05T20:53:11Z")

</div>

Hi @matt-bakker

You could most likely support your nested experiment using random effects that match up with your study design. That being said there is currently no way of inputting specific “nested” variables other then using appropriately designed random effects.

Cheers,  
Jacob Nearing
