Learn R Programming

vcd (version 1.1-1)

Kappa: Cohen's Kappa and Weighted Kappa

Description

Computes two agreement rates: Cohen's kappa and weighted kappa, and confidence bands.

Usage

Kappa(x, weights = c("Equal-Spacing", "Fleiss-Cohen"))

Arguments

x
a confusion matrix.
weights
either one of the character strings given in the default value, or a user-specified matrix with same dimensions as x.

Value

  • An object of class "Kappa" with three components:
  • Unweightednumeric vector of length 2 with the kappa statistic (value component), along with Approximate Standard Error (ASE component)
  • Weightedidem for the weighted kappa.
  • Weightsnumeric matrix with weights used.

Details

Cohen's kappa is the diagonal sum of the (possibly weighted) relative frequencies, corrected for expected values and standardized by its maximum value. The equal-spacing weights are defined by $1 - |i - j| / (r - 1)$, $r$ number of colums/rows, and the Fleiss-Cohen weights by $1 - |i - j|^2 / (r - 1)^2$. The latter one attaches greater importance to near disagreements.

References

Cohen, J. (1960), A coefficient of agreement for nominal scales. Educational and Psychological Measurement, 20, 37--46.

Everitt, B.S. (1968), Moments of statistics kappa and weighted kappa. The British Journal of Mathematical and Statistical Psychology, 21, 97--103.

Fleiss, J.L., Cohen, J., and Everitt, B.S. (1969), Large sample standard errors of kappa and weighted kappa. Psychological Bulletin, 72, 332--327.

See Also

agreementplot, confint

Examples

Run this code
data("SexualFun")
Kappa(SexualFun)

Run the code above in your browser using DataLab