cohen_k | R Documentation |
Cohen k (psych version)
cohen_k(x = NULL, y = NULL, conf.level = 0.95)
x |
a table of agreement, a 2 columns structure or a single vector (first rater) if y is a vector too |
y |
a vector (second rater) or NULL |
conf.level |
confidence level for confidence intervals |
rater_a <- c(rep(1,50), rep(2,30), rep(3,20))
rater_b <- c(rep(1, 44), rep(2, 5), rep(3, 1),
rep(1, 7), rep(2, 20), rep(3, 3),
rep(1, 9), rep(2, 5), rep(3, 6))
tab <- table(rater_a, rater_b)
rate <- data.frame("A" = rater_a, "B" = rater_b)
cohen_k(rater_a, rater_b)
cohen_k(tab)
cohen_k(rate)
## check with
## ----------
## irr::kappa2(rate)$value
## irr::kappa2(rate, weight = "equal")$value
## irr::kappa2(rate, weight = "squared")$value
## psych::cohen.kappa(rate)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.