cohen.kappa {concord}R Documentation

kappa reliability coefficient for nominal data

Description

calculates the kappa coefficient of reliability for nominal data

Usage

cohen.kappa(classif, type=c("count","score"))

Arguments

classif matrix of classification counts or scores
type whether classif is an object by category matrix of counts or an object by classifier matrix of scores

Details

cohen.kappa will accept either an object by category matrix of counts in which the numbers represent how many classifiers have placed the object in each category, or an object by classifier matrix of categories in which the numbers represent each classifier's categorization of that object. The default is to assume counts and the operator must specify if scores are used.

Value

kappa value of kappa
Z the Z-score approximation
p the probability of Z

Note

This is sometimes called Cohen's kappa. The name also avoids confusion with the kappa estimate of the conditioning number of a matrix. For a contingency table version of this statistic, see classAgreement in package e1071

Author(s)

Jim Lemon

References

Siegel, S. & Castellan, N.J.Jr. (1988) Nonparametric statistics for the behavioral sciences. Boston, MA: McGraw-Hill.

See Also

scores.to.counts,wtpc

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)
 # first show the score to count transformation, remembering that
 # Krippendorff's data is classifier by object and must be transposed
 scores.to.counts(t(nmm))
 # now calculate kappa
 cohen.kappa(t(nmm),"score")

[Package Contents]