test_data <- data.frame(event= c("event1","event2","event3","event4","event5","event6","event7"),
rater1_1 = c("red", "orange", "red", "purple", "orange", "red", "yellow"),
rater2_1 = c("red", "orange", "orange", "purple", "orange", "red", "purple"),
rater3_1 = c("red", "red", "yellow", "purple", "orange", "red", "yellow"),
rater4_1 = c("orange", "orange", "blue", "orange", "orange", "red", "purple"),
rater5_1 = c("blue", "blue", "purple", "orange", "orange", "blue", "yellow")
)
with the above data, i'm trying to create a confusion matrix where i can observe disagreement across all the raters for each event. that is, for event1, 3 raters gave "red" and 1 "orange" and 1 "blue."
i believe the best way to approach this would be to take each rater pair comparison (rater1 on y-axis and rater2 on x-axis) and then iterate and tally across all rater pairs.
i'm hoping for something that looks like below:
red orange blue yellow purple
red 22 6 2 3 2
orange 6 13 1 4 1
blue 2 1 10 3 1
yellow 3 4 3 9 2
purple 2 1 1 2 9
(note: these values are made up, i didn't manually count the above)
i'm not even sure where to start. most confusion matrices i searched are comparing actual model output to predicted model output (e.g., link). any suggestions would be greatly appreciated.