scores.to.counts {concord} | R Documentation |
transforms an object by classifier matrix of classification scores to an object by category matrix of classification counts
scores.to.counts(scores)
scores |
object by classifier matrix of classification scores |
usually called by cohen.kappa
counts |
an object by category matrix of counts |
scores.to.counts |
the concordance/discordance matrix used in the calculation of alpha |
data.values |
a character vector of the original data values |
nmatchval |
the count of matches, used in calculation |
There seems to be no established convention for whether objects(cases) should be rows (as they are here) or columns. Make sure to transpose as below if necessary.
Jim Lemon
# the "C" data from Krippendorff nmm<-matrix(c(1,1,NA,1,2,2,3,2,3,3,3,3,3,3,3,3,2,2,2,2,1,2,3,4,4,4,4,4, 1,1,2,1,2,2,2,2,NA,5,5,5,NA,NA,1,1,NA,NA,3,NA),nrow=4) # remember to transpose the data to the expected format scores.to.counts(t(nmm))