Hi,
I am trying to fit a phylogenetic regression using brms but it seems that the model can’t find the tree even though everything else works file.
I get the error “Error: The following variables can neither be found in ‘data’ nor in ‘data2’:
‘phylo’”
Any help is greatly appreciated
#import Data
root.high<-read.csv(file="Data/roothigh.data.csv")
phylo <- ape::read.tree(file = "Data/Phylogeny/Tree2.txt")
[Tree2.txt|attachment](upload://xFYGBeg4tOebVn9pEA0ZLlupumG.txt) (924 Bytes)
A <- ape::vcv.phylo(phylo,corr = FALSE)
library(brms)
model_simple <- brm(
Number.of.Root.Tips ~ Treatment + (1|gr(phylo, cov = A)),
data = root.high,
family = gaussian(),
data2 = list(A = A))
roothigh.data.csv (3.5 KB)
Tree2.txt (924 Bytes)