calcLR {comparison} | R Documentation |
Calculate the likelihood ratio
Description
Takes a compitem
object which represents some control item, and a
compitem
object which represents a recovered item, then uses information
from a compcovar
object, which represents the information from the
population, to calculate a likelihood ratio (LR) as a measure of the evidence
given by the observations for the same/different source propositions.
Usage
calcLR(control, recovered, background, method = c("mvn", "kde", "lindley"))
Arguments
control |
a |
recovered |
a |
background |
a |
method |
a choice of the method used to calculate the LR. Presently there
are three methods, |
Value
an estimate of the likelihood ratio
References
Aitken, C.G.G. & Lucy, D. (2004) Evaluation of trace evidence in the form of multivariate data. Applied Statistics: 53(1); 109-122.
Examples
data(glass)
controlMeasurements = subset(glass, item == "s1")
control = makeCompItem(item ~ logKO + logCaO + logFeO,
data = controlMeasurements[1:6,])
recovered.1 = makeCompItem(item ~ logKO + logCaO + logFeO,
data = controlMeasurements[7:12,])
recoveredMeasurements = subset(glass, item == "s2")
recovered.2 = makeCompItem(item ~ logKO + logCaO + logFeO,
data = recoveredMeasurements[7:12,])
background = makeCompVar(item ~ logKO + logCaO + logFeO, data = glass)
## Same source comparison using a multivariate normal (MVN) approximation
calcLR(control, recovered.1, background)
## Same source comparison using a multivariate kernel density estimate (MVK) approximation
calcLR(control, recovered.1, background, "kde")
## Different source comparison using a multivariate normal (MVN) approximation
calcLR(control, recovered.2, background)
## Different source comparison using a multivariate kernel density estimate (MVK) approximation
calcLR(control, recovered.2, background, "kde")