Pnm_all | R Documentation |
Computes the exact distribution of the number of alleles in a m-person DNA
mixture typed with STR loci. For a m-person DNA mixture it is possible to
observe 1,...,2mL alleles, where L is
the total number of typed STR loci. The method allows incorporation of the
subpopulation correction, the so-called theta-correction, to adjust
for shared ancestry. If needed, the locus-specific probabilities can be obtained using the
locuswise
argument.
Pnm_all(m, theta, probs, locuswise = FALSE) Pnm_locus(m, theta, alleleProbs)
m |
The number of contributors |
theta |
The coancestery coefficient |
probs |
List of vectors with allele probabilities for each locus |
locuswise |
Logical. If |
alleleProbs |
Vectors with allele probabilities |
Computes the exact distribution of the number of alleles for a m-person DNA mixture.
Returns a vector of probabilities, or a matrix of locuswise probability vectors.
Torben Tvedebrink, James Curran, Mikkel Andersen
T. Tvedebrink (2014). 'On the exact distribution of the number of alleles in DNA mixtures', International Journal of Legal Medicine; 128(3):427–37. <https://doi.org/10.1007/s00414-013-0951-3>
## Simulate some allele frequencies: freqs <- structure(replicate(10, { g = rgamma(n = 10, scale = 4, shape = 3); g/sum(g) }, simplify = FALSE), .Names = paste('locus', 1:10, sep = '.')) ## Compute \eqn{\Pr(N(m = 3) = n)}, \eqn{n = 1,\ldots,2 * L *m}, where \eqn{L = 10} ## here Pnm_all(m = 2, theta = 0, freqs) ## Same, but locuswise results Pnm_all(m = 2, theta = 0, freqs, locuswise = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.