I'm trying to perform a PCA Extraction + Varimax Rotation in MATLAB and obtain the same results as in SPSS.
My data is the following matrix A:
var1 var2 var3 ---------------- 10 7 3 3 10 8 8 2 6
This is the syntax I used in SPSS:
FACTOR /VARIABLES var1 var2 var3 /MISSING LISTWISE /ANALYSIS var1 var2 var3 /PRINT EXTRACTION ROTATION /CRITERIA FACTORS(3) ITERATE(100) /EXTRACTION PC /CRITERIA ITERATE(25) /ROTATION VARIMAX /METHOD=CORRELATION.
I have no problems to find the eigeinvalues and the variances using:
[V,D] = eig(corr(A)); eig_total = diag(D); % Eigeinvalues var_exp = D./sum(D); % Percentage of variance cum_var = cumsum(var_exp); % Cumulative variance % is there a way to obtain the same resuluts using the pca function?
However, I don't know how to obtain these tables:
I've tried the following code, but none of them give me the same results:
rotated_solution1 = rotatefactors(V) rotated_solution2 = rotatefactors(pca(A))