createCubeOfCovDis {DistatisR}R Documentation

compute a cube of covariance and a cube of distance between the items (rows) of a brick of measurements (when all blocks have the same number of variables).

Description

createCubeOfCovDis compute a cube of covariance and a cube of (squared) Euclidean distance between the items (rows) of a brick of measurements. The variables describing the items can scaled to norm 1 and centered. The whole matrix can be scaled by its first eigenvalue (a la DISTATIS). All "slices" of the brick should have the same number of variables. For different number of variables per block, see list2CubeOfCov.

Usage

createCubeOfCovDis(brickOfData, scale = TRUE, center = TRUE, ev.scale = TRUE)

Arguments

brickOfData

a II items by JJ quantitative variables by KK assessors.

scale

(Default: TRUE), when TRUE scale to norm 1 each column for each slice.

center

(Default: TRUE), when TRUE centers each column.

ev.scale

(Default: TRUE), when TRUE normalizes each slice (i.e., each II items by JJ matrix) so that its first eigenvalue is equal to 1.

Details

The input of createCubeOfCovDis is a II items by JJ quantitative variables by KK assessors (as obtained, e.g., from a projective mapping task).

By default createCubeOfCovDis centers and normalizes each column for each slice of the brick and then normalize each covariance matrix such that the first eigenvalue of each covariance matrix is equal to 1.

A distatis analysis of the Distance matrices with the option Distance = TRUE will give the same results as the distatis analysis of the Covariance matrices with the option Distance = FALSE.

Value

a list with 1) cubeOfCovariance a cube of KK II by II covariance matrices; and 2) codecubeOfDistance a cube of KK II by II (squared) Euclidean distance matrices.

Author(s)

Herve Abdi

See Also

list2CubeOfCov

Examples


# use the data from the BeersProjectiveMapping dataset
data("BeersProjectiveMapping") 
# Create the I*J_k*K brick of data
zeBrickOfData <- projMap2Cube(
                     BeersProjectiveMapping$ProjectiveMapping, 
                     shape = 'flat',  nVars = 2)
# Create the cubes of Covariance and Distance                     
cubes <- createCubeOfCovDis(zeBrickOfData$cubeOfData)


[Package DistatisR version 1.1.1 Index]