Information Technology Reference
In-Depth Information
entirely different - not only the positions of the samples and the axes but also the axis
predictivities are different. The biplot in the bottom panel is obtained with the call
PCAbipl (Ocotea.data[,3:8], scaled.mat = TRUE,
G = indmat(Ocotea.data[,2]), means.plot = TRUE,
colours = c("red","blue","green"), alpha = 0.95, pch.samples =
0:2, pch.samples.size = 1.25, pch.means = c(15,16,17),
pch.means.size = 1.5, label = FALSE, pos = "Hor",
line.type = rep(1,3), line.width = rep(2,3), specify.bags = 1:3,
legend.type = c(T,T,T), Tukey.median = FALSE,
n.int = c(5,5,5,5,3,5), offset = c(-0.2, 0.05, 0.1, 0),
side.label = c(rep("right",5),"left"), pos.m = c(4,4,4,4,4,2),
offset.m = c(-0.1, -0.1, 0.1, -0.1, -0.1, 0.1),
rotate.degrees = 180, predictivity.print = TRUE,
parplotmar = c(3, 3.5, 3, 2.5))
This call involves several arguments we have not yet encountered. The argument
G
expects an
n
×
K
indicator matrix specifying the class membership of each sample, with
a one in position (
i
,
k
)
if the
i
th sample belongs to the class associated with the
k
th
column and a zero otherwise. We provide the utility function
indmat
for converting a
vector (in the above call the second column of our R dataframe
Ocotea.data
) of group
labels into an indicator matrix. When
PCAbipl
is called with a nonnull
G
argument the
group means are calculated and interpolated into the biplot if argument
means.plot
is
set to TRUE. The arguments of
colours
,
pch.samples
,
pch.means
all must now be
K
-component vectors allowing the various groups to be displayed in different colours
and plotting characters if required. Bagplots can be drawn for any group selected by
argument
specify.bags
. Finally, the legend describing the groups displayed in the
biplot is controlled by the argument
legend.type
. We also draw attention to the argu-
ment
rotate.degrees = 180
in the call above which ensures compatibility with the
configuration in Figure 3.23.
The bags in the bottom panel of Figure 4.1 are 0.95-bags. These bags show an
overlap between
Obul
and
Opor
, with both these groups well separated from
Oken
.
The reader can experiment by varying alpha to quantify the amount of overlap or by
adding kappa-ellipses. Furthermore, by using the argument
specify.density.class
of
PCAbipl.density
the reader can experiment with adding density surfaces to the
PCA biplot using all the data or only the data for a specified group.
From the discussion and illustrations above, it follows that information about group
structure can be incorporated into a PCA biplot, thereby adding value to its usefulness in
practice; but including the group structure as explained above does not have any influence
on the biplot scaffolding. Axis predictivities and sample predictivities of the original
samples remain exactly the same whether group means are shown or not. Despite its
usefulness, it remains a passive way of incorporating group structure in a biplot. Is there
a better way of displaying multidimensional group differences graphically - especially
when we would like to classify a new item? Leaving the details of its construction
for Section 4.2 and subsequent sections, we give a CVA biplot of the
Ocotea
data in
Figure 4.2. This biplot is a result of the call
CVAbipl(Ocotea.data[,3:8], G = indmat(Ocotea.data[,2]),
colours = c("red","blue","green"), pch.samples = 0:2,
pch.samples.size = 1.25, predictivity.print = TRUE)