Debian Codegraph @

man/tidy.kappa.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/psych.R
3 \name{tidy.kappa}
4 \alias{tidy.kappa}
5 \alias{kappa_tidiers}
6 \alias{psych_tidiers}
7 \title{Tidy a(n) kappa object}
8 \usage{
9 \method{tidy}{kappa}(x, ...)
10 }
11 \arguments{
12 \item{x}{A \code{kappa} object returned from \code{\link[psych:kappa]{psych::cohen.kappa()}}.}
13
14 \item{...}{Additional arguments. Not used. Needed to match generic
15 signature only. \strong{Cautionary note:} Misspelled arguments will be
16 absorbed in \code{...}, where they will be ignored. If the misspelled
17 argument has a default value, the default value will be used.
18 For example, if you pass \code{conf.lvel = 0.9}, all computation will
19 proceed using \code{conf.level = 0.95}. Two exceptions here are:
20 \itemize{
21 \item \code{tidy()} methods will warn when supplied an \code{exponentiate} argument if
22 it will be ignored.
23 \item \code{augment()} methods will warn when supplied a \code{newdata} argument if it
24 will be ignored.
25 }}
26 }
27 \description{
28 Tidy summarizes information about the components of a model.
29 A model component might be a single term in a regression, a single
30 hypothesis, a cluster, or a class. Exactly what tidy considers to be a
31 model component varies across models but is usually self-evident.
32 If a model has several distinct types of components, you will need to
33 specify which components to return.
34 }
35 \details{
36 Note that confidence level (alpha) for the confidence interval
37 cannot be set in \code{tidy}. Instead you must set the \code{alpha} argument
38 to \code{\link[psych:kappa]{psych::cohen.kappa()}} when creating the \code{kappa} object.
39 }
40 \examples{
41 \dontshow{if (rlang::is_installed(c("psych", "ggplot2"))) withAutoprint(\{ # examplesIf}
42
43 # load libraries for models and data
44 library(psych)
45
46 # generate example data
47 rater1 <- 1:9
48 rater2 <- c(1, 3, 1, 6, 1, 5, 5, 6, 7)
49
50 # fit model
51 ck <- cohen.kappa(cbind(rater1, rater2))
52
53 # summarize model fit with tidiers + visualization
54 tidy(ck)
55
56 # graph the confidence intervals
57 library(ggplot2)
58
59 ggplot(tidy(ck), aes(estimate, type)) +
60 geom_point() +
61 geom_errorbarh(aes(xmin = conf.low, xmax = conf.high))
62 \dontshow{\}) # examplesIf}
63 }
64 \seealso{
65 \code{\link[=tidy]{tidy()}}, \code{\link[psych:kappa]{psych::cohen.kappa()}}
66 }
67 \value{
68 A \code{\link[tibble:tibble]{tibble::tibble()}} with columns:
69 \item{conf.high}{Upper bound on the confidence interval for the estimate.}
70 \item{conf.low}{Lower bound on the confidence interval for the estimate.}
71 \item{estimate}{The estimated value of the regression term.}
72 \item{type}{Either `weighted` or `unweighted`.}
73
74 }