Hi,
Nice to see a fellow mammalogists on here! Scotinomys are super cool.
I’m nowhere near as knowledgeable as most of the people posting on this thread, and I don’t know much about the quantitative genetics side of this research, but I have fit a lot of phylogenetic multilevel models in brms
, some with smaller sample sizes that you have (that’s often the best we can do in non-model systems). Looking at you priors and results I can pick up one one pattern I’ve regularly seen in my own models.
First, these phylo or animal models are often really hard to fit, mostly because of an identifiability issue between the sigma
of a variable and the sd(Intercept)
from the relationship correlation matrix. The brms
phylogenetics vignette uses a nice example where this is not an issue. I have yet to find an empirical dataset that performs without any issues like this tarsus/back example.
I can see that the sigma value on your Resp2 and the sd(Resp2_Intercept)
are not jiving. I’m guessing what is happening is that they are finding nice optima, but occasionally the chains are jumping up (or down) and crossing to the optima of the other variable. You should be able to clearly see this in your chain plots using plot(model)
. So your sd(Intercept)Resp2
posterior may have a nice peak around 0.4, and your sigma_Resp2
a peak around 0.9, but occasionally sigma plummets towards 0.4 and simultaneously sd jumps up towards 0.9, then everything goes back to “normal.” I bet this is the source of your divergent transitions.
A similar problem may happen if you fit this model using frequentist tools, except you may never know about it! One school of thought that I have picked up on in this forum and also reading (and re-reading) McElreath’s Statistical Rethinking is that regularizing priors are a good way to test for and deal with these issues. My way to diagnose and sometimes deal with this particular low ESS/Divergent transition issue would be try setting the sigma Resp2 prior to something like normal(1, 0.2)
and the sd Intercept Resp2 prior to normal(0, 0.2)
or otherwise nudge one of them to be lower and one of them to be higher. This should discourage this identifiability issue you are having.
In my experience, using highly regularizing priors on the phylo/animal group-level parameter can help boost ESS and eliminate divergent transitions, but typically population-level effects and rescor values don’t really change much following these adjustments. So if you are getting confusing correlation outputs, this may or may not help those. Seeing lkj(20)
definitely caught my attention though! Maybe you can play around with correlation priors once you work on that sigma
/sd
issue. Also, though some may disagree, I wouldn’t be shy to fit tighter priors throughout all your brms
models. One big reason I switched to brms
from MCMCglmm
is the transparency of the priors (for a non-statistician like me) and the ease of adjusting them. If all variables are mean centered and scaled to unity, I typically start with a normal(0,1)
on all my population-level effects. Good luck!