Fmatrix {DNAseqtest} | R Documentation |
This function calculates the joint distribution function for two edge tree.
Fmatrix(t1, t2, f0, Sx2, Sy2, Pix, Piy)
t1 |
represents the length from the tree root to the first node |
t2 |
represents the length from the tree root to the second node |
f0 |
the initial distribution for the four nucleotides |
Sx2 |
a 4 x 4 symmetric matrix related to the first edge |
Sy2 |
a 4 x 4 symmetric matrix related to the second edge |
Pix |
a diagonal matrix for the stationary distribution of the first edge |
Piy |
a diagonal matrix for the stationary distribution of the second edge |
This function calculates the joint distribution function for a two edge tree with different edge lengths, stationary distributions and differentS matrices.
A 4 x 4 matrix containing the joint edges
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.
gn, Smatrix
f0<-c(.25,.25,.25,.25)
Pi1<-diag(c(.2,.2,.2,.4))
Pi2<-diag(c(.1,.1,.1,.7))
S1<-Smatrix(c(.2,.2,.2,.2,.2,.2),diag(Pi1))
S2<-Smatrix(c(.3,.3,.3,.3,.3,.3),diag(Pi2))
fm<-Fmatrix(1, .5, f0, S1, S2, Pi1, Pi2)
fm