I'm currently trying to fit a Bayesian multilevel model using rstanarm. I expect - and there's evidence in literature - that the coefficient of my main predictor lies between 0.15 and 0.65. Therefore, I'd like to set an informative prior but only for this variable and keeping the weakly informative default for the others. Up to now I have:
stan_glmer(isei_r ~ 1 + maxisei_cntr + agea + as.factor(gender) + as.factor(emp_status) + (1 + maxisei_cntr | country),
data = ess,
seed = 349,
prior = normal(0.40, 0.25, autoscale=F))
But in this way it applies the informative prior to all my covariates. Is it possible to specify an informative prior only for one predictor?
Thanks
Here is what I use to automate this process:
Now, define a helper function, which can be put elsewhere:
And use it to create the priors vector: