broom (version 0.4.1)

kappa_tidiers: Tidy a kappa object from a Cohen's kappa calculation

Description

Tidy a "kappa" object, from the cohen.kappa function in the psych package. This represents the agreement of two raters when using nominal scores.

Usage

"tidy"(x, ...)

Arguments

x
An object of class "kappa"
...
extra arguments (not used)

Value

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

Details

Note that the alpha of the confidence interval is determined when the cohen.kappa function is originally run.

See Also

cohen.kappa

Examples

Run this code

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))

Run the code above in your browser using DataCamp Workspace