kappa_tidiers {broom} | R Documentation |
Tidy a "kappa" object, from the cohen.kappa
function
in the psych package. This represents the agreement of two raters
when using nominal scores.
## S3 method for class 'kappa' tidy(x, ...)
x |
An object of class "kappa" |
... |
extra arguments (not used) |
Note that the alpha of the confidence interval is determined
when the cohen.kappa
function is originally run.
A data.frame with columns
type |
Either "weighted" or "unweighted" |
estimate |
The estimated value of kappa with this method |
conf.low |
Lower bound of confidence interval |
conf.high |
Upper bound of confidence interval |
library(psych) rater1 = 1:9 rater2 = c(1, 3, 1, 6, 1, 5, 5, 6, 7) ck <- cohen.kappa(cbind(rater1, rater2)) tidy(ck) # graph the confidence intervals library(ggplot2) ggplot(tidy(ck), aes(estimate, type)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high))