hclustdd | R Documentation |
Performs functional hierarchic cluster analysis of discrete probability distributions. It returns an object of class hclustdd
. It applies hclust
to the distance matrix between the T
distributions.
hclustdd(xf, group.name = "group", distance = c("l1", "l2", "chisqsym", "hellinger",
"jeffreys", "jensen", "lp"),
sub.title = "", filename = NULL,
method.hclust = "complete")
xf |
object of class
|
group.name |
string. Name of the grouping variable. Default: |
distance |
The distance or divergence used to compute the distance matrix between the discrete distributions (see Details). It can be:
|
sub.title |
string. If provided, the subtitle for the graphs. |
filename |
string. Name of the file in which the results are saved. By default ( |
method.hclust |
the agglomeration method to be used for the clustering. See the |
In order to compute the distances/dissimilarities between the groups, the T
probability distributions f_t
corresponding to the T
groups of individuals are estimated from observations.
Then the distances/dissimilarities between the estimated distributions are computed, using the distance or divergence defined by the distance
argument:
If the distance is "l1"
, "l2"
or "lp"
, the distances are computed by the function matddlppar
.
Otherwise, it can be computed by matddchisqsympar
("chisqsym"
), matddhellingerpar
("hellinger"
), matddjeffreyspar
("jeffreys"
) or matddjensenpar
("jensen"
).
Returns an object of class hclustdd
, that is a list including:
distances |
matrix of the |
clust |
an object of class |
Rachid Boumaza, Pierre Santagostini, Smail Yousfi, Gilles Hunault, Sabine Demotes-Mainard
hclustdd
# Example 1 with a folder (10 groups) of 3 factors
# obtained by converting numeric variables
data(roses)
xr = roses[,c("Sha", "Den", "Sym", "rose")]
xr = cut(xr, breaks = list(c(0, 5, 7, 10), c(0, 4, 6, 10), c(0, 6, 8, 10)))
xf = as.folder(xr, groups = "rose")
af = hclustdd(xf)
print(af)
print(af, dist.print = TRUE)
plot(af)
plot(af, hang = -1)
# Example 2 with a data frame obtained by converting numeric variables
ar = hclustdd(xr, group.name = "rose")
print(ar)
print(ar, dist.print = TRUE)
plot(ar)
plot(ar, hang = -1)
# Example 3 with a list of 7 arrays
data(dspg)
xl = dspg
hclustdd(xl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.