lambda {optpart} | R Documentation |
Compares two classifications by calculating the Goodman-Kruskal Index of association
lambda(x,y,digits=5)
x |
an object of class ‘clustering’, ‘partana’, ‘partition’ or a vector identifying membership of objects in classes with names attribute |
y |
an object of class ‘clustering’, ‘partana’, ‘partition’ or a vector identifying membership of objects in classes with names attribute |
digits |
the number of digits of the statsitic to report |
lambda calculates the Goodman-Kruskal index of association:
\sum_i max_j (n_{ij}) + \sum_j max_i (n_{ij}) - max(n_{i,}) - max(n{_.j})
\over
2*\sum_i\sum_j n_{ij} - max(n_{i,}) - max(n{_.j)}
Prints a cross-tabulated table and the lambda statistic, and (invisibly) returns the lambda statistic
David W. Roberts droberts@montana.edu
http://ecology.msu.montana.edu/labdsv/R
partition
, optpart
,
slice
,classmatch
data(shoshveg)
dis.bc <- dsvdis(shoshveg,'bray/curtis')
opt.5 <- optpart(5,dis.bc)
pam.5 <- pam(dis.bc,5)
lambda(opt.5,pam.5)