Divergent transitions in phylogenetic model when sigma is near zero

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.


It seems this is similar problem as discussed by @betanalpha in one of his case studies https://betanalpha.github.io/assets/case_studies/underdetermined_linear_regression.html
from which I quote the relevant part

Unlike hierarchical models, the funnel manifests directly in the observational model and hence isn’t immediately amenable to reparameterizations. A prior incorporating additional domain expertise about the minimal reasonable scale for σ within a specific measurement process could cut off more of the funnel.