powered by
Duda-Hart test for whether a data set should be split into two clusters.
dudahart2(x,clustering,alpha=0.001)
A list with components
p-value against null hypothesis of homogemeity.
ratio of within-cluster sum of squares for two clusters and overall sum of squares.
critical value for dh at level alpha.
dh
alpha
FALSE if the null hypothesis of homogemeity is rejected.
FALSE
see above.
1-alpha-quantile of a standard Gaussian.
1-alpha
data matrix or data frame.
vector of integers. Clustering into two clusters.
numeric between 0 and 1. Significance level (recommended to be small if this is used for estimating the number of clusters).
Christian Hennig christian.hennig@unibo.it https://www.unibo.it/sitoweb/christian.hennig/en
Duda, R. O. and Hart, P. E. (1973) Pattern Classification and Scene Analysis. Wiley, New York.
cluster.stats
options(digits=2) set.seed(98765) iriss <- iris[sample(150,20),-5] km <- kmeans(iriss,2) dudahart2(iriss,km$cluster)
Run the code above in your browser using DataLab