suppose that we have following data
i have done covariance matrix and eigenvalue decomposition
>> means=mean(X);
>> centered=X-repmat(means,10,1);
>> covariance=(centered'*centered)/(9);
>> [V,D]=eig(covariance);
>> [e,i]=sort(diag(D),'descend');
>> sorted=V(:,i);
e
e =
1.0e+03 *
3.8861
0.4605
0.1162
0.0465
>> sorted
sorted =
0.5080 0.5042 0.3747 -0.5893
0.0090 -0.6091 0.7930 -0.0092
0.8560 -0.3490 -0.2747 0.2647
0.0955 0.5030 0.3941 0.7633
i have calculated also percentage distribution
(e./sum(e))*100
ans =
86.1796
10.2125
2.5776
1.0303
for instance i want to choose first two,because in sum they have more then 96% of total variance,now please how can i continue for factor analysis?matlab commands also visual help will be very good,according to this answer
Steps done in factor analysis compared to steps done in PCA
i was confused,so please for given concrete numerical example,how can i continue,not just definitions,i need concrete numerical steps.thansk in advance
EDITED : because i have choose first two eigenvector,i have done PCA also
factors=sorted(:,1:2)
factors =
0.5080 0.5042
0.0090 -0.6091
0.8560 -0.3490
0.0955 0.5030
>> PCA=X*factors
PCA =
299.5739 24.8602
150.1380 65.5846
183.9319 36.7606
156.7749 11.6325
58.1864 17.0585
236.6723 35.3584
176.0291 68.7008
208.4237 45.3761
190.6039 33.7278
206.2131 3.4430
how can i calculate loadings?how can i do orthogonal rotations?