clusboot | R Documentation |
Performs bootstrap on a cluster analysis output
clusboot(datmat, B = 1000, clustering.func = complete.linkage, ...)
datmat |
a data matrix or distance object which will be the input to the clustering function |
B |
number of bootstrap replicates |
clustering.func |
the function which will perform the clustering and output a vector of cluster memberships |
... |
more arguments to be passed to the clustering function |
Any R function performing cluster analysis can be specified in clustering.func
although a wrapper function is
typically needed to isolate only the vector output of cluster memberships. See ?complete.linkage
as an example.
Should users perfer to use alternative resamling schemes, other than the bootstrap, Hennig (2007) discuss a variety
of options which could be accessed by specifying clustering.func = fpc.clusterboot
. In addition, the sampling
method is specified in the argument bootmethod
and additional arguments for the function clusterboot
in the
package fpc
must be given. Note that only the resampling facilities of clusterboot
is utilised while the
computation of proportions and silhouette widths remain unchanged. The output object of class clusboot
will remain unchanged as only the resampling section of clusterboot
is used.
an object of class clusboot
which is a list with the following components:
proportions |
matrix of size nxn with cell ij containing the proportion of bootstrap replicates in which object i and object j clustered together. |
clustering |
a vector of length n containing the cluster membership of the n input objects. |
sil |
a vector of length the number of clusters containing the bootstrap-silhouette values for the clusters. |
indv.sil |
a vector of length n containing the bootstrap-silhouette values for the individual objects. |
sil.order |
a vector of length n containing the ordering of the n objects used by the functions
|
ave.sil.width |
the overall stability of the clustering solution, obtained by averaging over the individual object bootstrap-silhouette values. |
Hennig, C., 2007. Cluster-wise assessment of cluster stability. Computational Statistics & Data Analysis, 52(1), pp.258-271. Lubbe, S., 2024. Bootstrapping Cluster Analysis Solutions with the R Package ClusBoot. Austrian Journal of Statistics, 53(3), pp.1-19.
clusboot (scale(case.study.psychiatrist), B=100, k=6, clustering.func=complete.linkage)
library(fpc)
clusboot (scale(case.study.psychiatrist), B=100, k=6, clustering.func=fpc.clusterboot,
clustermethod=hclustCBI, method="complete", bootmethod="subset", subtuning=10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.