Hello, I’m trying to fit a phylogenetic multilevel model in brms but am having trouble with divergent transitions.
I’m using a gaussian family and it looks like the divergent transitions are occurring when the sigma parameter for the gaussian is near zero.
At first take, this appears to be analogous to Neal’s funnel for hierarchical terms, and I’m wondering how I should tackle the problem, and whether there is a way to do a re-parameterization within brms (though I’m happy to modify the Stan code if need be).
This is the model, and I’ve already tried setting adapt_delta to 0.99:
fit_MPD <- brm(MPD ~ fracExtinct + cladeAge + cladeSize +
MeanAdultMass + (1|Family),
dat=f, family="gaussian",
iter=3000, cov_ranef = list(Family = fam_phy_cov),
control=list(adapt_delta=0.99, max_treedepth=12))
and I visualize the divergent transitions using mcmcpairs from bayesplot:
A likely culprit is that I only have 22 observations (taxonomic families), and one observation per family, so most of the variation seems to be taken up by the sd_Family_intercept term, with the lower level gaussian errors estimated as being close to zero.
Any advice on how to improve sampling for sigma near zero? I’ve tried upping adapt_delta, and playing with priors, but to no avail.