# Creating a multivariable regressor with multiple groups

**URL:** <https://discourse.pymc.io/t/creating-a-multivariable-regressor-with-multiple-groups/2150>\
**Category:** Questions\
**Created:** [November 6, 2018, 2:52am UTC](https://discourse.pymc.io/t/creating-a-multivariable-regressor-with-multiple-groups/2150 "2018-11-06T02:52:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![junpenglao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/junpenglao/32/8_2.png) [@junpenglao](https://discourse.pymc.io/u/junpenglao)\
**Post date:** [November 6, 2018, 6:07am UTC](https://discourse.pymc.io/t/creating-a-multivariable-regressor-with-multiple-groups/2150/2 "2018-11-06T06:07:44Z")

</div>

Generally these kind of question could be expressed as a mixed effect model. You can have a look at this post: [Constructing the random effects model matrix Z](https://discourse.pymc.io/t/constructing-the-random-effects-model-matrix-z/1066). @Jack_Caster’s repository [https://github.com/JackCaster/GLM\_with\_PyMC3](https://github.com/JackCaster/GLM_with_PyMC3) is pretty great.

---

_[View the full topic](https://discourse.pymc.io/t/creating-a-multivariable-regressor-with-multiple-groups/2150)._
