diff_multidim {CPC} | R Documentation |
Multidimensional Difference-in-Means
Description
Calculates average Euclidean distance between means in arbitrary dimensions.
Usage
diff_multidim(data, cols, clusters)
Arguments
data |
a numeric vector or |
cols |
columns of |
clusters |
column of |
Value
Returns a numeric vector of length 1.
Examples
data <- matrix(c(rnorm(50, 0, 1), rnorm(50, 5, 1)), ncol = 2, byrow = TRUE)
clusters <- matrix(c(rep(1, 25), rep(2, 25)), ncol = 1)
data <- cbind(data, clusters)
diff_multidim(data, 1:2, 3)
[Package CPC version 2.6.0 Index]