Ntml function

Generating Samples from a Multinomial Distribution

Generating Samples from a Multinomial Distribution

Generating random DNA samples from a multinomial distribution.

Ntml(N, Ft)

Arguments

  • N: sample size
  • Ft: a 4K4^K array, containing the joint distribution probabilities for K matched sequences.

Details

This function generates a 4K4^K DNA array from a multinomial distribution. It depends on the sample size we need to generate and the 4K4^K joint distribution array of K matched sequences.

Returns

A 4K4^K observed divergence array

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

simemb, simapp, gn3sim, gn, gn2, Fmatrix

Examples

#This will give a 4^K observed divergence array 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) Nt<-Ntml(1000, F1) Nt
  • Maintainer: Hasinur Rahaman Khan
  • License: GPL-2
  • Last published: 2016-03-24

Useful links