| llm_agreement | R Documentation |
Computes per-row majority labels and overall reliability for replicate
columns produced by llm_replicate() (or any set of columns holding
repeated codings of the same units, including codings by different models
or by humans). Reliability is reported as average pairwise percent
agreement and Krippendorff's alpha for nominal data, the statistic
reviewers most often ask for; alpha handles missing values (failed calls)
gracefully.
llm_agreement(
.data,
cols = NULL,
prefix = NULL,
normalize = TRUE,
metric = c("nominal", "ordinal", "interval")
)
.data |
A data frame holding the replicate columns. |
cols |
Character vector naming the replicate columns. Alternatively
supply |
prefix |
Base name: columns matching |
normalize |
If |
metric |
Difference function for Krippendorff's alpha: |
An object of class llmr_agreement: a list with
by_rowa tibble with one row per unit: majority (modal
label, NA on ties), share (modal share of non-missing
replicates), n_distinct, unanimous, tie, n_missing.
summarya one-row tibble: n_units, n_replicates,
mean_pairwise_agreement, krippendorff_alpha, n_unanimous,
n_ties.
Printing shows the summary.
Krippendorff, K. (2019). Content Analysis: An Introduction to Its Methodology (4th ed.), chapter 12. The alpha implemented here is the nominal-data form with missing values allowed.
llm_replicate()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.