R Under development (unstable) (2024-02-05 r85863 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ## this will render the output independent from the version of the package > suppressPackageStartupMessages(library(rrcov3way)) > > ## t3_als() ====================================================== > data(elind) > a <- unfold(elind) > try(rrcov3way:::t3_als(a, 23, 6, 7, 2, 2, 2, start=c(1, 2, 3))) # not a list, length != 1 Error in rrcov3way:::t3_als(a, 23, 6, 7, 2, 2, 2, start = c(1, 2, 3)) : 'start' must be either a list with elements A, B, C and GA, or a single character - one of 'random' or 'svd'! > try(rrcov3way:::t3_als(a, 23, 6, 7, 2, 2, 2, start=0)) # not a list, must be "random" or "svd" Error in rrcov3way:::t3_als(a, 23, 6, 7, 2, 2, 2, start = 0) : 'start' must be either a list with elements A, B, C and GA, or one of 'random' or 'svd'! > try(rrcov3way:::t3_als(a, 23, 6, 7, 2, 2, 2, start="rand")) # not a list, must be "random" or "svd" Error in rrcov3way:::t3_als(a, 23, 6, 7, 2, 2, 2, start = "rand") : 'start' must be either a list with elements A, B, C and GA, or one of 'random' or 'svd'! > try(rrcov3way:::t3_als(a, 23, 6, 7, 2, 2, 2, # if list, elements must be in (A, B, C, GA) + start=list(A="A", B="B", C="C", D="GA"))) Error in rrcov3way:::t3_als(a, 23, 6, 7, 2, 2, 2, start = list(A = "A", : 'start' must be a list with elements A, B, C and GA! > try(rrcov3way:::t3_als(a, 23, 6, 7, 2, 2, 2, # if list, elements must be numeric matrices + start=list(A="A", B="B", C="C", GA="GA"))) Error in rrcov3way:::t3_als(a, 23, 6, 7, 2, 2, 2, start = list(A = "A", : 'start' must be a list containing 4 numeric matrices! > > set.seed(98765) > > ## Example with rotation > data(elind) > t3 <- Tucker3(elind, 3, 2, 2) > > ## IGNORE_RDIFF_BEGIN > > xout <- do3Rotate(t3, c(3, 3, 3), rotate=c("A", "B", "C")) Results from 1 random starts Run no. 1 f = 32.568 (core: 3.136 ; A: 17.664 ; B: 7.631 ; C: 4.136 ), 4 iters Three-way orthomax function value for best solution is 32.5677 Varimax values of core and AS, BT and CU (all based on natural weights) Core A B C 3.136 5.888 2.544 1.379 These simplicity values are based on 'natural' weights and therefore comparable across matrices When multiplied by the relative weights, they give the contribution to the overall simplicity value (they are I^2/p, J^2/q or K^2/r, resp., times the sum of the variances of squared values) > xout$vvalue GA A B C 3.136374 5.888002 2.543755 1.378694 > > w <- c(NA, 0, 0.5, 1, 2.5, 3, 3.5, 4, 5, 10, Inf) > res <- matrix(NA, nrow=length(w), ncol=7) > for(i in seq_along(w)) + { + res[i, 1] <- res[i, 2] <- res[i, 3] <- w[i] + if(is.na(w[i])) + x <- do3Rotate(t3, rotate=c()) ## no rotation + else if(is.finite(w[i])) + x <- do3Rotate(t3, rep(w[i], 3)) + else + x <- do3Rotate(t3, rep(1e18, 3)) + + res[i, 4:7] <- round(x$vvalue,3) + } Results from 1 random starts Run no. 1 f = 6.873 (core: 6.873 ; A: 0 ; B: 0 ; C: 0 ), 1 iters Three-way orthomax function value for best solution is 6.8729 Varimax values of core and AS, BT and CU (all based on natural weights) Core A B C 6.873 4.479 1.392 0.743 These simplicity values are based on 'natural' weights and therefore comparable across matrices When multiplied by the relative weights, they give the contribution to the overall simplicity value (they are I^2/p, J^2/q or K^2/r, resp., times the sum of the variances of squared values) Results from 1 random starts Run no. 1 f = 6.88 (core: 6.88 ; A: 0 ; B: 0 ; C: 0 ), 6 iters Three-way orthomax function value for best solution is 6.8802 Varimax values of core and AS, BT and CU (all based on natural weights) Core A B C 6.88 4.44 1.415 0.719 These simplicity values are based on 'natural' weights and therefore comparable across matrices When multiplied by the relative weights, they give the contribution to the overall simplicity value (they are I^2/p, J^2/q or K^2/r, resp., times the sum of the variances of squared values) Results from 1 random starts Run no. 1 f = 10.378 (core: 6.701 ; A: 2.432 ; B: 0.847 ; C: 0.398 ), 6 iters Three-way orthomax function value for best solution is 10.3781 Varimax values of core and AS, BT and CU (all based on natural weights) Core A B C 6.701 4.864 1.694 0.796 These simplicity values are based on 'natural' weights and therefore comparable across matrices When multiplied by the relative weights, they give the contribution to the overall simplicity value (they are I^2/p, J^2/q or K^2/r, resp., times the sum of the variances of squared values) Results from 1 random starts Run no. 1 f = 14.237 (core: 6.154 ; A: 5.177 ; B: 2.013 ; C: 0.893 ), 6 iters Three-way orthomax function value for best solution is 14.2368 Varimax values of core and AS, BT and CU (all based on natural weights) Core A B C 6.154 5.177 2.013 0.893 These simplicity values are based on 'natural' weights and therefore comparable across matrices When multiplied by the relative weights, they give the contribution to the overall simplicity value (they are I^2/p, J^2/q or K^2/r, resp., times the sum of the variances of squared values) Results from 1 random starts Run no. 1 f = 27.704 (core: 3.643 ; A: 14.54 ; B: 6.282 ; C: 3.24 ), 5 iters Three-way orthomax function value for best solution is 27.7044 Varimax values of core and AS, BT and CU (all based on natural weights) Core A B C 3.643 5.816 2.513 1.296 These simplicity values are based on 'natural' weights and therefore comparable across matrices When multiplied by the relative weights, they give the contribution to the overall simplicity value (they are I^2/p, J^2/q or K^2/r, resp., times the sum of the variances of squared values) Results from 1 random starts Run no. 1 f = 32.568 (core: 3.136 ; A: 17.664 ; B: 7.631 ; C: 4.136 ), 4 iters Three-way orthomax function value for best solution is 32.5677 Varimax values of core and AS, BT and CU (all based on natural weights) Core A B C 3.136 5.888 2.544 1.379 These simplicity values are based on 'natural' weights and therefore comparable across matrices When multiplied by the relative weights, they give the contribution to the overall simplicity value (they are I^2/p, J^2/q or K^2/r, resp., times the sum of the variances of squared values) Results from 1 random starts Run no. 1 f = 37.501 (core: 2.812 ; A: 20.74 ; B: 8.95 ; C: 4.998 ), 3 iters Three-way orthomax function value for best solution is 37.5005 Varimax values of core and AS, BT and CU (all based on natural weights) Core A B C 2.812 5.926 2.557 1.428 These simplicity values are based on 'natural' weights and therefore comparable across matrices When multiplied by the relative weights, they give the contribution to the overall simplicity value (they are I^2/p, J^2/q or K^2/r, resp., times the sum of the variances of squared values) Results from 1 random starts Run no. 1 f = 42.472 (core: 2.596 ; A: 23.789 ; B: 10.254 ; C: 5.833 ), 3 iters Three-way orthomax function value for best solution is 42.4719 Varimax values of core and AS, BT and CU (all based on natural weights) Core A B C 2.596 5.947 2.564 1.458 These simplicity values are based on 'natural' weights and therefore comparable across matrices When multiplied by the relative weights, they give the contribution to the overall simplicity value (they are I^2/p, J^2/q or K^2/r, resp., times the sum of the variances of squared values) Results from 1 random starts Run no. 1 f = 52.475 (core: 2.333 ; A: 29.845 ; B: 12.845 ; C: 7.451 ), 3 iters Three-way orthomax function value for best solution is 52.4749 Varimax values of core and AS, BT and CU (all based on natural weights) Core A B C 2.333 5.969 2.569 1.49 These simplicity values are based on 'natural' weights and therefore comparable across matrices When multiplied by the relative weights, they give the contribution to the overall simplicity value (they are I^2/p, J^2/q or K^2/r, resp., times the sum of the variances of squared values) Results from 1 random starts Run no. 1 f = 102.83 (core: 1.932 ; A: 59.914 ; B: 25.733 ; C: 15.251 ), 3 iters Three-way orthomax function value for best solution is 102.8296 Varimax values of core and AS, BT and CU (all based on natural weights) Core A B C 1.932 5.991 2.573 1.525 These simplicity values are based on 'natural' weights and therefore comparable across matrices When multiplied by the relative weights, they give the contribution to the overall simplicity value (they are I^2/p, J^2/q or K^2/r, resp., times the sum of the variances of squared values) Results from 1 random starts Run no. 1 f = 10104550598230310912 (core: 1.652 ; A: 5996973441771401216 ; B: 2573883441686830080 ; C: 1533693714772080384 ), 2 iters Three-way orthomax function value for best solution is 10104550598230310912 Varimax values of core and AS, BT and CU (all based on natural weights) Core A B C 1.652 5.997 2.574 1.534 These simplicity values are based on 'natural' weights and therefore comparable across matrices When multiplied by the relative weights, they give the contribution to the overall simplicity value (they are I^2/p, J^2/q or K^2/r, resp., times the sum of the variances of squared values) > > ## IGNORE_RDIFF_END > > colnames(res) <- c("A", "B", "C", "Core", "A", "B", "C") > rownames(res) <- seq_len(nrow(res)) > res A B C Core A B C 1 NA NA NA 6.873 4.479 1.392 0.743 2 0.0 0.0 0.0 6.880 4.440 1.415 0.719 3 0.5 0.5 0.5 6.701 4.864 1.694 0.796 4 1.0 1.0 1.0 6.154 5.177 2.013 0.893 5 2.5 2.5 2.5 3.643 5.816 2.513 1.296 6 3.0 3.0 3.0 3.136 5.888 2.544 1.379 7 3.5 3.5 3.5 2.812 5.926 2.557 1.428 8 4.0 4.0 4.0 2.596 5.947 2.564 1.458 9 5.0 5.0 5.0 2.333 5.969 2.569 1.490 10 10.0 10.0 10.0 1.932 5.991 2.573 1.525 11 Inf Inf Inf 1.652 5.997 2.574 1.534 > > ## Example with the UNIDO Manufacturing value added data > data(va3way) > dim(va3way) [1] 49 5 14 > > ## Treat quickly and dirty the zeros in the data set (if any) > va3way[va3way==0] <- 0.001 > > set.seed(123456) > > ## Using robustness with clr transformation > try(res <- Tucker3(va3way, robust=TRUE, coda.transform="clr")) Error in Tucker3(va3way, robust = TRUE, coda.transform = "clr") : The robust option is not possible with 'clr' transform compositional data. Please use 'ilr'. > > ## Rejected values of parameter 'crit' > try(res <- Tucker3(va3way, crit=c(1:10))) # length different than 1 Error in Tucker3(va3way, crit = c(1:10)) : 'crit' has to be a single positive number less than 1! > try(res <- Tucker3(va3way, crit=-1)) # crit non-positive Error in Tucker3(va3way, crit = -1) : 'crit' has to be a single positive number less than 1! > try(res <- Tucker3(va3way, crit=2)) # crit >= 1 Error in Tucker3(va3way, crit = 2) : 'crit' has to be a single positive number less than 1! > res <- Tucker3(va3way, crit=0.2) # crit < 0.5 --> crit=1-crit > > ## Standard Tucker 3 > (res <- Tucker3(va3way, center=TRUE, scale=TRUE)) Call: Tucker3(X = va3way, center = TRUE, scale = TRUE) Tucker3 analysis with 2 x 2 x 2 components. Fit value: 0.5949738 Fit percentage: 88.1 % > print(res$fit) [1] 0.5949738 > print(res$A) F1 F2 ALB -0.096716491 0.0055033337 AUT -0.021843693 -0.0312802015 BEL -0.021020564 -0.0406753490 BRA 0.272419574 -0.2450696057 BGR -0.090786165 0.0001049113 CAN 0.146338106 -0.1144753962 TWN 0.062417808 0.4283895019 COL -0.059541500 -0.0389071317 CRI -0.091905028 -0.0007308667 CYP -0.094993691 0.0032153454 CZE -0.056129966 -0.0123936827 DNK -0.049681754 -0.0198067797 ECU -0.088386419 -0.0046508254 EST -0.093587654 0.0029177577 FIN -0.047201935 0.0161640985 FRA 0.253374817 -0.0395751216 GEO -0.096561610 0.0055314280 PSE -0.095905718 0.0042262148 DEU 0.598927302 -0.1047460262 HUN -0.071191422 0.0080037915 IND 0.044723949 -0.0466025105 IDN -0.002412605 -0.0482990147 IRN -0.051758007 -0.0166940962 ISR -0.064435947 0.0572593763 ITA 0.265878741 -0.2028426956 JOR -0.092289809 0.0002238331 KOR 0.319338625 0.7660595682 LVA -0.094250082 0.0027884600 LTU -0.092067346 0.0007685751 MUS -0.095363522 0.0031358638 OMN -0.091848513 0.0027583472 NLD 0.006713526 -0.0434386069 NOR -0.056416762 0.0110429687 PER -0.071906324 -0.0263233554 POL -0.012318703 -0.0570011951 PRT -0.064713476 -0.0267103112 QAT -0.088128756 0.0011987559 ROU -0.076553875 -0.0081949170 RUS 0.107162852 -0.1323848027 SEN -0.096502017 0.0053292664 SGP -0.049577168 0.1408994489 SVK -0.086329019 0.0034339863 SVN -0.087353531 -0.0003946482 ESP 0.104019498 -0.1486752780 SWE -0.016055342 -0.0004929169 CHE 0.016380413 0.0995051653 TUR -0.019582662 -0.0637964014 GBR 0.282330103 -0.0965923141 YEM -0.094708238 0.0022940522 > print(res$B) F1 F2 LAGRO -0.4522731 -0.32286805 LNAGR -0.4461220 -0.28492693 MLOW -0.4769222 -0.09262731 MHIGH -0.4758174 -0.04465725 HIGH -0.3775807 0.89665979 > print(res$C) F1 F2 2000 -0.1848633 -0.26632247 2001 -0.1729891 -0.32897931 2002 -0.1813847 -0.24572500 2003 -0.2124248 -0.30011371 2004 -0.2474910 -0.24172958 2005 -0.2602204 -0.17627971 2006 -0.2821832 -0.11310552 2007 -0.3169123 -0.15767468 2008 -0.3082636 -0.18861778 2009 -0.2528243 0.09224801 2010 -0.3023286 0.40233952 2011 -0.3279810 0.29491632 2012 -0.3048811 0.33801896 2013 -0.3130100 0.36883351 > print(res$rd) ALB AUT BEL BRA BGR CAN TWN 0.02811113 0.02609412 0.02730265 0.35350958 0.02445912 0.15825641 0.07858821 COL CRI CYP CZE DNK ECU EST 0.03064373 0.02560150 0.02690731 0.02952023 0.04149479 0.02136739 0.02657734 FIN FRA GEO PSE DEU HUN IND 0.04110395 0.12349636 0.02799364 0.02773334 0.32896741 0.02917542 0.15038111 IDN IRN ISR ITA JOR KOR LVA 0.14463026 0.07162618 0.02860180 0.11620387 0.02467293 0.14327596 0.02592863 LTU MUS OMN NLD NOR PER POL 0.02655173 0.02639179 0.02818850 0.05103516 0.02645437 0.02723209 0.03517443 PRT QAT ROU RUS SEN SGP SVK 0.02031810 0.03390490 0.01956678 0.25355903 0.02803341 0.04980268 0.02647047 SVN ESP SWE CHE TUR GBR YEM 0.02837246 0.10459098 0.03781012 0.06320181 0.05098531 0.34562690 0.02504211 > print(res$cutoff.rd) [1] 0.2305881 > > ## Robust Tucker 3 > (res.r <- Tucker3(va3way, robust=TRUE, center=TRUE, + scale=TRUE)) Call: Tucker3(X = va3way, center = TRUE, scale = TRUE, robust = TRUE) Tucker3 analysis with 2 x 2 x 2 components. Fit value: 217.7733 Fit percentage: 99.64 % Robust> print(res.r$fit) [1] 217.7733 > print(res.r$A) F1 F2 ALB -8.064174e-02 -0.003133327 AUT 1.138889e-01 -0.028249841 BEL 1.075538e-01 -0.079943755 BRA 7.553570e-01 -0.399050420 BGR -6.677393e-02 -0.013038522 CAN 5.302771e-01 -0.101983257 TWN 4.593528e-01 1.954039322 COL -2.483072e-05 -0.110980283 CRI -7.011762e-02 -0.013664308 CYP -7.642292e-02 -0.008748327 CZE 2.016141e-02 -0.023869846 DNK 4.564230e-02 -0.006467468 ECU -6.323053e-02 -0.034085584 EST -7.259193e-02 -0.005907085 FIN 6.162608e-02 0.128890263 FRA 8.598689e-01 0.419204651 GEO -8.023908e-02 -0.002586044 PSE -7.868164e-02 -0.006075833 DEU 1.731350e+00 0.552883773 HUN -1.408212e-02 0.040919444 IND 2.435866e-01 -0.099223452 IDN 1.274212e-01 0.010134842 IRN 1.691723e-02 -0.085850905 ISR 2.142437e-02 0.268683385 ITA 8.505300e-01 -0.243794865 JOR -7.099427e-02 -0.015716644 KOR 1.169039e+00 3.570922549 LVA -7.459316e-02 -0.007636254 LTU -6.862522e-02 -0.009471865 MUS -7.776027e-02 -0.008045172 OMN -6.984161e-02 -0.017380619 NLD 1.930385e-01 -0.004122341 NOR 3.447573e-02 0.099967957 PER -2.604942e-02 -0.073788304 POL 1.288417e-01 -0.107373885 PRT -2.011993e-03 -0.067933018 QAT -6.175736e-02 -0.025335820 ROU -3.123224e-02 -0.018722029 RUS 3.925068e-01 -0.393418536 SEN -8.021883e-02 -0.003826492 SGP 8.253689e-02 0.639154222 SVK -5.491314e-02 0.001136505 SVN -5.681436e-02 -0.014087309 ESP 4.272509e-01 -0.311874350 SWE 1.358193e-01 0.111198805 CHE 2.492654e-01 0.592948597 TUR 9.375660e-02 -0.148744320 GBR 1.000136e+00 0.356190033 YEM -7.665402e-02 -0.011014726 > print(res.r$B) F1 F2 LAGRO -0.3990650 -0.3353722 LNAGR -0.5697306 -0.1562060 MLOW -0.4504804 -0.3083110 MHIGH -0.3686196 -0.0196813 HIGH -0.4211188 0.8761747 > print(res.r$C) F1 F2 2000 -0.1986107 -0.09177243 2001 -0.1865768 -0.21960041 2002 -0.2003950 -0.14661833 2003 -0.2362574 -0.24624700 2004 -0.2699503 -0.27600119 2005 -0.2757670 -0.17593837 2006 -0.2944379 -0.15473368 2007 -0.3353762 -0.19345176 2008 -0.3371355 -0.19983157 2009 -0.2536497 0.06192905 2010 -0.2721131 0.28153997 2011 -0.2923990 0.34051027 2012 -0.2654391 0.47775197 2013 -0.2714342 0.47486323 > print(res.r$rd) ALB AUT BEL BRA BGR CAN TWN COL 1.380089 2.116742 2.231365 32.045604 1.124988 13.912330 13.916800 2.500893 CRI CYP CZE DNK ECU EST FIN FRA 1.223732 1.421149 1.869016 3.223279 1.234099 1.385680 5.304373 9.431560 GEO PSE DEU HUN IND IDN IRN ISR 1.359015 1.377888 40.733805 1.245043 15.350237 11.586305 6.314027 2.645277 ITA JOR KOR LVA LTU MUS OMN NLD 5.138176 1.091762 36.939485 1.387402 1.440716 1.334793 1.405051 4.353174 NOR PER POL PRT QAT ROU RUS SEN 2.665548 2.277808 2.939997 1.918752 1.951468 1.147908 23.071065 1.364326 SGP SVK SVN ESP SWE CHE TUR GBR 2.136849 1.028095 1.425646 6.494964 3.408464 3.649688 4.199792 26.725928 YEM 1.216319 > print(res$cutoff.rd) [1] 0.2305881 > print(res.r$Hset) [1] 1 2 3 5 8 9 10 11 12 13 14 15 17 18 20 24 25 26 28 29 30 31 32 33 34 [26] 35 36 37 38 40 41 42 43 45 46 47 49 > print(res.r$flag) ALB AUT BEL BRA BGR CAN TWN COL CRI CYP CZE DNK ECU TRUE TRUE TRUE FALSE TRUE FALSE FALSE TRUE TRUE TRUE TRUE TRUE TRUE EST FIN FRA GEO PSE DEU HUN IND IDN IRN ISR ITA JOR TRUE TRUE FALSE TRUE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE KOR LVA LTU MUS OMN NLD NOR PER POL PRT QAT ROU RUS FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE SEN SGP SVK SVN ESP SWE CHE TUR GBR YEM TRUE FALSE TRUE TRUE FALSE FALSE FALSE TRUE FALSE TRUE > > ## Compositional Tucker 3 > (res.c <- Tucker3(va3way, coda.transform="ilr")) Call: Tucker3(X = va3way, coda.transform = "ilr") Tucker3 analysis with 2 x 2 x 2 components. Fit value: 489.8535 Fit percentage: 89.53 % ilr-transformed > print(res.c$fit) [1] 489.8535 > print(res.c$A) F1 F2 ALB -0.141027987 0.022302485 AUT -0.073638441 -0.102419501 BEL -0.096583559 -0.126016940 BRA -0.108678773 -0.135823883 BGR -0.115937375 -0.058287270 CAN -0.080625696 -0.126590957 TWN 0.027273048 -0.223907933 COL -0.187688274 -0.006985862 CRI -0.283577628 0.136633188 CYP -0.176649321 0.130198263 CZE -0.090714445 -0.138744624 DNK -0.060385774 -0.071543802 ECU -0.294384237 0.076982373 EST -0.085296718 0.031268096 FIN -0.034948623 -0.134404567 FRA -0.051257317 -0.133217515 GEO -0.098724347 -0.022268320 PSE -0.284277361 0.262778589 DEU -0.058662211 -0.177978597 HUN -0.057855166 -0.198097263 IND -0.109173950 -0.218688855 IDN -0.083426406 -0.153788087 IRN -0.155369032 -0.316931432 ISR 0.013950021 -0.136293182 ITA -0.081877160 -0.092652470 JOR -0.213598432 0.015052777 KOR -0.012948115 -0.296732307 LVA -0.096862792 0.044870018 LTU -0.080347970 0.045098931 MUS -0.172127466 0.231036848 OMN -0.238764115 -0.071493064 NLD -0.063744207 -0.088416717 NOR -0.028029281 -0.088254558 PER -0.197759424 0.076441887 POL -0.096024755 -0.065624955 PRT -0.111641786 -0.009846018 QAT -0.353953789 -0.014116169 ROU -0.091466436 -0.061096782 RUS -0.130889887 -0.112869235 SEN -0.186997420 -0.086370595 SGP 0.067054302 -0.269324590 SVK -0.087172304 -0.148800275 SVN -0.097342246 -0.105950058 ESP -0.102956356 -0.066225265 SWE -0.054647952 -0.139364609 CHE -0.007754913 -0.166190643 TUR -0.130006322 -0.091150428 GBR -0.037643198 -0.074267181 YEM -0.275487553 0.266219675 > print(res.c$B) F1 F2 Z1 -0.42819116 0.3624405 Z2 0.25136862 -0.4945595 Z3 -0.01484778 -0.7267615 Z4 -0.86789728 -0.3096216 > print(res.c$Bclr) F1 F2 LAGRO -0.3985100 -0.2246504 LNAGR 0.2070438 -0.7372187 MLOW -0.4035955 0.1247746 MHIGH -0.1812092 0.5601604 HIGH 0.7762709 0.2769340 > print(res.c$C) F1 F2 2000 -0.2614741 -0.22496119 2001 -0.2534857 -0.19768058 2002 -0.2575245 -0.24055948 2003 -0.2642941 -0.24584402 2004 -0.2685754 -0.28500904 2005 -0.2693028 -0.19786492 2006 -0.2728145 -0.15032781 2007 -0.2761688 -0.08024251 2008 -0.2713860 0.09288687 2009 -0.2754901 0.13545670 2010 -0.2713661 0.23407767 2011 -0.2884192 0.15516577 2012 -0.2664464 0.43039926 2013 -0.2418436 0.59287429 > print(res.c$rd) ALB AUT BEL BRA BGR CAN TWN 5.2172367 1.1287803 1.2765110 1.4896636 1.9715626 2.4165468 3.0860341 COL CRI CYP CZE DNK ECU EST 1.5593152 6.0728107 2.6943549 1.0649640 2.2487272 2.5433152 2.2589828 FIN FRA GEO PSE DEU HUN IND 2.8329818 0.9267417 4.4565940 4.6664430 2.0082764 1.1582638 1.6831295 IDN IRN ISR ITA JOR KOR LVA 4.4489454 1.8281414 3.1284317 0.6742614 2.4303793 3.0226388 3.6389298 LTU MUS OMN NLD NOR PER POL 3.2027736 5.2939492 5.6791235 1.4971629 2.0017874 2.1140222 1.2501827 PRT QAT ROU RUS SEN SGP SVK 2.1391853 10.2386149 2.2453030 2.0549622 2.8449604 2.1340106 1.3277102 SVN ESP SWE CHE TUR GBR YEM 2.2948261 0.8184396 2.0483813 1.4394787 1.7575560 1.2950253 4.5464501 > print(res$cutoff.rd) [1] 0.2305881 > > ## Robust, compositional Tucker 3 > (res.rc <- Tucker3(va3way, robust=TRUE, coda.transform="ilr", + center=TRUE, scale=TRUE)) Call: Tucker3(X = va3way, center = TRUE, scale = TRUE, robust = TRUE, coda.transform = "ilr") Tucker3 analysis with 2 x 2 x 2 components. Fit value: 388.9141 Fit percentage: 93.17 % Robust, ilr-transformed > print(res.rc$fit) [1] 388.9141 > print(res.rc$A) F1 F2 ALB 0.231223807 -0.041289085 AUT -0.066022070 0.020246480 BEL -0.057088261 -0.048795790 BRA -0.003055353 -0.103692517 BGR 0.072292457 -0.002729626 CAN -0.017273327 -0.016108699 TWN -0.227133471 -0.003729432 COL 0.172267118 -0.116915302 CRI 0.350280508 -0.075590139 CYP 0.284910968 0.064197216 CZE -0.083012349 -0.082196065 DNK -0.059837282 0.141252192 ECU 0.344520851 -0.355541085 EST 0.116594556 0.188206663 FIN -0.064628581 0.082733841 FRA -0.085629995 0.047281877 GEO 0.133265287 0.040450611 PSE 0.443002394 -0.050471087 DEU -0.171172390 -0.025527593 HUN -0.135042456 -0.052888272 IND -0.082767793 -0.267612628 IDN 0.034704763 0.014034324 IRN -0.128650990 -0.525208789 ISR -0.126080811 0.137252447 ITA -0.034205325 0.013130566 JOR 0.186301561 -0.138233404 KOR -0.219803798 -0.129227784 LVA 0.181880698 0.213107747 LTU 0.134699678 0.215566704 MUS 0.462931652 0.240974180 OMN 0.056346751 -0.504416353 NLD -0.045998606 0.104735611 NOR -0.053021462 0.168851397 PER 0.255155261 -0.049599350 POL 0.009802977 0.010293247 PRT 0.101579040 0.069158023 QAT 0.074140362 -0.651627604 ROU 0.052772061 0.058085589 RUS 0.008066859 -0.218510940 SEN 0.150789416 -0.222082169 SGP -0.382567308 0.118698963 SVK -0.087409856 -0.106227575 SVN -0.063938224 -0.028727795 ESP 0.006311762 -0.009507542 SWE -0.100988763 0.055675977 CHE -0.184199671 0.126299786 TUR 0.057779731 -0.089240735 GBR -0.064026446 0.172007363 YEM 0.548677215 -0.100145112 > print(res.rc$B) F1 F2 Z1 -0.3629142 0.3966306 Z2 -0.2713426 -0.8013415 Z3 -0.6692744 -0.2288497 Z4 -0.5888448 0.3849205 > print(res.rc$Bclr) F1 F2 LAGRO -0.6922669 -0.02667845 LNAGR -0.1790286 -0.58759887 MLOW -0.1033223 0.67430021 MHIGH 0.4479390 0.28426047 HIGH 0.5266788 -0.34428336 > print(res.rc$C) F1 F2 2000 -0.2800233 -0.606150536 2001 -0.2728596 -0.252643641 2002 -0.2674738 -0.005956697 2003 -0.2734309 0.063525948 2004 -0.2775422 0.359005553 2005 -0.2793016 0.253392304 2006 -0.2806436 0.229544844 2007 -0.2904156 0.158606437 2008 -0.2735771 -0.073824713 2009 -0.2617282 -0.015121353 2010 -0.2531187 0.267795389 2011 -0.2277536 0.161091991 2012 -0.2511008 -0.149951964 2013 -0.2456590 -0.409771730 > print(res.rc$rd) ALB AUT BEL BRA BGR CAN TWN COL 7.430601 2.110942 1.767806 2.465031 2.358242 4.683643 7.271762 2.525254 CRI CYP CZE DNK ECU EST FIN FRA 10.715591 4.566368 2.053380 3.800329 4.966142 2.554128 3.698194 1.373458 GEO PSE DEU HUN IND IDN IRN ISR 6.183247 10.342252 2.669137 2.174521 3.616544 7.807655 3.607692 6.553834 ITA JOR KOR LVA LTU MUS OMN NLD 1.342343 4.479465 7.288118 3.441364 3.390422 4.802956 11.526197 2.016805 NOR PER POL PRT QAT ROU RUS SEN 2.938336 3.692979 2.611099 1.873587 18.674522 2.377791 4.254345 4.849159 SGP SVK SVN ESP SWE CHE TUR GBR 4.615551 2.422941 3.702667 2.189249 2.409373 1.796525 2.533135 1.959432 YEM 7.612834 > print(res$cutoff.rd) [1] 0.2305881 > print(res.rc$Hset) [1] 2 3 4 5 6 8 10 11 12 13 14 15 16 19 20 21 23 25 26 28 29 30 32 33 34 [26] 35 36 38 39 40 42 43 44 45 46 47 48 > print(res.rc$flag) ALB AUT BEL BRA BGR CAN TWN COL CRI CYP CZE DNK ECU FALSE TRUE TRUE TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE TRUE FALSE EST FIN FRA GEO PSE DEU HUN IND IDN IRN ISR ITA JOR TRUE TRUE TRUE FALSE FALSE TRUE TRUE TRUE FALSE FALSE FALSE TRUE TRUE KOR LVA LTU MUS OMN NLD NOR PER POL PRT QAT ROU RUS FALSE TRUE TRUE FALSE FALSE TRUE TRUE TRUE TRUE TRUE FALSE TRUE TRUE SEN SGP SVK SVN ESP SWE CHE TUR GBR YEM TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE > > ##================================================================ > ## > ## Example with the TV data from ThreeWay: ratings of 15 American television > ## shows on 16 bipolar scales made by 30 students: 15x16x30 array > ## in A-mode, i.e. 15x450. > data(TV, package="ThreeWay") > > ## Transform to 3-way array, to pass to Parafac() and set the dimnames > tv <- toArray(TV[[1]], 30, 16, 15, mode="B") > dimnames(tv)[[1]] <- TV[[4]] > dimnames(tv)[[2]] <- TV[[2]] > dimnames(tv)[[3]] <- TV[[3]] > > (tvt3 <- Tucker3(tv, 2, 3, 4)) Call: Tucker3(X = tv, P = 2, Q = 3, R = 4) Tucker3 analysis with 2 x 3 x 4 components. Fit value: 51113.12 Fit percentage: 49.54 % > tvt3$A; tvt3$B; tvt3$C; tvt3$GA F1 F2 Student 1 -0.17489013 0.006673778 Student 2 -0.20459811 -0.211979439 Student 3 -0.20870735 -0.227309447 Student 4 -0.10086613 -0.119596915 Student 5 -0.09320443 -0.093920739 Student 6 -0.18186463 0.356850317 Student 7 -0.11330372 -0.134520253 Student 8 -0.15011494 0.230290876 Student 9 -0.24295534 0.105938750 Student 10 -0.24465546 0.003575873 Student 11 -0.13277162 0.068493992 Student 12 -0.23287101 -0.098897111 Student 13 -0.25030772 -0.014478232 Student 14 -0.15428421 -0.042514086 Student 15 -0.16501151 -0.101521293 Student 16 -0.12011044 -0.097472036 Student 17 -0.15923782 0.295985627 Student 18 -0.21701558 0.235239976 Student 19 -0.19667782 -0.077835320 Student 20 -0.15107959 -0.165933822 Student 21 -0.19789284 0.490252017 Student 22 -0.21793787 -0.030872260 Student 23 -0.20673655 0.005302170 Student 24 -0.18727701 -0.254228658 Student 25 -0.18213842 -0.019346834 Student 26 -0.15704424 -0.127005065 Student 27 -0.19148413 0.156473100 Student 28 -0.19043168 0.042035523 Student 29 -0.15741129 -0.095847051 Student 30 -0.15445310 -0.315882566 F1 F2 Thrilling-Boring -0.22738747 0.202434516 Intelligent-Idiotic -0.35251145 -0.029094751 Erotic-Not Erotic 0.06633832 0.395687664 Sensitive-Insensitive -0.20568351 -0.020631059 Interesting-Uninteresting -0.33776282 0.120800104 Fast-Slow -0.19755152 0.175397496 Intellectually Stimulating-Intellectually Dull -0.35976001 0.016312285 Violent-Peaceful -0.04394433 0.042372009 Caring-Callous -0.18153949 -0.050429407 Satirical-Not Satirical -0.01531449 0.619352846 Informative-Uninformative -0.37891205 -0.060266802 Touching-Leave Me Cold -0.18171262 0.072222879 Deep-Shallow -0.26248398 0.000668462 Tasteful-Crude -0.25384128 -0.150496841 Real-Fantasy -0.37249340 -0.256517155 Funny-Not Funny -0.10481381 0.519923906 F3 Thrilling-Boring -0.23968215 Intelligent-Idiotic -0.08609005 Erotic-Not Erotic -0.01719274 Sensitive-Insensitive 0.38547968 Interesting-Uninteresting -0.14857531 Fast-Slow -0.26248959 Intellectually Stimulating-Intellectually Dull -0.05582925 Violent-Peaceful -0.56117757 Caring-Callous 0.37480050 Satirical-Not Satirical 0.07094593 Informative-Uninformative -0.10433994 Touching-Leave Me Cold 0.27272891 Deep-Shallow 0.15882260 Tasteful-Crude 0.25276498 Real-Fantasy -0.14446844 Funny-Not Funny 0.19098615 F1 F2 F3 F4 Mash -0.332960400 0.34854755 0.01615412 0.26466548 Charlie's angels 0.322064058 -0.20473971 -0.26124914 0.10011077 All in the family -0.087943588 0.18925842 0.03632832 0.23933144 60 minutes -0.463093733 -0.07270938 -0.09390710 -0.03601467 The tonight show -0.142481415 0.19142250 -0.17862149 0.40727813 Let's make a deal 0.346720906 -0.26712620 -0.15124887 0.02037712 The waltons -0.004077061 -0.39349123 0.33305039 0.33935981 Saturday night live 0.131069053 0.20857061 -0.42092667 0.31894796 News -0.368595113 -0.19472333 -0.24058195 -0.22157766 Kojak 0.092867488 -0.14072779 -0.35017066 0.09473422 Mork and mindy 0.072562764 0.19494559 0.02908051 0.47281363 Jacques Cousteau -0.424016533 -0.25247342 -0.02132971 0.03914203 Football -0.053062712 -0.22852257 -0.55480479 0.03753771 Little house on the prairie 0.060845640 -0.40561295 0.28983744 0.37988349 Wild kingdom -0.263534115 -0.33606887 -0.06965685 0.22202080 F1 F2 F3 F4 F5 F6 F7 F1 163.1502217 18.8191209 2.804437 -11.40398 98.223149 -1.715064 -0.08806971 F2 0.9749032 0.8012264 3.083994 33.35011 -3.722912 -4.437220 32.92701959 F8 F9 F10 F11 F12 F1 -10.45981 73.289073 -2.773459 20.17811 37.423394 F2 -18.58762 -3.778268 -55.530285 20.86814 1.756283 > tvt3$cutoff.rd [1] 56.32446 > sort(tvt3$rd) Student 5 Student 4 Student 16 Student 7 Student 14 Student 20 Student 24 24.92741 28.58745 28.72700 29.45604 31.46744 31.73021 33.28338 Student 15 Student 26 Student 29 Student 11 Student 3 Student 12 Student 9 37.52909 37.65508 37.66888 38.00710 39.13542 39.16111 40.85074 Student 8 Student 27 Student 10 Student 1 Student 17 Student 2 Student 22 41.49881 42.33881 42.45805 43.35130 43.43189 43.74846 43.95058 Student 28 Student 30 Student 23 Student 19 Student 13 Student 21 Student 18 44.11821 45.09728 46.42146 46.69099 48.68655 48.77251 48.83630 Student 25 Student 6 55.09029 55.13740 > tvt3$cutoff.sd [1] 2.716203 > sort(tvt3$sd) Student 1 Student 25 Student 28 Student 15 Student 14 Student 29 Student 19 0.1175520 0.1307967 0.3702913 0.5513395 0.5728773 0.6282237 0.6497450 Student 23 Student 26 Student 27 Student 20 Student 22 Student 11 Student 2 0.6936727 0.7512668 0.9004137 0.9859502 1.0076335 1.2477835 1.3952361 Student 16 Student 24 Student 18 Student 12 Student 3 Student 8 Student 9 1.4054784 1.4117090 1.4891754 1.5147623 1.5320641 1.5777541 1.5946053 Student 7 Student 10 Student 30 Student 13 Student 17 Student 4 Student 6 1.6014381 1.6181106 1.6813581 1.7734508 1.8057284 1.8668573 1.9837723 Student 5 Student 21 2.0334181 2.6841938 > > (rtvt3 <- Tucker3(tv, 2, 3, 4, robust=TRUE)) Call: Tucker3(X = tv, P = 2, Q = 3, R = 4, robust = TRUE) Tucker3 analysis with 2 x 3 x 4 components. Fit value: 47736.97 Fit percentage: 52.87 % Robust> rtvt3$A; rtvt3$B; rtvt3$C; rtvt3$GA F1 F2 Student 1 -0.1784099 0.040381078 Student 2 -0.2095940 -0.191716995 Student 3 -0.2142685 -0.227340409 Student 4 -0.1026105 -0.134485162 Student 5 -0.0950061 -0.101803916 Student 6 -0.1728057 0.249149884 Student 7 -0.1153179 -0.157692845 Student 8 -0.1521154 0.289933859 Student 9 -0.2462461 0.129065191 Student 10 -0.2484680 0.035720296 Student 11 -0.1351008 0.095213490 Student 12 -0.2393829 -0.051981715 Student 13 -0.2539285 0.009717806 Student 14 -0.1573227 -0.025432754 Student 15 -0.1692510 -0.084447583 Student 16 -0.1229871 -0.096303177 Student 17 -0.1585730 0.298585044 Student 18 -0.2167387 0.242384877 Student 19 -0.2008158 -0.075465912 Student 20 -0.1548551 -0.165036057 Student 21 -0.1964345 0.504760803 Student 22 -0.2213127 -0.023259497 Student 23 -0.2101631 0.018789870 Student 24 -0.1912728 -0.275400246 Student 25 -0.1874979 0.043061430 Student 26 -0.1601450 -0.135381063 Student 27 -0.1936328 0.185992406 Student 28 -0.1938429 0.070318128 Student 29 -0.1609695 -0.089962809 Student 30 -0.1577199 -0.381485483 F1 F2 Thrilling-Boring -0.22666205 0.20634299 Intelligent-Idiotic -0.34866814 -0.02864448 Erotic-Not Erotic 0.07980924 0.38834888 Sensitive-Insensitive -0.19566159 -0.03502165 Interesting-Uninteresting -0.34035181 0.12878297 Fast-Slow -0.19415508 0.17895929 Intellectually Stimulating-Intellectually Dull -0.36086352 0.02723353 Violent-Peaceful -0.05665074 0.06665449 Caring-Callous -0.17890390 -0.05461051 Satirical-Not Satirical -0.01127112 0.62245574 Informative-Uninformative -0.38338117 -0.04671221 Touching-Leave Me Cold -0.18237593 0.06741000 Deep-Shallow -0.26086316 0.00461667 Tasteful-Crude -0.25074147 -0.16123752 Real-Fantasy -0.37732758 -0.25014518 Funny-Not Funny -0.09880189 0.51479478 F3 Thrilling-Boring -0.23020804 Intelligent-Idiotic -0.07817190 Erotic-Not Erotic -0.01187755 Sensitive-Insensitive 0.39096587 Interesting-Uninteresting -0.14837751 Fast-Slow -0.26623737 Intellectually Stimulating-Intellectually Dull -0.04858745 Violent-Peaceful -0.55386345 Caring-Callous 0.37602339 Satirical-Not Satirical 0.10044683 Informative-Uninformative -0.09941046 Touching-Leave Me Cold 0.27469424 Deep-Shallow 0.16428992 Tasteful-Crude 0.24386856 Real-Fantasy -0.13765742 Funny-Not Funny 0.20889998 F1 F2 F3 F4 Mash -0.32711663 0.35138729 -0.17613016 0.20324733 Charlie's angels 0.30435144 -0.18375421 0.20590105 0.23616121 All in the family -0.07343327 0.17053533 -0.15890321 0.25424933 60 minutes -0.46107779 -0.05739635 0.10332564 0.03711346 The tonight show -0.14788151 0.20547771 -0.04965087 0.41721147 Let's make a deal 0.33402158 -0.27989441 0.16101679 0.14664829 The waltons -0.01006290 -0.44169035 -0.41415049 0.19587490 Saturday night live 0.11351933 0.27520062 0.19568588 0.42646061 News -0.36773724 -0.17329331 0.33380269 -0.01576576 Kojak 0.08763417 -0.13388357 0.28685065 0.34746413 Mork and mindy 0.07691915 0.16972511 -0.25363604 0.42975764 Jacques Cousteau -0.43223691 -0.23173627 0.00568034 0.05755011 Football -0.08770329 -0.15883774 0.49856535 0.23186754 Little house on the prairie 0.04164887 -0.43102953 -0.38107328 0.20965878 Wild kingdom -0.30144694 -0.27841953 -0.02441341 0.11995264 F1 F2 F3 F4 F5 F6 F7 F1 160.342604 20.422309 3.2373074 -13.07578 97.76183 -6.738338 2.2894826 F2 4.050209 -2.376177 0.5051424 26.99753 -6.21846 -4.418202 0.8917613 F8 F9 F10 F11 F12 F1 -5.091781 -80.12858 -0.4600609 19.14867 0.1286844 F2 3.720343 2.99344 -62.0221519 29.04774 4.9838569 > rtvt3$cutoff.rd [1] 57.3163 > sort(rtvt3$rd) Student 5 Student 4 Student 16 Student 7 Student 14 Student 20 Student 24 24.79540 28.33292 28.65696 28.94479 31.44571 31.70518 32.61760 Student 26 Student 15 Student 29 Student 11 Student 3 Student 12 Student 8 37.48928 37.51535 37.61541 37.68008 38.96767 38.97970 39.79789 Student 9 Student 27 Student 10 Student 30 Student 1 Student 28 Student 22 40.67640 41.99968 42.36678 42.70388 43.10292 43.84055 43.97869 Student 2 Student 17 Student 23 Student 19 Student 13 Student 18 Student 21 44.19240 44.39477 46.35442 46.54289 48.74707 49.65658 50.14568 Student 25 Student 6 54.64914 60.47808 > rtvt3$cutoff.sd [1] 2.716203 > sort(rtvt3$sd) Student 1 Student 25 Student 15 Student 14 Student 29 Student 28 Student 19 0.3318184 0.3498314 0.4060964 0.4933598 0.5291604 0.5305863 0.6051141 Student 23 Student 26 Student 20 Student 22 Student 27 Student 16 Student 11 0.6588443 0.7239753 0.9090302 0.9147273 1.1247482 1.2547264 1.2615758 Student 2 Student 12 Student 10 Student 7 Student 3 Student 24 Student 6 1.2622537 1.3531647 1.4831515 1.4996974 1.5009087 1.5046865 1.5266218 Student 18 Student 9 Student 13 Student 4 Student 5 Student 17 Student 8 1.5340167 1.5417122 1.6064823 1.7138361 1.8468365 1.9071725 1.9236437 Student 30 Student 21 2.0075504 2.8785939 > > ## =============================================================== > ## > ## Compositional data and robustness > > data(ulabor) > > (res0 <- Tucker3(ulabor)) Call: Tucker3(X = ulabor) Tucker3 analysis with 2 x 2 x 2 components. Fit value: 3094.402 Fit percentage: 97.68 % > res0$A; res0$B; res0$C; res0$GA F1 F2 Pie -0.1226452 -0.18425255 VdA -0.1311076 -0.30919102 Lom -0.1534299 -0.23394761 Lig -0.1738614 -0.19015900 Tno -0.1165526 -0.08905375 Bol -0.1075245 -0.07925734 Tre -0.1291363 -0.10695056 Ven -0.1431241 -0.26219749 Fri -0.1695501 -0.32296107 Emi -0.1168053 -0.24930458 Tos -0.1174516 -0.13500323 Umb -0.1672253 -0.13873282 Mar -0.1414540 -0.23770618 Laz -0.2246361 -0.13884625 Abr -0.2028981 -0.10167030 Mol -0.2574295 0.19573327 Cam -0.2839566 -0.06611372 Pug -0.2505682 0.05226313 Bas -0.2964094 0.29407648 Cal -0.4386651 0.46809340 Sic -0.3218117 0.20843829 Sar -0.2497427 0.02569405 F1 F2 Agri -0.6132388 0.6413230 Man -0.3560228 -0.4510299 Ind -0.2955415 -0.4087751 Con -0.4489799 -0.4313589 Serv -0.4563532 0.1791908 F1 F2 2001 -0.4597844 -0.7070493 2003 -0.4073652 -0.3147995 2005 -0.4463456 0.1104435 2007 -0.4498652 0.4705044 2009 -0.4701584 0.4091581 F1 F2 F3 F4 F1 -344.6703143 0.2270326 -4.298777 -13.64835 F2 0.5858949 105.7873290 3.025463 -13.99349 > res0$cutoff.rd [1] 20.33457 > sort(res0$rd) Lig VdA Fri Tos Ven Umb Mar Tno 5.003229 6.123990 6.626562 7.010471 7.197907 7.928168 8.372129 8.691218 Pie Emi Sar Bol Tre Pug Mol Sic 8.704637 8.728375 9.036189 9.757596 9.996580 11.462844 12.395193 13.073690 Cal Lom Abr Cam Laz Bas 13.190304 13.241743 15.095653 16.103213 18.355969 24.906672 > res0$cutoff.sd [1] 2.716203 > sort(res0$sd) Umb Abr Sar Pug Lig Mar Lom Pie 0.3445409 0.4068142 0.6357496 0.6491657 0.7194959 0.8088864 0.8510333 0.9356225 Emi Ven Laz VdA Tre Tos Sic Mol 0.9381037 0.9776802 1.2104839 1.2289243 1.2443118 1.3072418 1.4872107 1.5179890 Tno Fri Bas Cam Bol Cal 1.6605976 1.8566674 1.9128369 1.9187850 1.9399920 2.8678966 > > (res <- Tucker3(ulabor, robust=TRUE, coda.transform="ilr")) Call: Tucker3(X = ulabor, robust = TRUE, coda.transform = "ilr") Tucker3 analysis with 2 x 2 x 2 components. Fit value: 2.762726 Fit percentage: 99.5 % Robust, ilr-transformed > res$A; res$B; res$C; res$GA F1 F2 Pie -0.296719004 0.347578518 VdA -1.192798116 -1.549636136 Lom -0.387062108 -0.356114183 Lig -0.244284726 -0.002254923 Tno -0.150809446 0.381029644 Bol -0.138248593 0.538163021 Tre -0.170779495 0.246854296 Ven -0.429262416 -0.096256336 Fri -0.433817045 -0.091218367 Emi -0.378173056 0.766236270 Tos -0.295307116 -0.016866356 Umb -0.209117765 0.044319737 Mar -0.335644085 0.419327791 Laz -0.177242350 -0.249547935 Abr -0.221423992 -0.379549289 Mol -0.009408107 -0.069102854 Cam -0.120513080 -0.030764374 Pug -0.088269957 -0.139297184 Bas 0.039346574 0.048315025 Cal 0.019370714 -0.245345213 Sic -0.026826451 -0.184481163 Sar -0.088002293 -0.047731244 F1 F2 Z1 -0.70042350 0.1424862 Z2 -0.57011533 -0.3420312 Z3 0.04309928 0.8751678 Z4 0.42722111 -0.3111169 F1 F2 2001 -0.3574272 0.87849054 2003 -0.4537314 0.07768554 2005 -0.4830115 -0.15835135 2007 -0.4746531 -0.40923930 2009 -0.4558266 -0.17224219 F1 F2 F3 F4 F1 -1.271457e+01 -0.0002535782 -0.003604402 0.72645909 F2 7.424468e-04 -3.6464235172 0.167436112 0.01255162 > res$cutoff.rd [1] 0.6334538 > sort(res$rd) Sar Cal Lig Fri Umb Sic Mar Pie 0.2930165 0.3236575 0.3390816 0.3443669 0.3716360 0.3842956 0.3895519 0.4053189 Mol Ven Pug Bol Abr Tos Lom Bas 0.4304479 0.4478160 0.4490188 0.4592937 0.4625557 0.4677726 0.4858171 0.5191697 Tno Cam Emi Tre Laz VdA 0.6393017 0.6533840 0.8389237 1.0198847 1.1601753 7.5562402 > res$cutoff.sd [1] 2.716203 > sort(res$sd) Umb Lig Cam Tre Tos Sar Pug 0.07523157 0.35494035 0.50154495 0.68786900 0.68845683 0.70394097 0.81010632 Laz Pie Tno Sic Mol Mar Abr 0.88862852 1.03680886 1.14578926 1.18272969 1.19006741 1.32755095 1.34539511 Cal Bas Ven Fri Bol Lom Emi 1.50263368 1.52358074 1.62741966 1.64898230 1.65269573 1.89312599 2.32332183 VdA 8.79023375 > > (res1 <- Tucker3(ulabor, coda.transform="clr")) Call: Tucker3(X = ulabor, coda.transform = "clr") Tucker3 analysis with 2 x 2 x 2 components. Fit value: 16.85426 Fit percentage: 96.95 % clr-transformed > res1$A; res1$B; res1$C; res1$GA F1 F2 Pie -0.152704163 0.285072998 VdA -0.796785490 -0.494582980 Lom -0.223637632 0.054933355 Lig -0.135164025 0.120579034 Tno -0.070500238 0.232298013 Bol -0.060458057 0.280366569 Tre -0.084264099 0.196018908 Ven -0.238480889 0.180228295 Fri -0.239296159 0.194099066 Emi -0.186463503 0.496993966 Tos -0.162909466 0.136512255 Umb -0.113113205 0.124075284 Mar -0.171186489 0.334362601 Laz -0.106533430 -0.005900492 Abr -0.133879572 -0.038399226 Mol -0.007931223 -0.030653143 Cam -0.066911120 0.054998377 Pug -0.053372551 -0.017374626 Bas 0.023425253 0.001525252 Cal 0.002010793 -0.112544520 Sic -0.021222785 -0.061935342 Sar -0.050961300 0.017446257 F1 F2 Agri -0.51259173 0.4325186 Man 0.13269489 -0.5050240 Ind 0.76493417 0.4522461 Con -0.01875069 -0.5648706 Serv -0.36628664 0.1851300 F1 F2 2001 -0.4123064 -0.73761234 2003 -0.4450999 -0.24975671 2005 -0.4625729 0.02967697 2007 -0.4623837 0.50201358 2009 -0.4517932 0.37503502 F1 F2 F3 F4 F1 -21.846926356 0.002935741 -0.04337169 -1.5283668 F2 -0.008772333 -7.466388268 -0.53337565 0.1269328 > res1$cutoff.rd [1] 1.516347 > sort(res1$rd) Sar Mol Lig Cal Umb Sic Bas Pie 0.3310151 0.4247673 0.4649938 0.5058137 0.5071936 0.5356133 0.5370439 0.5606867 Pug Mar Cam Tos Tno Bol Tre Ven 0.5836466 0.6667466 0.6915054 0.7699214 0.7896852 1.0055087 1.0116162 1.0541766 Fri Emi Abr VdA Laz Lom 1.0846236 1.0966857 1.1857495 1.2813976 1.3511090 1.4377815 > res1$cutoff.sd [1] 2.716203 > sort(res1$sd) Lig Umb Tos Lom Tre Cam Laz Abr 0.1676828 0.2009394 0.3560970 0.5137852 0.5559781 0.5677093 0.6297677 0.7076200 Tno Sar Pug Ven Bol Fri Pie Mol 0.7373928 0.8103053 0.9496281 0.9677175 0.9716804 1.0328052 1.1148091 1.2635660 Bas Sic Mar Cal Emi VdA 1.3231578 1.3289911 1.4421137 1.6895111 2.3755024 4.2460582 > > proc.time() user system elapsed 1.92 0.12 2.03