kappa2 {kappaGold} | R Documentation |
Cohen's kappa for nominal data
Description
Cohen's kappa is the classical agreement measure when two raters provide ratings for subjects on a nominal scale.
Usage
kappa2(ratings, robust = FALSE, ratingScale = NULL)
Arguments
ratings |
matrix (dimension nx2), containing the ratings as subjects by raters |
robust |
flag. Use robust estimate for random chance of agreement by Brennan-Prediger? |
ratingScale |
Possible levels for the rating. Or |
Details
The data of ratings must be stored in a two column object, each rater is a column and the subjects are in the rows. Every rating category is used and the levels are sorted. Weighting of categories is currently not implemented.
Value
list containing Cohen's kappa agreement measure (value) or NULL
if
no valid subjects
See Also
Examples
# 2 raters have assessed 4 subjects into categories "A", "B" or "C"
# organize ratings as two column matrix, one row per subject rated
m <- rbind(sj1 = c("A", "A"),
sj2 = c("C", "B"),
sj3 = c("B", "C"),
sj4 = c("C", "C"))
# Cohen's kappa -----
kappa2(ratings = m)
# robust variant ---------
kappa2(ratings = m, robust = TRUE)
[Package kappaGold version 0.4.0 Index]