Dear Bayesians,
on my path to learn modelling in the Bayesian way, I found the usage of Bambi very helpful so far to get quick results and change models quickly.
Unavoidably, this finally leads to specific questions about the formula syntax, which led me to search for a detailed specification of this syntax.
As far as I understood, this syntax is closely related to the patsy syntax, but I am actually not sure if it is identical or if there are modifications or extensions on the Bambi side.
Is there any link to a detailed specification of this formula syntax available?
Or is the patsy documentation just enough and complete?
Best regards
Matthias
1 Like
I should add that according to “Bambi: A Simple Interface for Fitting Bayesian Linear Models in Python” it looks like the Patsy syntax has been modified for Bambi.
So it seems like the formulae library is the basis for the Bambi formula syntax, is that right?
1 Like
Additionally found this page on the Wilkinson notation which seems to be the foundation of the formulae package?!
And here is a YT video on this notation.
Bambi uses it’s own patsy-like package, called formulae. Information can be found on the project page.
1 Like
This is correct. We have written our own package because we wanted to have the pipe |
operator, which is used to specify mixed-effects models. I think the content of the video is helpful, but you can also consult our examples Examples – Bambi and anything related to the R packages lme4 and brms. I can’t say there’s a 100% compatibility, but all of us use the same building blocks +
, :
, *
, and |
, with the same semantics.
2 Likes