congruence.array: Congruence coefficients for a 3-way array

Description Usage Arguments Value Author(s) See Also Examples

Description

Calculates congruence coefficients (or some other statistic) for the rows and columns of a three-way array over the last dimension (layers) of the array.

Typically, each layer of the array gives factor or component loadings for a different sample or rotation.

Usage

1
congruence.array(X, FUN = congruence.coef, stat.name = "phi", round = FALSE, scale = 1, ref = "last")

Arguments

X

A three-dimensional array

FUN

A function of two vector arguments, returning a single number

stat.name

Name for the statistic calculated

round

If TRUE, round the scaleed array to the nearest integer. If numeric, the the scaleed array is rounded to the given number of decimal places.

scale

Multiplier for the array returned

ref

Reference (baseline) level of the third dimension of X

Value

An array with one more row and column than X and the same number of layers, containing the calculated statistic in the last row and column.

Author(s)

Michael Friendly

See Also

congruence.coef, ~~~

Examples

1
2
3
4
NEO.sm <- transpose(NEO[1:12,,])
congruence.array(NEO.sm, scale=100, round=TRUE)

congruence.array(NEO.sm, FUN=function(a,b) max(abs(a-b)), stat.name="max.diff", round=2)

Example output

Loading required package: grid
, , Normative

     N1  N2  N3  N4  N5  N6  E1  E2  E3  E4  E5 E6 phi
N    81  63  80  73  49  70 -12 -18 -32   4   0 -4  97
E     2  -3 -10 -18  35 -15  66  66  44  54  58 74  96
O    -1   1   2  -9   2  -9  18   4  23  16  11 19  65
A    -1 -48  -3   4 -21   4  38   7 -32 -27 -38 10  76
C   -10  -8 -26 -16 -32 -38  13  -3  32  42  -6 10  93
phi  99  96  94  93  96  93  96  89  88  85  60 96  91

, , Shona

     N1  N2  N3  N4  N5  N6  E1  E2  E3  E4  E5 E6 phi
N    66  53  60  58  58  57 -24 -14 -51 -15  -2  4  97
E    -4 -18 -17 -11  20   5  61  59  22  35  35 65  96
O    -4   6  15  13  -3 -26   3  -1  27   5  52 30  65
A     1 -39   1  13 -34   3  39  39 -26   1  -4 25  76
C   -14 -16 -40 -19 -36 -46  21  -7  14  42 -30  9  93
phi  99  96  94  93  96  93  96  89  88  85  60 96  91

, , Normative

            N1    N2    N3    N4    N5    N6    E1    E2    E3    E4    E5
N         0.81  0.63  0.80  0.73  0.49  0.70 -0.12 -0.18 -0.32  0.04  0.00
E         0.02 -0.03 -0.10 -0.18  0.35 -0.15  0.66  0.66  0.44  0.54  0.58
O        -0.01  0.01  0.02 -0.09  0.02 -0.09  0.18  0.04  0.23  0.16  0.11
A        -0.01 -0.48 -0.03  0.04 -0.21  0.04  0.38  0.07 -0.32 -0.27 -0.38
C        -0.10 -0.08 -0.26 -0.16 -0.32 -0.38  0.13 -0.03  0.32  0.42 -0.06
max.diff  0.15  0.15  0.20  0.22  0.15  0.20  0.15  0.32  0.22  0.28  0.41
            E6 max.diff
N        -0.04     0.20
E         0.74     0.23
O         0.19     0.41
A         0.10     0.34
C         0.10     0.24
max.diff  0.15     0.41

, , Shona

            N1    N2    N3    N4    N5    N6    E1    E2    E3    E4    E5   E6
N         0.66  0.53  0.60  0.58  0.58  0.57 -0.24 -0.14 -0.51 -0.15 -0.02 0.04
E        -0.04 -0.18 -0.17 -0.11  0.20  0.05  0.61  0.59  0.22  0.35  0.35 0.65
O        -0.04  0.06  0.15  0.13 -0.03 -0.26  0.03 -0.01  0.27  0.05  0.52 0.30
A         0.01 -0.39  0.01  0.13 -0.34  0.03  0.39  0.39 -0.26  0.01 -0.04 0.25
C        -0.14 -0.16 -0.40 -0.19 -0.36 -0.46  0.21 -0.07  0.14  0.42 -0.30 0.09
max.diff  0.15  0.15  0.20  0.22  0.15  0.20  0.15  0.32  0.22  0.28  0.41 0.15
         max.diff
N            0.20
E            0.23
O            0.41
A            0.34
C            0.24
max.diff     0.41

tableplot documentation built on May 2, 2019, 7:41 a.m.