View source: R/calc-classification-mat.R
calc_classif_mat | R Documentation |
Create an k x q rater-category matrix representing the distribution of subjects by rater (k) and category (q)
calc_classif_mat(data, ..., subject_id = NULL)
data |
A tbld_df or data.frame |
... |
Columns (unquoted) with the "ratings" done by the raters. Follows
the argument methodology from |
subject_id |
Optional. Name of the column (unquoted) that contains the IDs for the subjects or units being rated. |
A k x q table
Handbook of Inter-Rater Reliability: The Definitive Guide to Measuring the Extent of Agreement Among Raters. 4th ed. Gaithersburg, MD: Advanced Analytics.
# See Gwet page 72
# Classification of 12 subjects by 4 raters into 5 categories
library(dplyr)
library(tibble)
table_215 <- tibble::tribble(
~unit, ~rater_1, ~rater_2, ~rater_3, ~rater_4,
1, "a", "a", NA, "a",
2, "b", "b", "c", "b",
3, "c", "c", "c", "c",
4, "c", "c", "c", "c",
5, "b", "b", "b", "b",
6, "a", "b", "c", "d",
7, "d", "d", "d", "d",
8, "a", "a", "b", "a",
9, "b", "b", "b", "b",
10, NA, "e", "e", "e",
11, NA, NA, "a", "a",
12, NA, NA, "c", NA
)
calc_classif_mat(data = table_215,
dplyr::starts_with("rater"))
calc_classif_mat(data = table_215,
dplyr::starts_with("rater"),
subject_id = "unit")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.