hclustvar2: Hierarchical clustering of variables from a covariance matrix

Description Usage Arguments Value See Also Examples

View source: R/hclustvar2.R

Description

Ascendant hierarchical clustering of a set of variables from a covariance/correlation matrix.

Usage

1
hclustvar2(x, init = NULL)

Arguments

x

a covariance or correlation matrix.

init

an initial partition (a vector of integers indicating the cluster to which each variable is allocated).

Value

height

a set of p-1 non-decreasing real values: the values of the aggregation criterion.

clusmat

a p by p matrix with group memberships where each column k corresponds to the elements of the partition in k clusters.

merge

a p-1 by 2 matrix. Row i of merge describes the merging of clusters at step i of the clustering. If an element j in the row is negative, then observation -j was merged at this stage. If j is positive then the merge was with the cluster formed at the (earlier) stage j of the algorithm. Thus negative entries in merge indicate agglomerations of singletons, and positive entries indicate agglomerations of non-singletons.

See Also

cutreevar, plot.hclustvar, stability

Examples

1
2
3
4
data(decathlon)
x <- cor(decathlon[,1:10])
tree <- hclustvar2(x, init=NULL)
plot(tree, hang = -1, xlab="", sub="")

chavent/ClustOfVar documentation built on Nov. 7, 2019, 2:19 p.m.