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

View source: R/two.level.comparison.items.r

This function creates a `compitem`

object from a dataframe or matrix of observations from an item to be deemed a control, or a recovered, item.

1 | ```
two.level.comparison.items(dat, data.columns)
``` |

`dat` |
a matrix or dataframe of observed properties from either the control, or recovered, item |

`data.columns` |
a vector of integers giving which columns in |

Takes observations from the control, or recovered, item and makes them into and object which can be passed to either: `two.level.density.LR`

, or, `two.level.normal.LR`

, or, `two.level.lindley.LR`

, for likelihood ratio calculation.

Returns a `compitem`

object

This function, and class it generates, exist to make sure that all the necessary bits and pieces are there to put into the likelihood ratio calculation function

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

Aitken, C.G.G. & Lucy, D. (2004) Evaluation of trace evidence in the form of multivariate data. *Applied Statistics*: **53**(1); 109-122.

`compcovar`

`compitem`

`two.level.comparison.items`

`two.level.components`

`two.level.density.LR`

`two.level.normal.LR`

`two.level.lindley.LR`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ```
# 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, Ca and Fe - warning - could take time
# on slower machines
Z <- two.level.components(dat, c(7,8,9), 1)
# calculate a compitem object representing the control item
control <- two.level.comparison.items(dat[37:42,], c(7,8,9))
# calculate a compitem object representing the recovered item
# known to be from the same item (item 4)
recovered.1 <- two.level.comparison.items(dat[43:48,], c(7,8,9))
# calculate a compitem object representing the recovered item
# known to be from a different item (item 6)
recovered.2 <- two.level.comparison.items(dat[67:72,], c(7,8,9))
``` |

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.