# Modelling long data with multiple groups

**URL:** <https://discourse.pymc.io/t/modelling-long-data-with-multiple-groups/13870>\
**Category:** General\
**Created:** [February 23, 2024, 4:00pm UTC](https://discourse.pymc.io/t/modelling-long-data-with-multiple-groups/13870 "2024-02-23T16:00:03Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![thomasaarholt](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/thomasaarholt/32/4350_2.png) [@thomasaarholt](https://discourse.pymc.io/u/thomasaarholt)\
**Post date:** [February 24, 2024, 8:05am UTC](https://discourse.pymc.io/t/modelling-long-data-with-multiple-groups/13870/3 "2024-02-24T08:05:50Z")

</div>

Fantastic!

I really appreciate your quality of life tips! I’m really excited to try this now!

Last night I was thinking about how if I dotted `b_fourier_monthly @ fourier.T` (without indexing into `b_fourier_monthly` first), I would have shape `[2, 732]`. I would then want to index it with something in order to match the 732 long `observed`. I saw [this comment of yours about multiindex](https://discourse.pymc.io/t/pymc-arviz-how-to-make-the-most-of-labeled-coords-and-dims-in-pymc-4-0/9581/6). I wonder if that could have helped me here. If the multiindex had been ordered `groups, date`, then I think I might have been able to index with that directly. But I’m on thin ice here.

---

_[View the full topic](https://discourse.pymc.io/t/modelling-long-data-with-multiple-groups/13870)._
