Add panel-level agreement for expert panels (#18) - #22
Merged
Merged
Conversation
Adds panel_agreement(): Krippendorff's alpha by default, with the measurement level chosen by the researcher (ordinal, nominal, interval), and Gwet's AC1 as a never-default option that prints the Vach & Gerke (2023) critique. Intervals are percentile bootstraps that resample items with all ratings intact, following Zapf et al. (2016). expert_validity() relevance mode now reports agreement, agreement_low and agreement_high in scale_summary, with the full result in details$agreement. Item-level I-CVI and modified kappa are unchanged. Output shows the share of identical rating pairs beside the coefficient and explains why alpha can be low on a close-agreeing panel. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #18. Adds a panel-level agreement coefficient for expert panels. Item-level I-CVI and modified kappa are unchanged; this adds one number for how consistently the panel rated the whole item set.
panel_agreement()(new export). Krippendorff's alpha is the default, computed from the coincidence matrix (Krippendorff, 2011), with the measurement level chosen by the researcher: ordinal (default), nominal, or interval.method = "ac1"but is never the default. Its output always prints the critique in Vach & Gerke (2023).seedmakes them reproducible;B = 0skips them. When some resamples cannot be computed, the output says how many and warns that few items give an imprecise interval.expert_validity()relevance mode gainsagreement,agreement_level,agreement_B, andseed.scale_summarygainsagreement,agreement_low, andagreement_high;details$agreementholds the full result. AC1 there uses the relevant/not-relevant decision atrelevance_cut. Panels with fewer than two experts or two items report no coefficient and say why.Behavior change to note
expert_validity()relevance mode now runs a 1,000-resample bootstrap by default (about 0.2 to 0.6 seconds on typical panels) and draws from the random number generator unlessseedis set oragreement_B = 0.Verification
irr::kripp.alpha()to 1e-10 at all three levels.devtools::test(): 296 tests, 1,683 assertions, 0 failures, 0 skips.R CMD check --as-cran(R 4.6.1, Windows): 0 errors, 0 warnings, 0 notes. An earlier local run reported 2 errors that traced to Windows' 260-character path limit in the check directory, not to package code; the rerun in a short directory is clean.🤖 Generated with Claude Code