Learn R Programming

DNAseqtest (version 1.0)

Ntml: 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.

Value

$4^K$ observed divergence array

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.

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

Run this code
#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

Run the code above in your browser using DataLab