two.level.components {comparison}R Documentation

Compute integrated means and covariances

Description

Takes a large sample from the background population and calculates the within and between covariance matrices, 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

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

Arguments

data

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

data.columns

a vector indicating which columns are the properties

item.column

an integer indicating which column gives the item

Details

Uses ML estimation at the moment - this will almost certainly change in the future and hopefully allow regularisation methods to get a more stable (and non-singular) estimate.

Value

an object of class compvar

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)

[Package comparison version 1.0.8 Index]