I am having a go at rstanarm because a collaborator of mine wants to avoid using Stan scripts. This is my first go at this, so please forgive my naivety. Suppose I have a model that estimates separate slopes for each different groups for the effect of an independent variable (‘lag’) on a dependent variable (‘value’). I can fit this by variational Bayes using the following,
fit_ppool <- stan_glmer(value ~ (lag|group),data=example,algorithm=“meanfield”,prior = normal(0,1))
I want to check a few things about this. First, does prior ~ normal(0,1) mean that the ‘population-level’ slope (a hyper-parameter) has a normal(0,1) prior? In other words, is the structure of the model,
beta_i ~ normal(beta_top,sigma_top);
beta_top ~ normal(0,1);
where i indicates group. Also, if this is the case, then how do I set a prior on sigma_top?
Second, is there a way to obtain estimates of beta_top through rstanarm? At the moment, I seem able to estimate the group level parameters, but can’t find population-level ones…
Best,
Ben