Dear all,

I am trying to predict the sales of different SKU by using a log-log model. However, I should also capture the heterogeneity among the different brands (I would like to have a different price elasticity coefficient for each different brand). When I run the model without random effect term it takes less than 10 minutes. After including the random effect term it takes more than 8-9 hours to finish. The problem is that I have to include more (random effect) terms so I cannot imagine how worse it will be. Am I doing something wrong? Here is the formula I used:

brm(formula = log(npack) ~ (log1p(sales_price_pack)|brand) + log1p(wd) + log1p(wd_disp),cores=parallel::detectCores() , chains = 2, warmup = 500, data = temp)

Should I try to define a more restrictive prior for the price since we know that the coefficient has to be negative?