Description Usage Arguments Details Value See Also Examples
Pre-computes KIs for use with ki.db
function
1 | ki.precompute(type, freqs, markers = names(freqs), theta = 0)
|
type |
A character string giving the type of KI. See ibdprobs. |
freqs |
A list specifying the allelic frequencies. Should contain a vector of allelic frequencies for each locus, named after that locus. |
markers |
Character vector stating the markers to use in the KI computation. Defaults to all markers contained in |
theta |
numeric value specifying the amount of background relatedness. |
In large scale simulation studies, it is sometimes useful to precompute KIs to speedup computations.
list A list of numeric vectors containing the KIs for all genotypic combinations at each locus.
ki.db
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
data(freqsNLngm);
n <- 1e6
targets <- sample.profiles(N = 1e2,freqs = freqsNLngm)
db <- sample.profiles(N = 1e5,freqs = freqsNLngm)
precomp <- ki.precompute(type = "FS",freqs = freqsNLngm)
R1 <- ki.db(x = targets,db = db,hyp.1 = "FS")
R2 <- ki.db(x = targets,db = db,precomputed.kis = precomp) # a little faster
all.equal(R1,R2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.