two.level.normal.LR {comparison} | R Documentation |
Likelihood ratio calculation - normal
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 as a measure of the evidence
given by the observations for the same/different source propositions.
Usage
two.level.normal.LR(control, recovered, background)
Arguments
control |
a |
recovered |
a |
background |
a |
Details
Does the likelihood ratio calculations for a two-level model assuming that the between item distribution is uni/multivariate normal.
Value
an estimate of the likelihood ratio
Author(s)
Agnieszka Martyna and David Lucy
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
# load Greg Zadora's glass data
data(glass)
# calculate a compcovar object based upon glass
# using K, Ca and Fe - warning - could take time
# on slower machines
Z <- two.level.components(glass, c(7,8,9), 1)
# calculate a compitem object representing the control item
control <- two.level.comparison.items(glass[1:6,], c(7,8,9))
# calculate a compitem object representing the recovered item
# known to be from the same item (item 1)
recovered.1 <- two.level.comparison.items(glass[7:12,], c(7,8,9))
# calculate a compitem object representing the recovered item
# known to be from a different item (item 2)
recovered.2 <- two.level.comparison.items(glass[19:24,], c(7,8,9))
# calculate the likelihood ratio for a known
# same source comparison - should be 51.16539
# This value is 51.14243 in this version and the last version David wrote (1.0-4)
lr.1 <- two.level.normal.LR(control, recovered.1, Z)
lr.1
# calculate the likelihood ratio for a known
# different source comparison - should be 0.02901532
# This value is 0.02899908 in this version and the last version David wrote (1.0-4)
lr.2 <- two.level.normal.LR(control, recovered.2, Z)
lr.2