compS: Compute an SCP matrix with several possible combinations of...

View source: R/inferences4PLSC.R

compSR Documentation

Compute an SCP matrix with several possible combinations of centering and normalizing.

Description

compS: Computes an SCP matrix from 2 matrices X and Y with several possible combinations of centering and normalizing. Both X and Y are pre-processed (i.e., centered / normalized) Used for functions related to PLSC / inter-battery analysis / co-inertia analysis... Allows different types of normalization based on the ExPosition function expo.scale.

Usage

compS(
  DATA1,
  DATA2,
  center1 = TRUE,
  center2 = TRUE,
  scale1 = "ss1",
  scale2 = "ss1"
)

Arguments

DATA1

an N*I matrix of quantitative data

DATA2

an N*J matrix of quantitative data

center1

when TRUE (default) DATA1 will be centered

center2

when TRUE (default) DATA2 will be centered

scale1

when TRUE (default) DATA1 will be normalized. Depends upon ExPosition function expo.scale whose description is: boolean, text, or (numeric) vector. If boolean or vector, it works just like scale. The following text options are available: 'z': z-score normalization, 'sd': standard deviation normalization, 'rms': root mean square normalization, 'ss1': sum of squares (of columns) equals 1 (i.e., column vector of length of 1).

scale2

when TRUE (default) DATA2 will be normalized (same options as for scale1).

Details

The options of centering and scaling are almost always used with the defaults, so change them only if you know what you are doing.

Value

S the cross-product matrix from X and Y.

Author(s)

Hervé Abdi

Examples

S <- compS(matrix(stats::runif(10), nrow = 5), matrix(stats::runif(15), nrow = 5))

HerveAbdi/data4PCCAR documentation built on Sept. 11, 2022, 4:19 p.m.