Simulate_DistX {mixIndependR} | R Documentation |
Build a simulated distribution for No. of Shared Alleles
Description
Build a simulated distribution for No. of Shared Alleles
Usage
Simulate_DistX(e,m,t)
Arguments
e |
a matrix of Probability of Sharing 2,1 or 0 alleles at each loci. Each row denotes each locus. Three columns denote sharing 0,1 or 2 alleles. |
m |
the sample size you want, usually similar to the real sample size. |
t |
the number of samples you want to build/ the times to generate a sample |
Details
This function generates multinomial distribution for loci known the Allele Frequency and Expected Probability of Shared 2,1 or 0 alleles
Value
a matrix of frequencies of No. of shared alleles. Each row denotes each simulated sample; Each column denotes each No. of shared alleles, from 0 to 2e length of e.
Examples
e0<-data.frame("P0"=runif(5,min = 0,max = 0.5),"P1"=runif(5,0,0.5))
e<-data.frame(e0,"P2"=1-rowSums(e0))
Simulate_DistX(e,500,10)
[Package mixIndependR version 1.0.0 Index]