Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

congru

Tucker's Congruence Coefficient


Description

Calculates Tucker's congruence coefficient (uncentered correlation) between x and y if these are vectors. If x and y are matrices then the congruence between the columns of x and y are computed.

Usage

congru(x, y = NULL)

Arguments

x

Numeric vector, matrix or data frame.

y

NULL (default) or a vector, matrix or data frame with compatible dimensions to x. The default is equivalent to y = x (but more efficient).

Details

Tucker's congruence coefficient is defined as

r = \frac{∑_{i=1}^{n}x_{i}y_{i}}{ √{∑_{i=1}^{n}x_{i}^{2}∑_{i=1}^{n}y_{i}^{2}} }

where x_{i} and y_{i} denote the i-th elements of x and y.

Value

Returns a scalar or matrix with congruence coefficient(s).

Note

If x is a vector, you must also enter y.

Author(s)

Nathaniel E. Helwig <helwig@umn.edu>

References

Tucker, L.R. (1951). A method for synthesis of factor analysis studies (Personnel Research Section Report No. 984). Washington, DC: Department of the Army.

Examples

##########   EXAMPLE 1   ##########

set.seed(1)
A <- rnorm(100)
B <- rnorm(100)
C <- A*5
D <- A*(-0.5)
congru(A,B)
congru(A,C)
congru(A,D)



##########   EXAMPLE 2   ##########

set.seed(1)
A <- cbind(rnorm(20),rnorm(20))
B <- cbind(A[,1]*-0.5,rnorm(20))
congru(A)
congru(A,B)

multiway

Component Models for Multi-Way Data

v1.0-6
GPL (>= 2)
Authors
Nathaniel E. Helwig <helwig@umn.edu>
Initial release
2019-03-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.