normBrick4PTCA: 'normBrick4PTCA' norms an I*J*N CATA array.

View source: R/normBrick4PTCA_Cube.R

normBrick4PTCAR Documentation

normBrick4PTCA norms an I*J*N CATA array.

Description

normBrick4PTCA norms an I*J*N CATA array (i.e., an array such that x_{i,j,k} >= 0), by rows, by columns, by matrix (i.e. by "Slice"), or by group of Participants. The normalization implemented makes the sum of the normalized unit (i.e., rows, columns, matrices) equal to a constant (see normingConstant).

Usage

normBrick4PTCA(
  array2Norm,
  normingConstant = 1,
  normalization = "byRow",
  code4Groups = NULL
)

Arguments

array2Norm

a "to be normed" 3-D I*J*N CATA array (i.e., an array such that x_i,j,k >= 0).

normingConstant

(default = 1), the constant to which normalization is done. For example, when the option byRow is chosen and normingConstant = 1, each row of the array is normalized so that its sum is equal to 1.

normalization

type of normalization, Current options are: "byRow" (default), "byCol", "byMat", and "byGroup". Note that if normalization = "byGroup", the parameter code4Group needs to be specified.

code4Groups

(default = NULL), an N by 1 factor or string vector speficying to what group each matrix (i.e., each of the I*J N slides) belongs. Used only and required when normalization = "byGroup", ignored otherwise.

Value

a list with the I*J*N normalized cube. With the option "byGroup". normBrick4PTCA will also return an I*J*K array with the summed values for the groups. Note that the normalizated array should be accessed as a list. So with the call toto <- normBrick4PTCA(array2Norm), the returned normalized array is in the list item toto$normedArray.

Author(s)

Herve Abdi


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