rannalandyang {phybase} | R Documentation |
This function calculates the likelihood of a vector of gene trees given the species tree using the Rannala and Yang's formula
rannalandyang(gtree, stree, taxaname,spname,species.structure)
gtree |
a collection of gene trees |
stree |
a species tree in newick format |
taxaname |
the names of taxa |
spname |
the names of species |
species.structure |
define which sequence belong to which species |
~~ If necessary, more details than the description above ~~
The function returns the log likelihood score.
Liang Liu
Rannala, B. and Z. Yang. 2003. Bayes estimation of species divergence times and ancestral population sizes using DNA sequences from multiple loci. Genetics 164: 1645-1656.
gtree<-"(((A:1,B:1):3,C:4):2,D:6);" stree<-"(((A:0.5,B:0.5):1#0.1,C:1.5):1#0.1,D:2.5)#0.1;" taxaname<-c("A","B","C","D") spname<-taxaname ntax<-length(taxaname) nspecies<-length(spname) species.structure<-matrix(0,nrow=nspecies,ncol=ntax) diag(species.structure)<-1 rannalandyang(gtree,stree,taxaname,spname,species.structure)