Learn R Programming

DNAseqtest (version 1.0)

likelihood: Negative Log Likelihood Ratio

Description

This function calculates log likelihood ratio value.

Usage

likelihood(thetast, fobs, merge2)

Arguments

thetast
a starting values for the parameter we need to estimate
fobs
the $4^K$ joint distribution array for K edge tree
merge2
a (K-1) x 2 matrix describing the tree topology

Value

Details

This function calculates the log likelihood ratio value for F(t). It needs a vector of starting values for the parameters estimate, $4^K$ observed divergence array and merge matrix describing the tree topology.

References

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

gn, gn2

Examples

Run this code
merge2<-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)
F1<-gn(theta, merge2)
lh<-likelihood(theta, F1, merge2)
lh

Run the code above in your browser using DataLab