I'm trying to perform the following analysis in MATLAB:
Direct Oblimin Rotation with a Delta value of 0 and "Kaiser Normalization"
I know that MATLAB has a function called rotatefactors, however oblimin rotation is not mentioned (neither "Kaiser Normalization"). How can I perform this analysis in MATLAB?
To be more specific, I'm trying to match the exact output of SPSS when performing this analysis.
Here you can find all the algorithms used in SPSS: link (check the page 338 for the oblimin rotation). Unfortunately, I can't understand the equations and thus reproduce them in MATLAB.
As an example, I'm using the following data:
A = magic(10);
writetable(array2table(A),'test.xlsx') % This data can be imported to SPSS
I perform a PCA (on the correlation matrix) and extract only 2 factors. Here is how it is done in MATLAB in order to obtain the exact same Loading Matrix as in SPSS (which they call "Component Matrix"):
[eigvector,eigmatrix] = eig(corr(A));
[~,ind] = sort(diag(eigmatrix),'descend');
eigmatrix = eigmatrix(ind,ind);
eigvector = eigvector(:,ind);
eigvalues = diag(eigmatrix); % Eigeinvalues
loadings = eigvector*sqrt(eigmatrix);
loadings = loadings(:,1:2) % Extract only 2 factors
Next, I should perform the rotation on the loadings
matrix using the function rotatefactors
, and this is where I'm stuck.
Here is the syntax in SPSS:
FACTOR
/VARIABLES A1 A2 A3 A4 A5 A6 A7 A8 A9 A10
/MISSING LISTWISE
/ANALYSIS A1 A2 A3 A4 A5 A6 A7 A8 A9 A10
/PRINT INITIAL EXTRACTION ROTATION
/CRITERIA FACTORS(2) ITERATE(25)
/EXTRACTION PC
/CRITERIA ITERATE(25) DELTA(0)
/ROTATION OBLIMIN
/METHOD=CORRELATION.
This is the output from SPSS which I'm trying to reproduce in MATLAB:
B=rotatefactors(loadings)
does give a 10-by-2 matrix... but I'm assuming it's not one of the two 10-by-2 matrices you're looking for....? – Soffit