I am having issues using the
predict.brmsfit function when I have new random effect levels. I have a nested random effect structure of
(1|Region/Species). From the R documentation, I have tried setting
allow_new_levels=TRUE as well as
re_formula=NA however, in both cases I get the following error:
Error: New factor levels are not allowed. followed by a list of all of contained species incorporated in the analysis.
I have tried to troubleshoot this and I have found if I remove the nestedness and re-fit the model with only
(1|Species) setting either
allow_new_levels = TRUE or
re_formula=NA results in a normal
Is there something else I need to specify in order for this to work with my nested structure?
Thanks in advance - Liam
Please also provide the following information in addition to your question:
- Operating System: Mac OS High Sierra
- brms Version: 2.31