blockSim {relSim} | R Documentation |
Perform relatives simulations using large memory blocks in C
Description
Generate N pairs with a given relationship, calculate the LR for sibs, parent-child and the number of matching alleles and count the number of pairs that meet the threshold criteria.
Usage
blockSim(
N,
Freqs,
rel = "UN",
ibsthresh = NULL,
kithresh = NULL,
code = 1,
falseNeg = TRUE,
BlockSize = N/10,
showProgress = FALSE
)
Arguments
N |
The number of iterations to carry out |
Freqs |
A list containing two lists labelled loci and freqs. The second list is a list of vectors containing the allele frequencies of each allele at each locus in the multiplex. |
rel |
generate unrelated ( |
ibsthresh |
A vector of one or more IBS thresholds |
kithresh |
A vector of one or more KI/LR thresholds |
code |
A code from 1 to 6 which dictates the events that will be counted.
|
falseNeg |
if TRUE then the number of results that DO NOT satisfy the conditions are counted, otherwise the number of results DO satisfy the conditions are counted |
BlockSize |
Sets the number of random profiles to be generated in each
iteration. By default the block size is set to 10 percent of the total
sample size. It is unclear whether the procedure is more efficient if a
bigger percentage of the total is used. Users must take care to make sure
that the block size evenly divides |
showProgress |
If |
Details
This function is used for fast accurate estimation of false positive and false negative rates. It achieves part of its speed by block exectution in C, and part by not saving the LR or IBS results. It can do 1 billion iterations in about an hour.
Value
A vector containing the number of profile pairs that satisfied the threshold conditions
Author(s)
James M. Curran
See Also
sim
Examples
## not run
## this counts the number of unrelated pairs that are falsely identified
## as siblings using the policy that there are 16 or more matching
## alleles, and the LR/KI is greater than 100,000
## this is a very rare event for the FBI Caucasians with a frequency of
## about 4-5 times in 10 million pairs
## Not run:
data(fbiCaucs)
N = 1e8
ki = 1e5
ibs = 16
code = 5
BlockSize = 1e6
blockSim(N, fbiCaucs, rel = "UN", ibsthresh = ibs, kithresh = ki,
code = code, falseNeg = FALSE, BlockSize = BlockSize)
## End(Not run)