| Library: | xclust |
| See also: | conting recide kmeans agglom |
| Macro: | measure | |
| Description: | computes coefficients of association between two two partitions which are crossed and build up a contingency table |
| Usage: | m = measure (h) | |
| Input: | ||
| h | k x p contingency table | |
| Output: | ||
| m.r | Rand's coefficient | |
| m.rc | Rand's coefficient corrected by chance | |
| m.fm | coefficient of Fowlkes and Mallow | |
| m.chi | Chi-square value | |
; load the library xclust
library ("xclust")
; generate x
x = #(1, 1, 1, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3)
; generate y
y = #(2, 2, 2, 3, 1, 1, 3, 3, 3, 3, 3, 2, 2, 3, 2, 2, 1, 1, 1, 2, 1)
; generate contingency table
h = conting(x, y)
; compute measures
measure(h)
Content of object _tmp.r [1,] 0.81905 Content of object _tmp.rc [1,] 0.5767 Content of object _tmp.fm [1,] 0.70778 Content of object _tmp.chi [1,] 26.906
| Library: | xclust |
| See also: | conting recide kmeans agglom |