I am interested in examining the random effects used when performing prediction on new data using a multilevel model in brms.
I understand that using allow_new_levels=TRUE
and specifying re_formula
to NULL (or including random effects) will yield predictions that account for the random/group level effects. I also see that sample_new_levels
can be set to choose the method used to estimate the group level effects.
What I haven’t been able to figure out is whether there is a convenient way to examine the group effects themselves that were used to sample the predictive distribution for the new levels. From what I can tell, such group effects are simulated, but the prediction functions only output the final prediction, and don’t provide an easy way to access the estimates of coefficients for the new grouping levels.