Learn R Programming

mixIndependR (version 1.0.0)

Simulate_DistK: Generate a Bundle of Simulated distributions for No. of heterozygous loci with known heterozygosites

Description

Generate a Bundle of Simulated distributions for No. of heterozygous loci with known heterozygosites

Usage

Simulate_DistK(H,m,t)

Arguments

H

a vector of average heterozygosity of each loci. Length of H is the number of loci.

m

the sample size you want, usually similar to the real sample size.

t

the number of samples you want to build

Value

a matrix of frequencies of No. of Heterozygous Loci. Each row denotes each simulated sample; Each column denotes each No. of Heterozygous loci, from 0 to length of H.

Details

This function generates multinomial distribution for loci known the heterozygosity and build the simulated distribution for no. of heterozygous loci.

Examples

Run this code
# NOT RUN {
Simulate_DistK(runif(10),500,100)

# }

Run the code above in your browser using DataLab