Kappa {vcd} | R Documentation |
Computes two agreement rates: Cohen's kappa and weighted kappa, and confidence bands.
Kappa(x, weights = c("Equal-Spacing", "Fleiss-Cohen"), conf.level = 0.95)
x |
a confusion matrix. |
weights |
either one of the two options or a user-specified
matrix with same dimensions as x . |
conf.level |
level for the confidence intervals. |
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 - abs(i - j) / (r - 1), r number of colums/rows, and the Fleiss-Cohen weights by 1 - abs(i - j)^2 / (r - 1)^2. The latter ones attach greater importance to near disagreements.
An object of class kappa
with three components:
Kappa |
Kappa statistic, along with Approximate Standard Error (ASE) and 95% confidence bounds. |
Kappa.Weighted |
idem for the weighted kappa. |
Weights |
weight matrix used. |
David Meyer
david.meyer@ci.tuwien.ac.at
data(SexualFun) Kappa(SexualFun)