likelihood function

Negative Log Likelihood Ratio

Negative Log Likelihood Ratio

This function calculates log likelihood ratio value.

likelihood(thetast, fobs, merge2)

Arguments

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

Details

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

Returns

The value of the log likelihood ratio

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

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
  • Maintainer: Hasinur Rahaman Khan
  • License: GPL-2
  • Last published: 2016-03-24

Useful links