simDOdistr | R Documentation |
MCMC Allele dropout distribution sampler based on total number of alleles in an evidence.
simDOdistr(
totA,
nC,
popFreq,
refData = NULL,
M = 1000,
minS = 2000,
prC = 0,
pDknown = rep(NA, nC)
)
totA |
Total number of allele-observations in evidence. |
nC |
Number of contributors to assume in the preposition. |
popFreq |
Population frequencies listed for each loci popFreq[[locname]] |
refData |
List with alleles to condition on. ref[[locname]][[referencename]]=(A1,A2) |
M |
The number of samples for each iteration. |
minS |
The number of minimum accepted samples. |
prC |
Assumed drop-in probability. Can be a vector (must contain the marker names) |
pDknown |
A vector of known drop-out probabilities for each contributors. Default is NA which means it is unknown. |
simDOdistr samples from the drop-out distribution based on total number of alleles in evidence under a specified prepositions. It returns if no samples was accepted in first iteration
Vector with accepted samples from the dropout distribution
Oyvind Bleka
## Not run:
popFreq <- list() #create population frequencies
for(i in 1:3) {
freqs <- rgamma(rpois(1,10),1,1)
popFreq[[paste0("loc",i)]] <- stats::setNames(freqs/sum(freqs),1:length(freqs))
}
simDOdistr(6,2,popFreq)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.