Hi Stan Experts,
I am working on a customer sales data where, sales(continuous in nature) is my dependent variable and different marketing channels activity as independent variable. I am trying to estimate the coefficients of each channel to get the effect from each of them.
Additionally, based on the behavior of each of the customer, each customer can be categorised in either tier1, tier2, tier3 or tier4. Before looking the data, I know the sales from customers from different groups are not exchangeble in nature and there is a clear distinction in sales behavior of customers from different tiers.
Hence, I have randomized my model at tier level. Below is my modeling function
bmod1 <- brm(Sales ~ Comp + FTO + CPL + SPL + CC + ENG + IMP + PSO+ (1|tier)+ (0+FTO|tier) + (0+Comp|tier)+(0+SPL|decile)+(0+CC|tier) + (0+ENG|tier) + (0+IMP|tier) +(0+PSO|tier) , data = mdb_14, family = gaussian(),prior=prior2, warmup = 1000, iter = 5000, chains = 4, control = list(adapt_delta = 0.98), seed=150, thin=2, cores = parallel::detectCores() )
Furthermore, I have results(both group level and population level coefficients) from previous year’s random effect regression model(not bayesian) and I am planning to use those results as priors to my current year model.
I need some help with setting up the priors. Right now I have specified priors at population level as:
prior2 <- c( prior(normal(0.001,0.28), class = Intercept), prior(normal(-1.14,0.23), class = b, coef = Comp), prior(normal(0.24,0.18), class = b, coef = FTO), prior(normal(0.25,0.005), class = b, coef = CPL), prior(normal(0.0585,0.0022), class = b, coef = SPL), prior(normal(0.31,0.006), class = b, coef = CC), prior(normal(0.0370,0.0080), class = b, coef = ENG), prior(normal(0.55,0.02), class = b, coef = IMP), prior(normal(0.2,0.02), class = b, coef = PSO), prior(cauchy(0,10), class = sigma) )
However, as mentioned in Bayesian Data Analysis, by Andrew Gelman, we can only provide a common prior if there is group level exchangebility present among groups, which is clearly not true in my case as different groups have different behaviors.
I want to know how can I provide group level priors to my model. For e.g.
Prior : FTO_tier1 = normal(0.24,0.18)
Prior : FTO_tier2 = normal(0.34,0.2)
Prior : FTO_tier3 = normal(0.45,0.01)
Prior : FTO_tier4 = normal(0.8,0.1)
Does brm function allow us to provide group level priors?
Please let me know if you would need additional details. Thanks in advance for your help :)