Description Usage Arguments Details Value Author(s) See Also Examples
Performs functional hierarchic cluster analysis of probability densities. It returns an object of class fhclustd
. It applies hclust
to the distance matrix between the T densities.
1 2 3 4 
xf 
object of class

group.name 
string.

gaussiand 
logical. If If 
distance 
The distance or divergence used to compute the distance matrix between the densities. It can be:
If 
windowh 
either a list of T bandwidths (one per density associated to a group), or a strictly positive number. If Omitted when 
data.centered 
logical. If 
data.scaled 
logical. If 
common.variance 
logical. If 
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 densities f_t corresponding to the T groups of individuals are either parametrically estimated (gaussiand = TRUE
) or estimated using the Gaussian kernel method (gaussiand = FALSE
). In the latter case, the windowh
argument provides the list of the bandwidths to be used. Notice that in the multivariate case (p>1), the bandwidths are positivedefinite matrices.
The distances between the T groups of individuals are given by the L^2distances between the T probability densities f_t corresponding to these groups. The hclust
function is then applied to the distance matrix to perform the hierarchical clustering on the T groups.
If windowh
is a numerical value, the matrix bandwidth is of the form h S, where S is either the square root of the covariance matrix (p>1) or the standard deviation of the estimated density.
If windowh = NULL
(default), h in the above formula is computed using the bandwidth.parameter
function.
The distance or dissimilarity between the estimated densities is either the L^2 distance, the Hellinger distance, Jeffreys measure (symmetrised KullbackLeibler divergence) or the Wasserstein distance.
If it is the L^2
distance (distance="l2"
or distance="l2norm"
), the densities can be either parametrically estimated or estimated using the Gaussian kernel.
If it is the Hellinger distance (distance="hellinger"
), Jeffreys measure (distance="jeffreys"
) or the Wasserstein distance (distance="wasserstein"
), the densities are considered Gaussian and necessarily parametrically estimated.
Returns an object of class fhclustd
, that is a list including:
distances 
matrix of the L^2distances between the estimated densities. 
clust 
an object of class 
Rachid Boumaza, Pierre Santagostini, Smail Yousfi, Gilles Hunault, Sabine DemotesMainard
fdiscd.predict, fdiscd.misclass
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79  data(castles.dated)
stones < castles.dated$stones
periods < castles.dated$periods
periods123 < periods[periods$period %in% 1:3, "castle"]
stones123 < stones[stones$castle %in% periods123, ]
stones123$castle < as.factor(as.character(stones123$castle))
yf < as.folder(stones123)
# Jeffreys measure (default):
resultjef < fhclustd(yf)
print(resultjef)
print(resultjef, dist.print = TRUE)
plot(resultjef)
plot(resultjef, hang = 1)
# Use cutree (stats package) to get the partition
cutree(resultjef$clust, k = 1:4)
cutree(resultjef$clust, k = 5)
cutree(resultjef$clust, h = 0.041)
# Applied to a data frame (Jeffreys measure):
fhclustd(stones123, group.name = "castle")
# Use cutree (stats package) to get the partition
cutree(resultjef$clust, k = 1:4)
cutree(resultjef$clust, k = 5)
cutree(resultjef$clust, h = 0.041)
# Hellinger distance:
resulthel < fhclustd(yf, distance = "hellinger")
print(resulthel)
print(resulthel, dist.print = TRUE)
plot(resulthel)
plot(resulthel, hang = 1)
# Use cutree (stats package) to get the partition
cutree(resulthel$clust, k = 1:4)
cutree(resulthel$clust, k = 5)
cutree(resulthel$clust, h = 0.041)
## Not run:
# L2distance:
xf < as.folder(stones)
result < fhclustd(xf, distance = "l2")
print(result)
print(result, dist.print = TRUE)
plot(result)
plot(result, hang = 1)
# Use cutree (stats package) to get the partition
cutree(result$clust, k = 1:5)
cutree(result$clust, k = 5)
cutree(result$clust, h = 0.18)
## End(Not run)
periods123 < periods[periods$period %in% 1:3, "castle"]
stones123 < stones[stones$castle %in% periods123, ]
stones123$castle < as.factor(as.character(stones123$castle))
yf < as.folder(stones123)
result123 < fhclustd(yf, distance = "l2")
print(result123)
print(result123, dist.print = TRUE)
plot(result123)
plot(result123, hang = 1)
# Use cutree (stats package) to get the partition
cutree(result123$clust, k = 1:4)
cutree(result123$clust, k = 5)
cutree(result123$clust, h = 0.041)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.