I’m still fairly new to brms and Bayesian statistics. My question is about intercept-slope correlations as well as slope-slope correlations in brms. I repeatedly measured activity levels and risk-taking behaviour in animals over 8 experimental days. A simplified version of my dataset is as follows:
ID MASS DAY ACTIVITY RISK 1 0.7 1 25 41 2 0.9 1 106 22 3 0.6 1 81 37 1 0.7 2 41 68 2 0.9 2 93 36 3 0.6 2 57 11
I am interested in:
- Seeing if more active individuals are more “behaviourally plastic” (i.e. have steeper slopes) than less active individuals.
- Whether individuals that are more “behaviourally plastic” (i.e. have steeper slopes) in their activity are also more behaviourally plastic in their risk-taking behaviour.
I have set my model out as follows:
ACTIVITY <- bf(ACTIVITY ~ MASS + DAY + (DAY|a|ID) , family = gaussian) RISK <- bf(RISK ~ MASS + DAY + (DAY|a|ID) , family = gaussian) Model<- brm(ACTIVITY + RISK + set_rescor(FALSE), data = dat, cores = 4, chains = 4, warmup = 1000, iter = 10000)
In the output for this model I get an intercept slope correlation (i.e. cor(ACTIVITY_Intercept,ACTIVITY_DAY)). However, as I understand it, the correlation provided is the rank correlation between individual differences from the average population intercept and the average population slope (i.e. this takes into account both the magnitude AND direction of the slopes). However, I am interested in the correlation between the intercept and the slope magnitude (i.e. do more active individuals have steeper slopes, regardless of direction, than less active individuals). So essentially what I’m looking for is a relationship between the intercept and the absolute value of the slope. Is there any way to estimate this relationship from the model?
Similarly, in regards to my second question, I get a slope-slope correlation from the model output (i.e. cor(ACTIVITY_DAY, RISK_DAY)). Again, if I understand this correctly, this describes whether the rank order of slopes is maintained between the two behaviours. I’m also wondering if there is anyway to estimate the correlation between the absolute magnitude of individuals’ slopes across the two behaviours, so that I can determine whether individuals that are more “behaviourally plastic” in one behaviour are also more “behaviourally plastic” in another behaviour.
Any help would be greatly appreciated!
Thanks in advance.