projMap2Cube {DistatisR} | R Documentation |
\
reshape a data matrix from projective mapping
into a brick of data for a distatis
analysis.
Description
projMap2Cube
reshapes a data matrix from projective mapping
into a brick of data for a distatis
analysis.
With products,
variables, and
blocks (assessors),
the original data can be 1) "flat"
(e.g.,
rows as products,
columns as
blocks of
Variables)
or 2) "long"
"flat" (e.g.,
blocks of
rows as products by assessors,
columns as
Variables).
Usage
projMap2Cube(Data, shape = "flat", nVars = 2, nBlocks = NULL)
Arguments
Data |
a data matrix that can be
|
shape |
(Default: |
nVars |
Number of variables (default = 2),
relevant only when |
nBlocks |
(Default = |
Details
the output projMap2Cube
(i.e., the brick of data)
is used as input to the function cubeOfCov
that will
create the cubeOfDistance (or covariance) that will be used
as input of distatis
.
projMap2Cube
guesses the
names of the products and variables from the
rownames and columns of the data, but this guess
needs to be verified.
Value
An by
by
array (i.e., a brick)
to be used to create a cube of distance or covariance.
Author(s)
Herve Abdi
Examples
# Use the data from the BeersProjectiveMapping dataset
data("BeersProjectiveMapping")
# Create the I*J_k*K brick of data
dataBrick <- projMap2Cube(BeersProjectiveMapping$ProjectiveMapping,
shape = 'flat', nVars = 2)