bambinos / bambi

BAyesian Model-Building Interface (Bambi) in Python.
https://bambinos.github.io/bambi/
MIT License
1.08k stars 124 forks source link

Multimembership random effects #569

Open vascosa opened 2 years ago

vascosa commented 2 years ago

Hello,

I was wondering if there is any support for multi membership random effects within bambi (similar to what mm() in brms). I am working with a dataset in which each value belongs to two subjects. In brms I would do y ~ mm(1|Subj1, Subj2) .

Is there any way to do this in bambi, or a workaround you could suggest?

Cheers, Vasco

tomicapretto commented 2 years ago

Honestly, I have no idea.

Maybe @aloctavodia know where to point for a good resource.

aloctavodia commented 2 years ago

Sorry, also not idea.

As a workaroud @vascosa Can you reorder the dataset?

From this

val0, Subj1, Subj2
val1, Subj1, Subj2
...

to this?

val0, Subj1
val0, Subj2
val1, Subj1
val1, Subj2
...

Would that be equivalent?