kappa2 {kappaGold} | R Documentation |
Cohen's kappa for nominal data
Description
The data of ratings must be stored in a two column object, each rater is a columns and the subjects are in the rows.
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
Every rating category is used and the levels are sorted. Weighting 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.3.2 Index]