Please also provide the following information in addition to your question:
- Operating System: Mac OS High Sierra v10.13.6
- brms Version: 2.10.0
Hello again!
PROBLEM
While running my imputation multilevel model I have been receiving the error:
“Error: Can only combine group-level terms of the same grouping factors”.
MODEL
I am trying to model hormone values as the result of a series of demographic/social parameters in 2 primate species.
A simplified version of the model is:
brm(log_hormone ~ (1|q|Harem) * Species1Dummy + Species + Sex + Age)
Basically here is the issue: One of the species I am researching forms harems while the other does not. I wanted to include a random effect for harem membership since it is possible that some female hormone values may be the result of which harem they belong to; however, I was unsure how to do this considering that the other species does not even form this social grouping. It was suggested to me to include a dummy variable so that the harem effect would only be calculated for one of the species and ignored for the other.
However, I get the above error when I try to run this model.
Does anyone have a suggestion of how to circumvent this problem? I would prefer to do as much as possible in a single model rather than making multiple models, especially if that means I would have to reduce my sample size by half to focus on just the harem-forming species.
Thanks for the help!