Hello! I am trying to do ancestral reconstruction under a split BiSSE model.
#phy is my tree nodes<-c(755,620,602,448,6,340) #vector of nodes at which to split the phylogeny nodes.i<-match(nodes,phy$node.label)+length(phy$tip.label) pars.b<-c(428.597, 90.777, 421.878, 81.815, 0.201, 2.900) #pars were taken from the non-split model pars.b.7<-rep(pars.b,7) sampling.f<-c(533/23077,705/9547) lik.split<-make.bisse.split(phy,states,nodes.i,sampling.f=sampling.f) fit.split<-find.mle(lik.split,pars.b.7,method="optim") All of that performs as expected, but when I try to perform ancestral reconstruction on my split model, I get this error: > asr.split<-asr.marginal(lik.split,coef(fit.split)) Error in check.pars.nonnegative(pars, 6) : Incorrect parameter length: expected 6, got 42 Why does it expect 6 parameters for my split model instead of the 42? Am I using the wrong function for the ancestral reconstruction, or is the code incorrect? The updates for version 0.9-1 of diversitree state that reconstruction under split models is availabe. It was also suggested to me that I could average the parameters from fit.split and do asr with an unsplit tree. Is this viable? Thank you for your time! -- View this message in context: http://r.789695.n4.nabble.com/Ancestral-state-reconstruction-under-a-split-tree-for-BiSSE-tp4669286.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.