Ntml {DNAseqtest}R Documentation

Generating Samples from a Multinomial Distribution

Description

Generating random DNA samples from a multinomial distribution.

Usage

Ntml(N, Ft)

Arguments

N

sample size

Ft

a 4^K array, containing the joint distribution probabilities for K matched sequences.

Details

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

Value

A 4^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

[Package DNAseqtest version 1.0 Index]