Recently I ran into the problem of specifying a multilevel model with varying intercepts that contain groups represented only by a single observation.
I specify the model like this:
brm(Response ~ Predictor + (1|Group), data = mydata)
Response and Predictor are continuous variables and Group is a factor with multiple levels. Some of the levels in Group only contain a single observation which results in the problem that the model’s chains do not converge. I since found out that this is related to how brms deals with varying intercepts: As far as I understand it, brms estimates the standard deviations of the varying intercepts and this seems to be part of the problem. When I remove those groups that only contain one observation, the model converges normally.
I tried replicating this problem in ‘rstanarm’ but it doesn’t appear to be a problem there. Whatever seems to be the issue here, it has to do with (1) single-observation group levels and (2) the specific way brms deals with varying effects.
Therefore my question: How would I need to specify the model or set the priors to solve this convergence issue?