View source: R/createSymDifmat.R
createSymDist4PTCA | R Documentation |
createSymDist4PTCA
creates a matrix of the
symmetric difference distance / cross-products
between a set of K matrices stored as
the 3rd dimension of an I*J*K brick of non-negative numbers
(i.e., a brick of data for a BeTA/CATA test).
The symmetric difference distance between two (0/1) matrices
X and Y is computed as
sum(abs(X - Y)). The K*K distance matrix is
converted using double centering into a cross-product matrix
that can be analyzed by
an eigen-decomposition to provide a STATIS-like
scalar-product/RV-map.
createSymDist4PTCA(dataCube)
dataCube |
an I*J*K brick of non-negative numbers (i.e., a brick of data for a CATA test) |
Note that the symmetric difference distance is meaningful only between 0/1 matrices.
return.list A list with
Distance
:
a K*K (symmetric difference) distance matrix
CrossProduct
:
a K*K cross-product matrix obtained by double centering
the distance matrix
(the cross-product can be eigen-decomposed to give an MDS).
Herve Abdi
## Not run: if(interactive()){ # with aCubeOfCATAData being an I*J*K array DistanceMat <- createSymDist4PTCA(aCubeOfCATAData) } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.