I am trying to provide a prior for my phylogeny in a brms model. I model the phylogeny following vignette(“brms_phylogenetics”) code bellow:
A <-ape::vcv.phylo(my_tree)
model <- brm(
binary_variable ~ 1 + covariate + (1 | dataset) + (1 | gr(taxo, cov = A)),
data = data,
family = bernoulli(),
data2 = list(A=A)
)
I have read in the literature and seen the recommendations for an LKJ prior on correlation matrices though I do not fully understand how to apply it to a covariance matrix. I believe the lkj prior is only appropriate for class “cor” which is not applicable in this model.
If there is any advice on how to add a prior for the phylogenetic covariance matrix that would be really helpful. At present I think I may have to convert A into a correlation matrix, perhaps using a cholesky decomposition but then I do not know how to incorporate this into the model.
Any advice v.appreciated
Thanks,
Tom