I have fitted a model in brms as:
fmla <- bf(y ~ 0 + Intercept +
Condition +
(1 + Condition|Group/ID)
where Condition has 9 levels and Group has 3 levels.
I would like to calculate the correlation between Conditions for each level of group.
Using get_variables()
from tidybayes
, I see parameters in the form:
cor_Group__Intercept__Condition2
cor_Group__Condition2__Condition3
cor_Group__Intercept__Condition3
cor_Group__Condition3__Condition4
...
r_Group[1,Intercept]
r_Group[2,Intercept]
r_Group[3,Intercept]
r_Group[1,Condition2]
r_Group[2,Condition2]
r_Group[3,Condition2]
r_Group[1,Condition3]
r_Group[2,Condition3]
r_Group[3,Condition3]
...
Can I calculate per-Group correlations from these estimates?
Or do I need to specify the model differently to get a direct estimate correlations between conditions for each level of Group?
Perhaps as:
fmla <- bf(y ~ 0 + Intercept +
Condition +
(1 + Condition:Group|ID)
?