two.level.components: Creates a 'compcovar' object

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

View source: R/two.level.components.r

Description

Takes a large sample from the background population and calculates the within and between covariance matricies, a vector of means, a vector of the counts of replicates for each item from the sample, and other bits needed to make up a compcovar object

Usage

1
two.level.components(dat, data.columns, item.column)

Arguments

dat

a matrix, or data.frame, of observations, with cases in rows, and properties as columns.

data.columns

an array indicating which columns are the properties.

item.column

an integer indicating which column gives the item.

Details

Uses ML estimation at the moment - hopefully give some alternative ways of estimating the covariance matricies in the future.

Value

Returns a compcovar object

Note

Can be used directly for variance component estimation.

Author(s)

David Lucy [email protected] - http://www.maths.lancs.ac.uk/~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.

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 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)

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