inertdiss {ClustGeo} | R Documentation |
The pseudo inertia of a cluster is calculated from a dissimilarity matrix and not from a data matrix.
inertdiss(D, indices = NULL, wt = NULL)
D |
an object of class "dist" with the dissimilarities between the n observations.
The function |
indices |
a vector with the indices of the subset of observations. |
wt |
vector with the weights of the n observations |
M.chavent, V. Kuentz-Simonet, A. Labenne, J. Saracco. ClustGeo: an R package for hierarchical clustering with spatial constraints arXiv:1707.03897 [stat.CO]
data(estuary) n <- nrow(estuary$dat) Z <- scale(estuary$dat)*sqrt(n/(n-1)) inertdiss(dist(Z)) # pseudo inertia inert(Z) #equals for euclidean distance w <- estuary$map@data$POPULATION # non uniform weights inertdiss(dist(Z),wt=w)