Learn R Programming

ClustOfVar (version 1.1)

stability: Stability of partitions from a hierarchy of variables

Description

Evaluates the stability of partitions obtained from a hierarchy of p variables. This hierarchy is performed with hclustvar and the stability of the partitions of 2 to p-1 clusters is evaluated with a bootstrap approach. The boostrap approch is the following: hclustvar is applied to B boostrap samples of the n rows. The partitions of 2 to p-1 clusters obtained from the B bootstrap hierarchies are compared with the partitions from the initial hierarchy . The mean of the corrected Rand indices is plotted according to the number of clusters. This graphical representation helps in the determination of a suitable numbers of clusters.

Usage

stability(tree, B = 100, graph = TRUE)

Arguments

tree

an object of class hclustvar.

B

the number of bootstrap samples.

graph

boolean, if 'TRUE' a graph is displayed.

Value

matCR

matrix of corrected Rand indices.

meanCR

vector of mean corrected Rand indices.

See Also

plot.clustab, hclustvar

Examples

Run this code
# NOT RUN {
data(decathlon)
tree <- hclustvar(X.quanti=decathlon[,1:10])
stab<-stability(tree,B=20)
plot(stab,nmax=7)
boxplot(stab$matCR[,1:7])

# }

Run the code above in your browser using DataLab