dviCompare {dvir} | R Documentation |
Compare DVI approaches
Description
Compare the efficiency of different computational approaches to DVI.
Usage
dviCompare(
dvi,
true,
refs = typedMembers(am),
methods = 1:6,
markers = NULL,
threshold = 1,
simulate = TRUE,
db = getFreqDatabase(am),
Nsim = 1,
returnSims = FALSE,
seed = NULL,
numCores = 1,
verbose = TRUE
)
Arguments
dvi |
A |
true |
A character of the same length as |
refs |
Character vector with names of the reference individuals. By
default the typed members of |
methods |
A subset of the numbers 1,2,3,4,5,6. |
markers |
If |
threshold |
An LR threshold passed on to the sequential methods. |
simulate |
A logical, indicating if simulations should be performed. |
db |
A frequency database used for simulation, e.g.,
|
Nsim |
A positive integer; the number of simulations. |
returnSims |
A logical: If TRUE, the simulated data are returned without any DVI comparison. |
seed |
A seed for the random number generator, or NULL. |
numCores |
The number of cores used in parallelisation. Default: 1. |
verbose |
A logical. |
Details
The following methods are available for comparison, through the methods
parameter:
Sequential, without LR updates
Sequential, with LR updates
Sequential (undisputed) + joint (remaining). Always return the most likely solution(s).
Joint - brute force. Always return the most likely solution(s).
Like 3, but return winner(s) only if LR >
threshold
; otherwise the empty assignment.Like 4, but return winner(s) only if LR >
threshold
; otherwise the empty assignment.
Value
A list of solution frequencies for each method, and a vector of true positive rates for each method.
Examples
refs = "R1"
db = forrel::NorwegianFrequencies[1:3]
# True solution
true = c("M1", "M2", "M3")
# Run comparison
# dviCompare(example1, refs, true = true, db = db, Nsim = 2, seed = 123)
# Alternatively, simulations can be done first...
sims = dviCompare(example1, refs, true = true, simulate = TRUE,
db = db, Nsim = 2, seed = 123, returnSims = TRUE)
# ... and computations after:
# dviCompare(sims, refs, true = true, simulate = FALSE)