Tucker3 function

Robust Tucker3 estimator for compositional data

Robust Tucker3 estimator for compositional data

Compute a robust Tucker3 model for compositional data

Tucker3(X, P = 2, Q = 2, R = 2, center = FALSE, center.mode = c("A", "B", "C", "AB", "AC", "BC", "ABC"), scale = FALSE, scale.mode = c("B", "A", "C"), conv = 1e-06, start="svd", robust = FALSE, coda.transform=c("none", "ilr", "clr"), ncomp.rpca = 0, alpha = 0.75, robiter=100, crit=0.975, trace = FALSE)

Arguments

  • X: 3-way array of data

  • P: Number of A-mode components

  • Q: Number of B-mode components

  • R: Number of C-mode components

  • center: Whether to center the data

  • center.mode: If scaling the data, on which mode to do this

  • scale: Whether to scale the data

  • scale.mode: If centering the data, on which mode to do this

  • conv: Convergence criterion, defaults to 1e-6

  • start: Initial values for the A, B and C components. Can be "svd"

    for starting point of the algorithm from SVD's, "random" for random starting point (orthonormalized component matrices), or a list containing user specified components.

  • robust: Whether to apply a robust estimation

  • coda.transform: If the data are a composition, use an ilr or clr transformation. Default is non-compositional data, i.e. coda.transform="none"

  • ncomp.rpca: Number of components for robust PCA

  • alpha: Measures the fraction of outliers the algorithm should resist. Allowed values are between 0.5 and 1 and the default is 0.75

  • robiter: Maximal number of iterations for robust estimation

  • crit: Cut-off for identifying outliers, default crit=0.975

  • trace: Logical, provide trace output

Details

The function can compute four versions of the Tucker3 model:

  1. Classical Tucker3,
  2. Tucker3 for compositional data,
  3. Robust Tucker3 and
  4. Robust Tucker3 for compositional data.

This is controlled through the parameters robust=TRUE and coda.transform="ilr".

Returns

An object of class "tucker3" which is basically a list with components: - fit: Fit value

  • fp: Fit percentage

  • A: Orthogonal loading matrix for the A-mode

  • B: Orthogonal loading matrix for the B-mode

  • Bclr: Orthogonal loading matrix for the B-mode, clr transformed. Available only if coda.transform="ilr", otherwise NULL

  • C: Orthogonal loading matrix for the C-mode

  • GA: Core matrix, which describes the relation between A, B and C, unfolded in A-form. The largest squared elements of the core matrix indicate the most important factors in the model of X.

  • iter: Number of iterations

  • rd: Residual distances

  • sd: Score distances

  • flag: The observations whose residual distance RD is larger than cutoff.RD can be considered as outliers and receive a flag equal to zero. The regular observations receive a flag 1

  • robust: The paramater robust, whether robust method is used or not

  • coda.transform: The input paramater coda.transform, what trnasofrmation for compositional data was used

  • La: Diagonal matrix containing the intrinsic eigenvalues for A-mode

  • Lb: Diagonal matrix containing the intrinsic eigenvalues for B-mode

  • Lc: Diagonal matrix containing the intrinsic eigenvalues for C-mode

References

Tucker, L.R. (1966). Some mathematical notes on three-mode factor analysis. Psychometrika, 31: 279--311.

Egozcue J.J., Pawlowsky-Glahn, V., Mateu-Figueras G. and Barcel'o-Vidal, C. (2003). Isometric logratio transformations for compositional data analysis. Mathematical Geology, 35(3): 279--300.

Author(s)

Valentin Todorov valentin.todorov@chello.at and Maria Anna Di Palma madipalma@unior.it and Michele Gallo mgallo@unior.it

Examples

############# ## ## Example with the UNIDO Manufacturing value added data data(va3way) dim(va3way) ## Treat quickly and dirty the zeros in the data set (if any) va3way[va3way==0] <- 0.001 ## res <- Tucker3(va3way) res print(res$fit) print(res$A) ## Print the core matrix print(res$GA) ## Distance-distance plot plot(res, which="dd", main="Distance-distance plot") ## Paired component plot, mode A plot(res, which="comp", main="Paired component plot (mode A)") ## Paired component plot, mode B plot(res, which="comp", mode="B", main="Paired component plot (mode B)") ## Joint biplot plot(res, which="jbplot", main="Joint biplot") ## Trajectory plot(res, which="tjplot", choices=c(1:4), arrows=FALSE, main="Trajectory biplot")
  • Maintainer: Valentin Todorov
  • License: GPL (>= 3)
  • Last published: 2024-02-06

Downloads (last 30 days):