two.level.components: Compute integrated means and covariances

Description Usage Arguments Details Value Examples

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

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

1
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

1
2
3
4
5
6
7
# load Greg Zadora's glass data
data(glass)

# calculate a compcovar object based upon glas
# using K, Ca and Fe - warning - could take time
# on slower machines
Z = two.level.components(glass, c(7,8,9), 1)

comparison documentation built on Aug. 5, 2020, 5:07 p.m.