Dear friends,
I have a model of this type:
response ~ pred + (1 | participant) + (1 | item)
pred = {level1, level2, level3} [ref level underscored]
I’m using brms. I’d like to put different priors on the three levels of pred. Suppose these are the priors:
intercept (level1): N ~ (1,1)
effect of level2 relative to level1: N ~ (0,1)
effect of level3 relative to level1: N ~ (-1,1)
I think I know how to set up the prior for level1; what I’m having trouble with is setting up the two different priors for level2 and level3. With my limited brms skills, this is the closest that I can get:
prior1 <- c(
prior(normal(1, 1), class = Intercept), # level1
prior(normal(0, 1), class = b, coef = weight) # prior for level 2, but specified as if there is no level3
)
As you can see, I don’t know what to do with level3.
Apparently, it is possible to do this in Stan. (Unfortunately, I’m not proficient with Stan.) I’ve found the following code somewhere:
// prior specifications
b[1] ~ normal (0, 1);
b[2] ~ normal (-1, 1);
temp_Intercept ~ normal (1, 1)
In short, could someone possibly show me how to modify my brms code above so that I can set up separate priors for level2 and level3?
I’d be extremely grateful for any help with this.