do3Scale {rrcov3way} | R Documentation |
Centering and scaling
Description
Centering and/or normalization of a three way array or a matricized array across one mode (modes indicated by "A", "B" or "C").
Usage
## S3 method for class 'tucker3'
do3Scale(x, renorm.mode = c("A", "B", "C"), ...)
## S3 method for class 'parafac'
do3Scale(x, renorm.mode = c("A", "B", "C"), ...)
## Default S3 method:
do3Scale(x, center = FALSE, scale = FALSE,
center.mode = c("A", "B", "C", "AB", "AC", "BC", "ABC"),
scale.mode = c("B", "A", "C"),
only.data=TRUE, ...)
Arguments
x |
Three dimensional array of order (I x J x K) or a matrix (or data.frame coerced to a matrix) of order (I x JK) containing the matricized array (frontal slices) |
center |
Whether and how to center the data. Can be |
scale |
Whether and how to scale the data. Can be |
center.mode |
Across which mode to center. Default is |
scale.mode |
Within which mode to scale. Default is |
renorm.mode |
Within which mode to renormalize a Parafac or Tucker3 solution.
See in Details how this is performed for the different models.
Default is |
only.data |
Whether to return only the centered/scaled data or also
the center and the scale themselves. Default is |
... |
potential further arguments passed to lower level functions. |
Value
A named list, consisting of the centered and/or scaled data, a center vector, a scale vector and the mode in which the data were centered/scaled.
Author(s)
Valentin Todorov valentin.todorov@chello.at and Maria Anna Di Palma madipalma@unior.it and Michele Gallo mgallo@unior.it
References
Kiers, H.A.L. (2000).Towards a standardizrd notation and terminology in multiway analysis. Journal of Chemometrics, 14:105-122.
Kroonenberg, P.M. (1983).Three-mode principal component analysis: Theory and applications (Vol. 2), DSWO press.
Examples
data(elind)
(x1 <- do3Scale(elind, center=TRUE, scale=TRUE))
(x2 <- do3Scale(elind, center=TRUE, scale=TRUE, center.mode="B"))
(x3 <- do3Scale(elind, center=TRUE, scale=TRUE, center.mode="C", scale.mode="C"))