createCmat4PTCA: Creates a matrix of cross-products or RV coefficients for the...

View source: R/createCmat.R

createCmat4PTCAR Documentation

Creates a matrix of cross-products or RV coefficients for the 3rd dimension of a brick of non-negative numbers (i.e., a brick of data for a CATA test).

Description

createCmat4PTCA creates a matrix of cross-product (i.e., scalar products between two matrices) or RV coefficients for the 3rd dimension of an I*J*K brick of non-negative numbers (i.e., a brick of data for a CATA test). The coefficients are computed from the I row-profiles (observations) and stored in a K*K semi-positive definite matrix that can be analyzed by an eigen-decomposition to provide a STATIS-like scalar-product/RV-map.

Usage

createCmat4PTCA(dataCube, normalization = "cp")

Arguments

dataCube

an I*J*K brick of non-negative numbers (i.e., a brick of data for a CATA test)

normalization

Type of normalization can be 'cp' ( cross-product, Default) or 'Rv' (for the Rv coefficient)

Details

Each of the K slices of the I*J*K brick of data is first transformed into an I*I S (for a CA analysis) matrix using the function PTCA4CATA::CA.SfromX (Empty columns are eliminated before computing the matrix S). This creates an I*I*K brick of S matrices which is then used to compute the I*I scalar-product/Rv matrix that measures the similarity between all slices of dataCube. Note: that this matrix can be used in a STATIS approach to re-weight the slices of the dataCube. Note: that the rows of each slice are supposed to have at least one non-zero entry. Slices with zero rows are eliminated and a warning message is issued

Value

A K*K cross-product or Rv Matrix depending upon the value of the parameter normalization.

Author(s)

Herve Abdi

Examples

## Not run: 
if(interactive()){
 # with aCubeOfCATAData being an I*J*K array
 Cmat <- createCmat4PTCA(aCubeOfCATAData)
 }

## End(Not run)

HerveAbdi/PTCA4CATA documentation built on July 17, 2022, 5:41 a.m.