Stan_glm equivalent in Python

259 Views Asked by At

I am trying build Market Mix Modeling (MMM) using a bayesian regression. My dependent variable is "Sales_Units", and My predictors are x1, x2, x3, x4 I also have prior information for the 4 predictors.

The bayesian regression model built in R as follows:

my_model_2022 <- stan_glm(Sales_Units ~ x1 + x2 + x3 + x4 + x5, prior= normal (c (0.4, 0.1, 1.0, 1.2), c (0.01, 0.01, 0.2, 0.3) ), data=Mydata)

My question is: How do I replicate the above model in Python, and which package should I use; PyMC3 or PyStan, Bambi? And how do I specify the priors within the model?

Thanks!

0

There are 0 best solutions below