There are several ways to test if a matrix is the identity matrix. The most well known is the chi square test of Bartlett (1951) and Box (1949). A very straightforward test, discussed by Steiger (1980) is to find the sum of the squared correlations or the sum of the squared Fisher transformed correlations. Under the null hypothesis that all the correlations are equal, this sum is distributed as chi square. This is implemented in
cortest
and cortest.normal
Yet another test, is the Jennrich(1970) test of the equality of two matrices. This compares the differences between two matrices to the averages of two matrices using a chi square test. This is implemented in cortest.jennrich
.
Yet another option cortest.mat
is to compare the two matrices using an approach analogous to that used in evaluating the adequacy of a factor model. In factor analysis, the maximum likelihood fit statistic is
\(f = log(trace ((FF'+U2)^{-1} R) - log(|(FF'+U2)^{-1} R|) - n.items\).
This in turn is converted to a chi square
\(\chi^2 = (n.obs - 1 - (2 * p + 5)/6 - (2 * factors)/3)) * f \) (see fa
.)
That is, the model (M = FF' + U2) is compared to the original correlation matrix (R) by a function of \(M^{-1} R\). By analogy, in the case of two matrices, A and B, cortest.mat
finds the chi squares associated with \(A^{-1}B\) and \(A B^{-1}\). The sum of these two \(\chi^2\) will also be a \(\chi^2\) but with twice the degrees of freedom.