This function calculates the joint distribution array for K matched sequences.
Usage
gn(theta, merge2)
Arguments
theta
a vector of variables containing the following parameters in this order--1. the first three parameters from $\pi_X$ vector, 2. the first three parameters from $\pi_Y$ vector, 3. the first three parameters from $f_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
Value
$4^K$ array containing the joint distribution for the K edges
Details
This function calculates the joint distribution array for a tree with K matched sequences. it uses the following functions-- Pt, Fmatrix and Smatrix.
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.