How to calculate phylogenetic signal for a varying slopes model?

Short summary of the problem
I would like to know how to calculate the phylogenetic signal for models with varying slopes and intercepts. Following from

If I have a Phylogenetic Model with repeated Measurements, but also with varying slopes (below), how does it affect the formula for hypothesis() given in the original example?

model_repeat1 <- brm(
  phen ~ cofactor1*cofactor2 + (1|gr(phylo, cov = A)) + (1+cofactor1+cofactor2|species),
  data = data_repeat,
  family = gaussian(),
  data2 = list(A = A),
  prior = c(
    prior(normal(0,10), "b"),
    prior(normal(0,50), "Intercept"),
    prior(student_t(3,0,20), "sd"),
    prior(student_t(3,0,20), "sigma")
  sample_prior = TRUE, chains = 2, cores = 2,
  iter = 4000, warmup = 1000


  • Operating System: Windows 11 (64-bit operating system)
  • brms Version: 2.20.1

Hey, just curious to know what you finally did (I had a different issue).

My impression based on this paper is that you should be dividing the variance explained by phylogeny by all other contributors of variance (incl. sigma, if present). This is your phylogenetic “signal”. It is also equivalent to Pagel’s lambda (see)

It is a bit unfortunate that there aren’t too many resources or examples of what others have done in this field. In more complicated models such as distributional models or other non-Gaussian distributions, things aren’t as simple as in the vignette.

For further reading: phylogenetic mixed model