0

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!

Frank B
  • 1
  • 1
  • You can use bambi to use this formula syntax in python: https://bambinos.github.io/bambi/main/index.html – OriolAbril May 28 '22 at 02:05
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community May 28 '22 at 04:50
  • Thank you @OriolAbril for the answer. How do I specify the priors for more than one variables in BAMBI? – Frank B Jun 10 '22 at 04:12
  • I think using multiple keys in the dictionary similar to https://bambinos.github.io/bambi/main/notebooks/getting_started.html#Specifying-priors – OriolAbril Jun 10 '22 at 08:39

0 Answers0