allPairsLR | R Documentation |
This function takes every pair of profiles in a database of profiles and computes
the likelihood ratio (LR) for a specific relationship given by nCode
. That means
there will be N(N-1)/2
LRs computed for N profiles.
allPairsLR(Profiles, listFreqs, nCode)
Profiles |
an integer vector of stacked profiles representing the database. This vector has |
listFreqs |
is a set of allele frequencies representing a particular multiplex. The function assumes that that loci in the profiles
are in the same order as the loci in this list. The data structure is a |
nCode |
if |
a NumericVector
containing the LRs. They are stored in sequential order so if for example there were three
profiles, then there are 3 possible LRs, and the result vector would contain the LRs for the profile pairs (1, 2),
(1, 3), and (2, 3).
James Curran
data("USCaucs")
N = 600
profs = relSim:::.randomProfiles(USCaucs$freqs, N)
system.time({lr = relSim:::allPairsLR(profs, USCaucs$freqs, 1)})
plot(density(log10(lr)))
mean(lr > 1) ## estimate the probability that the LR is incorrectly above 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.