This function calculates the joint distribution array for K matched sequences.
gn(theta, merge2)
Arguments
theta: a vector of variables containing the following parameters in this order--1. the first three parameters from πX vector, 2. the first three parameters from πY vector, 3. the first three parameters from f0 vector, 4. the six off-diagonal free parameters in the S matrix, 5. a scalar ρ, 6. a vector of lengths containing K-2 values
merge2: (K-1) x 2 matrix describing the tree topology
Details
This function calculates the joint distribution array for a tree with K matched sequences. it uses the following functions-- Pt, Fmatrix and Smatrix.
Returns
A 4K array containing the joint distribution for the K edges
References
Lars Sommer Jermiin, Vivek Jayaswal, Faisal Ababneh, John Robinson (2008). Phylogenetic model evaluation. Bioinformatics, Volume 452 of the series Methods in Molecular Biology, 331-364.
Faisal Ababneh, Lars S Jermiin, Chunsheng Ma, John Robinson (2006). Matched-pairs tests of homogeneity with applications to homologous nucleotide sequences. Bioinformatics, 22(10), 1225-1231.
See Also
Fmatrix, Pt, Smatrix
Examples
#To generate a 4^5 gene arraymerge2<-matrix(c(-1,-4,-3,2,-2,-5,1,3),4,2)theta<-c(rep(.25,3), rep(.25,3), rep(.25,3), c(.2,.35,.79,.01,.93,.47),3,.1,.5,.8)gn.sec<-gn(theta, merge2)gn.sec