I’m building an individual customer level model using brms. A key factor that distinguishes each customer is a “frequency of purchase” from the previous 3 months. There are 4 groups: high, medium, low, and sporadic. The group membership also determines how many emails each customer gets the next month ( high gets 12, medium 8, low, 4, and sporadic get 2.
I had already built a mixed model where the impact of emails to these customer was assessed as a varying coefficient (“random”) at each of the four levels. Each customer’s behavior is recorded for every day of the month such that each customer has 30 data points.
I need help specifying informative priors for the individual level email coefficient such that the “high” group coefficient acts as the prior for all customers within the high group and the medium group coefficient as the prior for those in the medium group and so on.
Specifying reasonable informative priors is very hard and needs a lot of subject matter knowledge, which I don’t have. This would only work with detailed correspondance between you and me about the details of your data and model for which I currently don’t have time for I am afraid.
We are actively working on better tools to help users specifying informative priors based on the subject matter knowledge but they are not ready yet.
I think this kind of happens automatically, right?
Like, with the regression:
y ~ (1 | group) + (1 | individual)
By default the priors on those terms are zero centered.
If the output is normal, the mean of any individual e-mail’s output or whatever will be the sum of a grouping term and an individual term.
I think you still want the prior on that individual term to be zero centered. Any group level effect will be (hopefully) absorbed in the group term and will show up in the total effects for each individual. Hopefully “total effects” doesn’t have a technical meaning beyond “sum of effects for an individual” (which is how I’m using it here).
@bbbales2 thanks Ben for your detailed note. The output is normal and hence you are right - the “Overall” effect is the sum of the group (fixed) + the individual (random) coefficients. @paul.buerkner Right now I can specify a informative prior on the overall impact of the variable but not a segment level (via brms). What I will do is share my syntax here so you have better sense for what I’m looking for. Given my short experience with all things Bayesian, I want to make sure that I’m not misrepresenting what I need help with.
For me it’s sometimes helpful to write out the statistics formulas with indexes and stuff, so it’s explicit what needs are prior and whatnot. I don’t have enough experience with the lme4 syntax to always immediately parse the models.
Like:
\mu_g \sim N(0, \tau)\\
y_i \sim N(\mu_g, \sigma)
And so we can talk about the prior on \mu_g explicitly and see what that means in terms of hyperparameters (\tau and whatnot)