scores.to.counts {concord}R Documentation

transform a score matrix to a count matrix

Description

transforms an object by classifier matrix of classification scores to an object by category matrix of classification counts

Usage

scores.to.counts(scores)

Arguments

scores object by classifier matrix of classification scores

Details

usually called by cohen.kappa

Value

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

Note

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.

Author(s)

Jim Lemon

See Also

cohen.kappa

Examples

 # 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))

[Package concord version 1.4-9 Index]