rannalandyang {phybase}R Documentation

Rannala and Yang's formula

Description

This function calculates the likelihood of a vector of gene trees given the species tree using the Rannala and Yang's formula

Usage

rannalandyang(gtree, stree, taxaname,spname,species.structure)

Arguments

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

Details

~~ If necessary, more details than the description above ~~

Value

The function returns the log likelihood score.

Author(s)

Liang Liu

References

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.

Examples

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)

[Package phybase version 1.1 Index]