Intercoder agreement between this project and a second coder's project
Source:R/intercoder.R
qda_intercoder.RdCompares the codings of the active project (coder A) with those of
a second project file (coder B, usually made with
qda_intercoder_copy()) and computes, per code and overall:
Arguments
- other
Path to the second coder's
.jellyqdafile.- unit
"segment"(default) or"document".- level
"code"(every code and subcode on its own) or"top"(a code together with all its subcodes, i.e. code families).- source
Optional documents (ids or names of the active project) to compare; default all documents both projects contain.
- min_overlap
Minimum number of characters a coding must overlap a unit to count.
- coders
Two names for the coders; default the two file names.
- log
Logical; record the result in the audit trail.
Value
A tibble with one row per code plus a first row scope = "overall" (all codes pooled): scope, code (path), units,
both, only_a, only_b, neither, agreement, kappa,
kappa_bp, alpha, rating, in_a, in_b (the code exists in the
project of A / B). The overall row also has mean_kappa (mean over the
codes). Attribute "info": coders, files, compared and missing
documents, unit and level.
Details
percent agreement – share of units both coders treated alike,
Cohen's kappa – agreement corrected for chance (Cohen 1960), with the verbal rating after Landis & Koch (1977),
Brennan & Prediger's kappa – chance agreement fixed at 1/2; stable for rare codes, where Cohen's kappa is low despite high agreement,
Krippendorff's alpha (nominal) – common in content analysis; values from .800 are usually considered reliable, .667 to .800 allow tentative conclusions (Krippendorff 2004).
Units of analysis are the segments of the active project (e.g.
speaker turns) or whole documents. A unit counts as coded with a code when
a coding of that code overlaps it by at least min_overlap characters, so
the two coders do not have to mark exactly the same characters.
Documents are matched by their text (names may differ), codes by their
path. Codes nobody used in the compared documents are left out.
The other file is only read, never changed. Each comparison is recorded in the audit trail (for the methods section) and shown in the report.
References
Cohen, J. (1960). A coefficient of agreement for nominal scales. Educational and Psychological Measurement, 20(1), 37–46.
Brennan, R. L., & Prediger, D. J. (1981). Coefficient kappa: Some uses, misuses, and alternatives. Educational and Psychological Measurement, 41(3), 687–699.
Landis, J. R., & Koch, G. G. (1977). The measurement of observer agreement for categorical data. Biometrics, 33(1), 159–174.
Krippendorff, K. (2004). Content Analysis: An Introduction to Its Methodology (2nd ed.). Sage.
Examples
dir <- tempfile()
qda_open(file.path(dir, "coder_a.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
#> # A tibble: 1 × 5
#> id name format chars status
#> <int> <chr> <chr> <int> <chr>
#> 1 1 interview_01.txt txt 856 ok
qda_code_add("Career path"); qda_code_add("Team")
b <- qda_intercoder_copy(file.path(dir, "coder_b.jellyqda"))
qda_code(1, "Career path", segment = 2); qda_code(1, "Team", segment = 3)
qda_close()
qda_open(b) # coder B codes independently
qda_code(1, "Career path", segment = 2); qda_code(1, "Team", segment = 4)
qda_close()
qda_open(file.path(dir, "coder_a.jellyqda"))
qda_intercoder(b)
#> # A tibble: 3 × 15
#> scope code units both only_a only_b neither agreement kappa kappa_bp
#> <chr> <chr> <int> <int> <int> <int> <int> <dbl> <dbl> <dbl>
#> 1 overall (all code… 7 1 1 1 11 0.857 0.417 0.714
#> 2 code Career pa… 7 1 0 0 6 1 1 1
#> 3 code Team 7 0 1 1 5 0.714 -0.167 0.429
#> # ℹ 5 more variables: alpha <dbl>, rating <chr>, in_a <lgl>, in_b <lgl>,
#> # mean_kappa <dbl>
qda_intercoder(b, level = "top", unit = "document")
#> # A tibble: 3 × 15
#> scope code units both only_a only_b neither agreement kappa kappa_bp alpha
#> <chr> <chr> <int> <int> <int> <int> <int> <dbl> <dbl> <dbl> <dbl>
#> 1 overall (all… 1 2 0 0 0 1 NA 1 NA
#> 2 code Care… 1 1 0 0 0 1 NA 1 NA
#> 3 code Team 1 1 0 0 0 1 NA 1 NA
#> # ℹ 4 more variables: rating <chr>, in_a <lgl>, in_b <lgl>, mean_kappa <dbl>
qda_close()