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
|
scale |
(Default: |
center |
(Default: |
ev.scale |
(Default: |
Details
The input of createCubeOfCovDis
is a
I
items by J
quantitative variables
by K
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 K
I
by I
covariance matrices;
and 2) codecubeOfDistance
a cube of K
I
by I
(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)