Learn R Programming

tableplot (version 0.3-5)

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

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

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.

See Also

congruence.coef, ~~~

Examples

Run this code
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)

Run the code above in your browser using DataLab