gn2 function

Joint Distribution for K Matched Sequences (2)

Joint Distribution for K Matched Sequences (2)

This function calculates the joint distribution array for K matched sequences (second option).

gn2(theta, merge2)

Arguments

  • theta: a vector of variables containing the following parameters in this order--1. the first three parameters from πX\pi_X vector, 2. the first three parameters from πY\pi_Y vector, 3. the first three parameters from f0f_0 vector, 4. the six off-diagonal free parameters in the S matrix, 5. a scalar ρ\rho, 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 4K4^K 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 array merge2<-matrix(c(-1,-4,-3,2,-2,-5,1,3), 4, 2) rho2<-matrix(c(.3,.5,.3,.2,.3,.5,.8,2.7),4,2) theta<-c(rep(.25,3), rep(.25,3),rep(.25,3), c(.2,.35,.79,.01,.93,.47),rho2) gn2<-gn2(theta, merge2) gn2
  • Maintainer: Hasinur Rahaman Khan
  • License: GPL-2
  • Last published: 2016-03-24

Useful links