two.level.lindley.LR: Likelihood ratio calculation - normal - Lindley's approach

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/two.level.lindley.LR.r

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

1
two.level.lindley.LR(control, recovered, background)

Arguments

control

a compitem object with the control item information

recovered

a compitem object with the recovered item information

background

a compcovar object with the populational information

Details

Does the likelihood ratio calculations for a two-level model assuming that the between item distribution is univariate normal. This function is taken from the approach devised by Denis Lindley in his 1977 paper (details below) and represents the progenitor of all the functions in this package.

Value

Returns an estimate of the likelihood ratio

Note

Do not even think about using this function without the proper compcovar and compitem objects - it will not work.

Author(s)

David Lucy [email protected] - http://www.maths.lancs.ac.uk/~lucy

References

Lindley, D. (1977) A problem in forensic Science. Biometrika: 64; 207-213.

See Also

compcovar
compitem
two.level.comparison.items
two.level.components
two.level.density.LR
two.level.normal.LR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# load this library
library(comparison)

# load Greg Zadora's glass data
data(glass)

# make it into a data frame
dat <- as.data.frame(glass)

# calculate a compcovar object based upon dat
# using K
Z <- two.level.components(dat, 7, 1)

# calculate a compitem object representing the control item
control <- two.level.comparison.items(dat[1:6,], 7)

# calculate a compitem object representing the recovered item
# known to be from the same item (item 1)
recovered.1 <- two.level.comparison.items(dat[7:12,], 7)

# calculate a compitem object representing the recovered item
# known to be from a different item (item 2)
recovered.2 <- two.level.comparison.items(dat[19:24,], 7)


# calculate the likelihood ratio for a known
# same source comparison - should be 6.323941
lr.1 <- two.level.lindley.LR(control, recovered.1, Z)

# calculate the likelihood ratio for a known
# different source comparison - should be 0.004422907
lr.2 <- two.level.lindley.LR(control, recovered.2, Z)

comparison documentation built on May 29, 2017, 9:08 a.m.