Information Technology Reference
In-Depth Information
part of the bag (Rousseeuw and Ruts, 1997); or a convex hull of the observations inside
the fence. This convex hull is called the loop . An R function for constructing a bagplot
is available in the package aplpack . A bagplot of the two head dimensions variables
can be obtained from the following R code:
> library(aplpack)
> bagplot(Headdimensions.data[,5:6], factor = 3, cex = 0.8,
asp = 1)
It is shown in Figure 2.36. Note that in order to get the correct aspect ratio argument
asp must explicitly be assigned the value of unity. In Figure 2.37 the same bagplot is
shown but with a fence formed by inflating the bag by a factor of 2. The reader can
also experiment with functions PCAbipl.bagplot and CVAbipl.bagplot included
in UBbipl .
The bagplot is a useful graphical summary of the scatterplot of bivariate observations.
For the construction of the bagplot the univariate concept of rank is generalized to
the concept of halfspace location depth of a point relative to a bivariate data set (see
Rousseeuw et al ., 1999). If less detail is required, especially for comparing several
clusters in one plot, depth contours of the bivariate point data can be constructed. This
45
50
55
60
65
70
75
LGAN
Figure 2.37 Bagplot of the two head dimensions variables. Similar to Figure 2.36 but
with fence formed by inflating the bag by a factor of 2.
Search WWH ::




Custom Search