0
我似乎無法看到我錯誤的地方。我現在用的是包phylolm做一些迴歸與進化數據數據中的行數與phyloglm中樹中的提示數量不匹配
我的模型沒有運行,返回錯誤:錯誤phyloglm(testVar ~ ...the number of rows in the data does not match the number of tips in the tree.
我所做的一切檢查,但在我的樹的種類和那些在我數據是匹配的。 我的代碼是
diet<-read.csv("dat.csv",h=T,dec = ".")
phy=read.nexus("ConsTree.tre")# the phylogenetic data
keep.spp<-levels(diet$ScientificName)
phylo<-drop.tip(phy,phy$tip.label[-match(keep.spp, phy$tip.label)])
setdiff(phylo$tip.label,diet$ScientificName)# this confirms that all is OK
t1<-phyloglm(testVar~Var1+Var2+Var3, diet, phylo)
t1<-phyloglm(testVar~Var1+Var2+Var3, diet, phylo,
method = c("logistic_MPLE","logistic_IG10","poisson_GEE"),
btol = 10, log.alpha.bound = 4,
start.beta=NULL, start.alpha=NULL,
boot = 0, full.matrix = TRUE)
#
Error in phyloglm(testVar~Var1+Var2+Var3,..the number of rows in the data does not match the number of tips in the tree.
任何人都可以指出我錯在哪裏?