Grouping correlated random effects using (1|cor|gr(random effect, by = group)) is currently throwing the following error.

Chain 1: Rejecting initial value:

Chain 1: Error evaluating the log probability at the initial value.

Chain 1: Exception: poisson_log_lpmf: Log rate parameter[1] is nan, but must not be nan! (in

‘modelf3c2f4b3b47_c5d728f3d7cb11eab4bdaf4b6d4561d8’ at line 81)

I have attempted to specify various starting values and priors to no avail. Here is a minimally reproducible example on my machine. I uninstalled and reinstalled both rstan and brms beforehand.

df <- data.frame(y1 = sample(seq(1,100)),

y2 = sample(seq(1,100)),

re = rep(seq(1:20), each=5),

group = rep(c(1,2), each=50))

f1 <- bf(y1 ~ 1 + (1|cor|gr(re, by = group)) ) + poisson()

f2 <- bf(y2 ~ 1 + (1|cor|gr(re, by = group)) ) + poisson()

m <- brm( f1 + f2 + set_rescor(FALSE), data=df, chains=1)

Please also provide the following information in addition to your question:

- Operating System: Windows 10
- brms Version: Current development version 2.12.3