| Title: | Strategic Convergence Index for Inter-Rater Reliability |
|---|---|
| Description: | Inter-rater reliability analysis for binary classification tasks involving two or more raters within a signal detection-theoretic framework. User-supplied rating data are standardised into a common long-format structure. The package automatically computes Cohen's kappa for two raters and Fleiss' kappa for multiple raters. When ground-truth labels are available, rater-specific hit rates, false-alarm rates, sensitivity, specificity, and decision thresholds are estimated from observed classification responses using standard signal detection-theoretic transformations (DeCarlo, 1998) <doi:10.1037/1082-989X.3.2.186>. The package implements the Strategic Convergence Index (SCI; Gianeselli, 2026) <doi:10.1177/00131644261417643>, defined as SCI = 1 - [Var(t_i) / Var_max], where Var(t_i) denotes the variance of rater-specific decision thresholds and Var_max denotes the reference variance under maximal threshold dispersion. SCI quantifies convergence in rater decision criteria beyond observed agreement alone and complements classical agreement coefficients by distinguishing agreement in observed categorical outcomes from convergence in latent decision thresholds under an explicit signal detection-theoretic model of categorical judgment. The package provides structured summaries and threshold-based diagnostics for applications in which similar agreement coefficients may reflect substantively different underlying decision criteria across raters. |
| Authors: | Irene Gianeselli [aut, cre] (ORCID: <https://orcid.org/0000-0002-8689-3035>) |
| Maintainer: | Irene Gianeselli <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.0 |
| Built: | 2026-05-21 16:59:17 UTC |
| Source: | https://github.com/cran/scindex |
Internal utility for estimating signal-detection-theoretic decision thresholds from binary ratings and observed truth labels.
estimate_sdt_thresholds( data, item_col, rater_col, rating_col, truth_col, positive = 1 )estimate_sdt_thresholds( data, item_col, rater_col, rating_col, truth_col, positive = 1 )
data |
Standardized long-format data frame. |
item_col |
Character string identifying the item column. |
rater_col |
Character string identifying the rater column. |
rating_col |
Character string identifying the rating column. |
truth_col |
Character string identifying the truth column. |
positive |
Positive class value. |
For each rater, the function computes:
hit rate;
false-alarm rate;
SDT decision threshold.
Thresholds are estimated as:
where:
is the hit rate;
is the false-alarm rate;
is the inverse standard normal CDF.
A log-linear correction is applied to avoid infinite z-values.
A list containing:
Data frame with SDT quantities for each rater.
Mean threshold across raters.
Variance of thresholds.
DeCarlo, L. T. (1998). Signal detection theory and generalized linear models. Psychological Methods, 3(2), 186–205. https://doi.org/10.1037/1082-989X.3.2.186
Macmillan, N. A., & Creelman, C. D. (2004). Detection theory: A user's guide (2nd ed.). New York, NY: Psychology Press. https://doi.org/10.4324/9781410611147
Print method for objects of class "scindex_fit".
## S3 method for class 'scindex_fit' print(x, digits = 3, ...)## S3 method for class 'scindex_fit' print(x, digits = 3, ...)
x |
An object of class |
digits |
Number of digits to print. |
... |
Additional arguments (unused). |
The method displays:
agreement coefficient;
agreement type;
SCI when available;
basic sample information.
Invisibly returns x.
scindex() computes classical inter-rater agreement and, when a ground-truth
variable is available, the Strategic Convergence Index (SCI). The function
automatically returns Cohen's kappa for two raters and Fleiss' kappa for more
than two raters.
scindex( data, item, rater, rating, truth = NULL, positive = 1, variance_bounds = NULL )scindex( data, item, rater, rating, truth = NULL, positive = 1, variance_bounds = NULL )
data |
A data frame containing item identifiers, rater identifiers, ratings, and optionally ground-truth labels. |
item |
Unquoted column name identifying the rated item or case. |
rater |
Unquoted column name identifying the rater. |
rating |
Unquoted column name containing the categorical rating. In the current version, ratings must be binary. |
truth |
Optional unquoted column name containing the ground-truth label. If supplied, SDT thresholds and SCI are computed. |
positive |
Value identifying the positive class. Defaults to |
variance_bounds |
Optional numeric vector of length 2 defining the lower
and upper bounds used to compute the reference variance for SCI. If |
SCI is computed from signal-detection-theoretic decision thresholds and should be interpreted as a model-based index of convergence in rater decision criteria, not as a replacement for agreement coefficients.
An object of class "scindex_fit" containing the agreement coefficient,
its type, SDT thresholds when available, SCI when available, and diagnostic
information.
ratings <- data.frame( item = rep(1:6, each = 2), rater = rep(c("A", "B"), times = 6), rating = c(1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1), truth = rep(c(1, 0, 1, 1, 0, 1), each = 2) ) fit <- scindex( data = ratings, item = item, rater = rater, rating = rating, truth = truth ) fitratings <- data.frame( item = rep(1:6, each = 2), rater = rep(c("A", "B"), times = 6), rating = c(1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1), truth = rep(c(1, 0, 1, 1, 0, 1), each = 2) ) fit <- scindex( data = ratings, item = item, rater = rater, rating = rating, truth = truth ) fit
Simulated binary classification ratings from two raters across eight items, including ground-truth labels.
data(scindex_example)data(scindex_example)
A data frame with 16 rows and 4 variables:
Item identifier.
Rater identifier.
Binary rating assigned by the rater.
Ground-truth binary classification.
The dataset illustrates the computation of Cohen's kappa and the Strategic Convergence Index (SCI).
Simulated example data.
data(scindex_example) fit <- scindex( data = scindex_example, item = item, rater = rater, rating = rating, truth = truth ) fit summary(fit)data(scindex_example) fit <- scindex( data = scindex_example, item = item, rater = rater, rating = rating, truth = truth ) fit summary(fit)
Simulated binary classification ratings from three raters across eight items, including ground-truth labels.
data(scindex_example_multi)data(scindex_example_multi)
A data frame with 24 rows and 4 variables:
Item identifier.
Rater identifier.
Binary rating assigned by the rater.
Ground-truth binary classification.
The dataset illustrates the computation of Fleiss' kappa and the Strategic Convergence Index (SCI) in a multi-rater setting.
Simulated example data.
data(scindex_example_multi) fit <- scindex( data = scindex_example_multi, item = item, rater = rater, rating = rating, truth = truth ) fit summary(fit)data(scindex_example_multi) fit <- scindex( data = scindex_example_multi, item = item, rater = rater, rating = rating, truth = truth ) fit summary(fit)
Summary method for objects of class "scindex_fit".
## S3 method for class 'scindex_fit' summary(object, digits = 3, ...)## S3 method for class 'scindex_fit' summary(object, digits = 3, ...)
object |
An object of class |
digits |
Number of digits to print. |
... |
Additional arguments (unused). |
The method returns a structured summary including the agreement coefficient, SCI when available, SDT threshold estimates, and basic diagnostic information.
Invisibly returns object.