How can I specify an informative prior for a stan_lmer multilevel model in rstanarm?

201 views Asked by At

I'm creating a Bayesian multilevel model in rstanarm to predict satisfaction by party identity in each year (using year as the second level), with demographic controls. (I'm new to rstanarm so my syntax may be off). The formula is:

stanmodel_levels <- stan_lmer(nhssat ~ 0 + partyid + age_category + marital_status + class  + region +  ethnic_minority + (0 + partyid_new | year), data = df, iter = 2200, chains = 4, seed = 1, adapt_delta = 0.999, QR = FALSE)

The response variable 'nhssat' is on a 5-point Likert scale. Because I am removing the intercepts in order to predict actual levels of satisfaction (i.e. 3.5), my prior is that the coefficients will be close to 3 and definitely not be higher than 5 and lower than 1.

I am having trouble understanding the vignettes about specifying the priors given that this is a multilevel model. What code do I need to use to specify a more accurate prior given the Likert nature of the response variable?

0

There are 0 answers