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 dviData object, typically created with dviData().

true

A character of the same length as dvi$pm, with the true solution, e.g., true = c("M2", "M3", "*") if the truth is V1 = M2, V2 = M3 and V3 unmatched.

refs

Character vector with names of the reference individuals. By default the typed members of dvi$am.

methods

A subset of the numbers 1,2,3,4,5,6.

markers

If simulate = FALSE: A vector indicating which markers should be used.

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., forrel::NorwegianFrequencies. By default the frequencies attached to dvi$am are used.

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:

  1. Sequential, without LR updates

  2. Sequential, with LR updates

  3. Sequential (undisputed) + joint (remaining). Always return the most likely solution(s).

  4. Joint - brute force. Always return the most likely solution(s).

  5. Like 3, but return winner(s) only if LR > threshold; otherwise the empty assignment.

  6. 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)



[Package dvir version 3.2.1 Index]