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.
a matrix or dataframe of observed properties from either the control, or recovered, item
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.lindley.LR, for likelihood ratio calculation.
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
Aitken, C.G.G. & Lucy, D. (2004) Evaluation of trace evidence in the form of multivariate data. Applied Statistics: 53(1); 109-122.
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.