
9.2 PRINCIPAL COMPONENT ANALYSIS 297
9 MULTIVARIATE STATISTICS
includes the principal component loads pcs, the scores newdata and the
variances
variances.
[pcs,newdata,variances] = princomp(data);
e loads of the rst ve principal components PC
1
to PC
5
can be shown
by typing
pcs(:,1:5)
ans =
0.5377 -0.1595 -0.7201 0.0675 -0.3224
0.5514 -0.2354 0.5115 -0.4833 0.0730
-0.3889 0.1213 0.1727 0.1442 -0.5364
-0.0179 0.2249 0.0322 -0.5469 -0.6666
0.0040 -0.7541 0.2708 0.3820 -0.3602
0.5052 0.5340 0.3401 0.5442 -0.1702
We observe that PC
1
( rst column) has high positive loads in the rst two
variables A1 and A2 ( rst and second row), a high negative load in the third
variable A3 (third row) and a high positive load in the sixth variable B3
(sixth row), whereas the other loads are close to zero. PC
2
(second column)
has a high negative load in variable B2 ( h column) and a positive load in
B3 (sixth column), whereas the load of variable B2 is only slightly higher in
PC
2
than in PC
1
. We create a number of plots to visualize the PCs.
subplot(2,2,1), plot(1:6,pcs(:,1),'o'), axis([1 6 -1 1])
text((1:6)+0.2,pcs(:,1),minerals,'FontSize',8), hold
plot(1:6,zeros(6,1),'r'), title('PC 1')
subplot(2,2,2), plot(1:6,pcs(:,2),'o'), axis([1 6 -1 1])
text((1:6)+0.2,pcs(:,2),minerals,'FontSize',8), hold
plot(1:6,zeros(6,1),'r'), title('PC 2')
subplot(2,2,3), plot(1:6,pcs(:,3),'o'), axis([1 6 -1 1])
text((1:6)+0.2,pcs(:,3),minerals,'FontSize',8), hold
plot(1:6,zeros(6,1),'r'), title('PC 3')
subplot(2,2,4), plot(1:6,pcs(:,4),'o'), axis([1 6 -1 1])
text((1:6)+0.2,pcs(:,4),minerals,'FontSize',8), hold
plot(1:6,zeros(6,1),'r'), title('PC 4')
e loads of the index minerals and their relationships to the PCs can be
used to interpret the relative in uence of the di erent source rocks. PC
1
is
characterized by strong contributions of A1 and A2, re ecting a relatively
strong in uence of the rst rock type as a source of the sediments. A contri-
bution of A3 with an opposite sign appears to support the interpretation of
A3 as a weathering product of A1 and A2. e second principal component
PC
2
is clearly dominated by the second source rock, as indicated by the high