Information Technology Reference
In-Depth Information
variables with the exception of
X8
are high when the first two principal components are
used as scaffolding,
X2
is very well represented by the first principal component, while
X8
catches up when the third principal component is one of the scaffolding axes.
3.8.7 Alpha-bags, kappa-ellipses, density surfaces and zooming
In Figures 3.42 and 3.43 we show some enhancements of the PCA biplot of the copper
froth data shown in the top left panel of Figure 3.41. In the top panel of Figure 3.42 we add
a 0.95-bag enclosing the inner 95% of the sample points as well as a concentration ellipse.
These enhancements were added by including the following arguments in the function call
to
PCAbipl: alpha = 0.95
,
ellipse.kappa = 2
,
specify.bags = 1
,
spec-
ify.ellipses = 1
. Instead of calling
PCAbipl
we have called
PCAbipl.density
to construct the biplot in the bottom panel of Figure 3.42. As can be seen from the latter
biplot, the sample points obscure the surface of highest density. Therefore we suppress
plotting the sample points in Figure 3.43 while specifying
draw.densitycontours =
TRUE
,
cuts.density = 20
in the call to
PCAbipl.density
for adding contour lines
to the density surface. In the bottom panel we have translated the origin interactively,
as explained earlier, to allow a much clearer view of the higher density surface.
The function
PCAbipl.zoom
can be used to interactively zoom into any part of
interest in a PCA biplot. The results of calling
PCAbipl.zoom
with
zoomval = 0.5
(
zoomval = 0.2
in bottom panel) followed by selecting the bottom left-hand corner
of the area to be zoomed are shown in Figure 3.44, respectively.
3.8.8 Predictions by circle projection
Finally, we demonstrate in Figure 3.45 how to obtain predictions on all variables
simultaneously in a PCA biplot for any chosen sample point using the function
circle.projection.interactive
. In the top panel of Figure 3.45 the PCA
biplot is constructed in the usual way. Then
circle.projection.interactive
is called with argument
colr = "blue"
. Now we select a sample point in the
biplot. The blue circle is then drawn as shown in the top panel of Figure 3.45. The
intersections of the circle with the biplot axes give the respective predictions. The
function call to
circle.projection.interactive
can be repeated for as many
samples as needed. Note that the vertical lines to the respective axes are only drawn
here to demonstrate the orthogonality of the projections. With a little more effort
circle.projection.interactive
can also be used after an interactive translation
of the origin. This is demonstrated in the bottom panel of Figure 3.45. When
PCAbipl
is called with
select.origin = TRUE
it returns also the
usr
coordinates of the
newly selected point of intersection of the axes. These coordinates are then assigned
to argument
origin
of
circle.projection.interactive
, resulting in the circles
drawn in the bottom panel of Figure 3.45. The reader can verify that the predictions
remain the same. As a reference, Table 3.27 gives the predictions for the sample points
determined algebraically by
PCAbipl
. An argument
cent.line
is available for adding
a centre line to the circle as shown for the red circle in the bottom panel. Adding this
line helps to identify the point whose predictions are shown.