Operating System: RHEL7
Interface Version: 2.15.3
Compiler/Toolkit: gcc 4.6
Hi!
I am struggling with the decov prior for a random effects intercept + slope model. My situation is that I have multiple (exchangable) studies which do measure a control and trt group. I intend to fit a random effects model for this which I do with:
rate <- 1.5
stan_glmer(event ~ 1 + trt + (1+trt|study), offset=log(n*duration_y),
family=poisson, data=qaw_1to5l,
prior_intercept=normal(log(1/5), 2, autoscale=FALSE),
prior=normal(0, 1, autoscale=FALSE),
prior_covariance=decov(1,1,1,1/rate))
What is not clear to me from the documentation of decov is how I can specify different rates for the two random effects. I mean, it is possible to discriminate between the (fixed effect) prior on the intercept and on the treatment effect (which makes sense), but for a correlated intercept+slope random effect I do not see a possibility to put different priors on the between-study standard deviation $\tau$. The only possible way to do this is to split things apart like
stan_glmer(event ~ 1 + trt + (1|study) + (0+trt|study), offset=log(n*duration_y),
family=poisson, data=qaw_1to5l,
prior_intercept=normal(log(1/5), 2, autoscale=FALSE),
prior=normal(0, 1, autoscale=FALSE),
prior_covariance=decov(1,1,1,c(1/rate1, 1/rate2)))
However, this is not what I want as I would like to account for the correlations.
The only way I see out of this misery is to scale “trt” such that I would expect it to have the same prior as the intercept. That can be done, but seems not like a straighforward way.
I hope I missed something and this is easier to solve.
Thanks!
Best,
Sebastian