# Ordered category agreement

I have data on two processes, where the process assigns elements into ordered bins. I am interested in testing for agreement between the processes. What is the best way to do this (R code)? Here is the dummy data with counts for the 2 processes and 4 categories). I am not familiar with weighted kappa (which I have seen argued by some as the test to use) - so if that is correct, can anyone explain the way to use this method?

EDIT: Adding to this question, I have the following R code. Is this proper and is this value suggestive of agreement?

table<-matrix(c(35,2,10,7,6,15,8,6,4,5,12,8,1,0,0,5),4,4, byrow=TRUE)
Kappa(table,weights="Fleiss-Cohen")


With result:

               value        ASE
Unweighted 0.3630137 0.06201821
Weighted   0.3854999 0.09886236

-

## 1 Answer

Weighted kappa is one possible solution, another is to use gamma coefficient by Goodman and Kruskal that is applied to pair of ordered variables.

See also vcd and vcdExtra R packages for GKgamma() function that directly computes Goodman Kruskal gamma. The function also returns significance, what you need in your application. There is also possiblility for nice visualization of agreement between two variables, see manual for details.

-