# Optimal number of clusters according to matrix correlation
# statistic (Pearson)
kt <- data.frame(k = 1:nrow(spe), r = 0)
for (i in 2:(nrow(spe) - 1)) {
gr <- cutree(hc, i)
distgr <- grpdist(gr)
mt <- cor(spe.ch, distgr, method = "pearson")
kt[i, 2] <- mt
}
k.best <- which.max(kt$r)
plot(
kt$k,
kt$r,
type = "h",
main = "Matrix correlation-optimal number of clusters",
xlab = "k (number of clusters)",
ylab = "Pearson's correlation"
)
axis(
1,
k.best,
paste("optimum", k.best, sep = "\n"),
col = "red",
font = 2,
col.axis = "red"
)
points(k.best,
max(kt$r),
pch = 16,
col = "red",
cex = 1.5)
The barplot shows that a partition in 3 to 6 clusters would achieve a high matrix
correlation between the chord distance matrix and the binary allocation matrix.
4.7.3.6 Species Fidelity Analysis
Another internal criterion for assessing the quality of a partition is based on species
fidelity analysis. The basic idea is to retain clusters that are best characterized by a set
of diagnostic species, also called “indicator”, “typical”, “characteristic” or “differential” species, i.e. species that are significantly more frequent and abundant in a
given group of sites. Specifically, the best partition would be the one that maximizes
both (i) the sum of indicator values and (ii) the proportion of clusters with significant
indicator species. Here, we shall anticipate on Sect. 4.11.2 and use index IndVal
(Dufrêne and Legendre 1997), which integrates a specificity and a fidelity measure
(Fig. 4.13).
84
4 Cluster Analysis
# statistic (Pearson)
kt <- data.frame(k = 1:nrow(spe), r = 0)
for (i in 2:(nrow(spe) - 1)) {
gr <- cutree(hc, i)
distgr <- grpdist(gr)
mt <- cor(spe.ch, distgr, method = "pearson")
kt[i, 2] <- mt
}
k.best <- which.max(kt$r)
plot(
kt$k,
kt$r,
type = "h",
main = "Matrix correlation-optimal number of clusters",
xlab = "k (number of clusters)",
ylab = "Pearson's correlation"
)
axis(
1,
k.best,
paste("optimum", k.best, sep = "\n"),
col = "red",
font = 2,
col.axis = "red"
)
points(k.best,
max(kt$r),
pch = 16,
col = "red",
cex = 1.5)
The barplot shows that a partition in 3 to 6 clusters would achieve a high matrix
correlation between the chord distance matrix and the binary allocation matrix.
4.7.3.6 Species Fidelity Analysis
Another internal criterion for assessing the quality of a partition is based on species
fidelity analysis. The basic idea is to retain clusters that are best characterized by a set
of diagnostic species, also called “indicator”, “typical”, “characteristic” or “differential” species, i.e. species that are significantly more frequent and abundant in a
given group of sites. Specifically, the best partition would be the one that maximizes
both (i) the sum of indicator values and (ii) the proportion of clusters with significant
indicator species. Here, we shall anticipate on Sect. 4.11.2 and use index IndVal
(Dufrêne and Legendre 1997), which integrates a specificity and a fidelity measure
(Fig. 4.13).
84
4 Cluster Analysis
