View source: R/calc_pw_kappa.R
calc_pw_kappa | R Documentation |
This function calculates pairwise agreement statistics for multiple raters. It computes statistics such as pairwise kappa (both unweighted and weighted) and the proportion of observed agreement. It summarizes these statistics in a table or data frame.
calc_pw_kappa(data, ..., type = "unweighted")
data |
A data frame or tibble containing the ratings from multiple raters. |
... |
Variable (column) names of the raters in the data. |
type |
A character string indicating whether to calculate "unweighted" or "weighted" kappa. |
A list containing the results and tables of the pairwise agreement statistics, including kappa results and observed agreement.
diagnostic_df <- data.frame(stringsAsFactors = FALSE,
id = c(1:30),
rater_1 = c("Yes", "No", "No", "No", "No", "No", "No", "No", "No", "No",
"No", "No", "No", "No", "No", "No", "No", "No", "No", "No",
"No", "Yes", "No", "No", "No", "No", "No", "No", "No", "No"),
rater_2 = c("Yes", "No", "No", "No", "No", "No", "No", "No", "No", "No",
"Yes", "No", "No", "Yes", "No", "No", "No", "No", "No", "No",
"No", "Yes", "No", "No", "Yes", "No", "No", "No", "No", "No"),
rater_3 = c("Yes", "No", "No", "No", "No", "No", "No", "No", "Yes", "No",
"Yes", "Yes", "No", "Yes", "Yes", "No", "No", "No", "Yes", "No",
"No", "Yes", "Yes", "Yes", "Yes", "No", "No", "Yes", "No", "No")
)
results <- calc_pw_kappa(diagnostic_df, rater_1, rater_2, rater_3, type = "unweighted")
names(results)
results$k_table
results$k_min_max
results$po_table
results$po_min_max
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.