I am interested in specifying correlation among random effects in brms. Suppose, for example, you have individuals that serve as both the subject (animal) expressing a single phenotype and an environment (foster) for other individuals expressing that same phenotype. You are interested to know whether individuals who express higher levels of a trait also elicit higher levels of that trait in the individuals that they foster-parent. Is there a way to directly estimate this covariance in brms?
For example, in MCMCglmm:
phenotype ~ 1, random=~str(animal + foster), rcov=~units
My second question is whether the above can be extended to a multiple membership model. I have a scenario with individuals who express a trait and who interact with multiple other individuals, and I am interested in the covariance between an individual’s expression and his (social) influence on others.
Thank you, I updated to brms 2.4.0. I have read both vignettes, but I do not see how to do what I describe. Here is an example below with the error message.
In this scenario, the same individuals show up in multiple grouping factors, and I am interested in the covariance/correlation between these effects. Ultimately, I would like to extend to a multiple membership model but I cannot see how to do this even in the simpler model below. Many thanks for any help you can provide.
I am sorry, I misunderstood what you were trying to do. Currently, it is not possible to model varying effects as correlated across grouping variables. Maybe I can implement this, though, I just need to think of it a little bit more.
As you will have read, multi-membership terms can be specified via the mm() function, but given that you are interested in specific correlation, I am not sure this will be of help.