2
$\begingroup$

I read on p1 of the Stata Manual glossary that:

The image of a variable is defined as that part which is predictable by regressing each variable on all the other variables; hence, the anti-image is the part of the variable that cannot be predicted. The anti-image correlation matrix $A$ is a matrix of the negatives of the partial correlations among variables. Partial correlations represent the degree to which the factors explain each other in the results. The diagonal of the anti-image correlation matrix is the Kaiser–Meyer–Olkin measure of sampling adequacy for the individual variables. Variables with small values should be eliminated from the analysis. The anti-image covariance matrix $C$ contains the negatives of the partial covariances and has one minus the squared multiple correlations in the principal diagonal. Most of the off-diagonal elements should be small in both anti-image matrices in a good factor model. Both anti-image matrices can be calculated from the inverse of the correlation matrix $R$ via

$A = \{{diag(R)}\}^{-1}R\{{diag(R)}\}^{-1}$
$C =\{{diag(R)}\}^{-1/2}R\{{diag(R)}\}^{-1/2}$

I generated some Anti-Image Covariance and Correlation Matrices in SPSS. On the SPSS website I couldn't find any explanation of how they calculated Anti-Image matrices.

For no particular reason I decided to use those Stata formulae to generate the Anti-Image correlation and covariance matrices in MATLAB, using a data matrix from here.

corr_mat = corr(data);
R = inv(corr_mat);
DiagR = diag(diag(R));
Dcov = DiagR^-(1/2);
Dcorr = inv(DiagR);
AntiImageCov = Dcov * R * Dcov;
AntiImageCorr = Dcorr * R * Dcorr;

When I ran the code in SPSS (using their factor analysis function) and in MATLAB (using my code, based on the Stata Manual) I got the following results:

SPSS vs Stata formula in MATLAB

The 'a' just leads to a footnote saying

a. Measures of Sampling Adequacy(MSA)

I find this really weird, because the SPSS Anti-Image Covariance Matrix perfectly matches the Anti-Image Correlation Matrix I got using my code. Meanwhile, aside from the diagonal the SPSS Anti-Image Correlation Matrix perfectly matches the Anti-Image Covariance Matrix I got using my code.

Does anyone know how I can resolve this seeming inconsistency? For example, are the Stata formulae simply wrong, or I have I implemented them in an incorrect way?

$\endgroup$
  • $\begingroup$ On the SPSS website I couldn't find any explanation Explanations could be found on this site, stats.stackexchange.com/q/213060/3277. Can it help? Also, you should be aware that SPSS outputs (in FACTOR command), in "Anti-image matrices" table the anti-image covariance matrix obtained from correlation matrix, not from covariance matrix, - even if you base the analysis on the covariances. $\endgroup$ – ttnphns Jun 15 '16 at 3:27
  • $\begingroup$ Note also that MSA measures on the diagonal of anti-image correlation matrix are put there for convenience. The original diagonal values of the matrix is of course 1. $\endgroup$ – ttnphns Jun 15 '16 at 4:14
  • $\begingroup$ @ttnphns is there a difference between the formula at the link you provided, and the Stata formula? It seemed you got the Anti-Image Covariance Matrix through $\{{diag(R)}\}^{-1}R\{{diag(R)}\}^{-1}$, but Stata wants to get it through $\{{diag(R)}\}^{-1/2}R\{{diag(R)}\}^{-1/2}$. $\endgroup$ – user1205901 Jun 15 '16 at 7:52
  • $\begingroup$ The correct formula for anti-image covariance matrix (shown in matrix notation in my answer) is $\{{diag(R^{-1})}\}^{-1} R^{-1}\{{diag(R^{-1})}\}^{-1}$. SPSS uses it. In your Stata citation from the inverse of the correlation matrix R I suppose they mean R is the inverse of correlation matrix. $\endgroup$ – ttnphns Jun 15 '16 at 10:38
  • 1
    $\begingroup$ Ah, I see. Yes, I suppose Stata mixed it up. Probably a typo in their text. $\endgroup$ – ttnphns Jun 16 '16 at 8:45
1
$\begingroup$

Note that the SPSS Statistics algorithms doc can be found via the Help menu and explains this calculation. Prior to V24, Algorithms was a direct link under Help. In V24 it is accessed through "Documentation in PDF format". It can also be accessed directly on the web at

ftp://public.dhe.ibm.com/software/analytics/spss/documentation/statistics/24.0/en/client/Manuals/IBM_SPSS_Statistics_Algorithms.pdf

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.