| 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>, computed as SCI = max(0, 1 - [Var(t_i) / Var_max]), where Var(t_i) denotes the sample variance of rater-specific decision thresholds and Var_max denotes the reference variance of a uniform distribution over a specified threshold interval (Gianeselli, 2026) <doi:10.1177/00131644261455307>. 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.1 |
| Built: | 2026-11-27 04:11:11 UTC |
| Source: | https://github.com/cran/scindex |
Internal utility for estimating signal-detection-theoretic (SDT) decision criteria from binary ratings and observed ground-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 |
A preprocessed long-format data frame containing rater identifiers, binary ratings, and binary ground-truth labels. Ratings and ground-truth labels must be coded as 0 and 1. |
item_col |
Character string identifying the item column. Retained in the function interface but not used directly in the estimation of rater-specific decision criteria. |
rater_col |
Character string identifying the rater column. |
rating_col |
Character string identifying the binary rating column. |
truth_col |
Character string identifying the binary ground-truth column. |
positive |
Original value identifying the positive category. Retained in the function interface but not used directly, because ratings and ground-truth labels have already been recoded during preprocessing. |
The function operates on preprocessed long-format data in which ratings and ground-truth labels have been recoded into binary values. The positive category is coded as 1 and the negative category as 0.
Each rater must have observations in both ground-truth categories. All available observations for each rater are used, including observations from items with incomplete ratings across raters.
For each rater, let , , , and
denote the observed numbers of hits, misses,
false alarms, and correct rejections, respectively.
The numbers of signal and noise observations are
and
The hit rate and false-alarm rate are estimated using the log-linear correction described by Hautus (1995):
The correction is applied to all classification counts, including those for raters whose uncorrected proportions are already strictly between 0 and 1. It ensures that the corrected rates lie strictly between 0 and 1, preventing infinite standard normal quantiles.
The decision criterion for rater i is computed as
where denotes the inverse cumulative
distribution function of the standard normal distribution.
Under the equal-variance Gaussian SDT model, the estimated criterion is expressed in standard deviation units relative to the midpoint of the class-conditional evidence distributions (DeCarlo, 1998; Macmillan & Creelman, 2005).
Negative criterion values indicate a liberal decision criterion, positive values indicate a conservative decision criterion, and zero indicates a criterion located at the midpoint of the class-conditional evidence distributions.
A criterion of zero does not imply optimal classification performance or high discriminative ability.
Sensitivity, specificity, and accuracy are computed directly from the observed classification counts, without applying the log-linear correction:
These quantities describe observed classification performance and are distinct from the corrected proportions used to estimate the SDT decision criterion.
The arithmetic mean and sample variance of the estimated decision criteria are computed across raters.
For K raters, the sample variance is
Each rater contributes equally to the calculation, irrespective of the number of observations available for that rater.
A list containing the following components:
thresholdsA data frame with one row per rater and the following columns:
raterRater identifier.
hit_rateLog-linearly corrected hit rate.
false_alarm_rateLog-linearly corrected false-alarm rate.
z_hitStandard normal quantile of the corrected hit rate.
z_false_alarmStandard normal quantile of the corrected false-alarm rate.
thresholdEstimated SDT decision criterion in standard deviation units relative to the midpoint of the class-conditional evidence distributions.
sensitivityUncorrected empirical sensitivity.
specificityUncorrected empirical specificity.
accuracyProportion of correctly classified observations.
mean_thresholdArithmetic mean of the estimated decision criteria across raters.
threshold_varianceSample variance of the estimated decision criteria across raters, computed using a denominator of K - 1.
DeCarlo, L. T. (1998). Signal detection theory and generalized linear models. Psychological Methods, 3(2), 186–205. doi:10.1037/1082-989X.3.2.186
Hautus, M. J. (1995). Corrections for extreme proportions and their biasing effects on estimated values of d'. Behavior Research Methods, Instruments, & Computers, 27(1), 46–51. doi:10.3758/BF03203619
Macmillan, N. A., & Creelman, C. D. (2005). Detection theory: A user's guide (2nd ed.). Lawrence Erlbaum Associates. doi: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;
number of items used for agreement when this differs from the total number of items.
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. At least two raters are required. |
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. Ratings must contain exactly two observed categories across the supplied data. |
truth |
Optional unquoted column name containing the ground-truth
label. If supplied, SDT thresholds and SCI are computed.
Ground-truth labels must contain exactly two observed categories,
use the same category coding as |
positive |
A single non-missing value identifying the positive
class. It must correspond to one of the observed rating categories.
Defaults to |
variance_bounds |
Optional numeric vector containing two finite
values defining the lower and upper limits of the reference threshold
interval, with the lower limit strictly smaller than the upper limit.
The resulting reference variance must be finite and strictly positive
when SCI is computed. If |
SCI is a model-based index of convergence in rater decision criteria. It complements agreement coefficients by quantifying dispersion in estimated signal-detection-theoretic (SDT) criteria independently of the calculation of observed classification agreement.
Data must be supplied in long format, with one row per observed item-rater combination. Missing values are not permitted in the columns used for analysis. Each item-rater combination must occur only once.
Incomplete rating panels are permitted when unobserved item-rater combinations are represented by absent rows, provided that the remaining input requirements are satisfied.
Ratings and ground-truth labels, when supplied, are internally recoded
into binary values, with the category specified by positive coded as 1
and the other category coded as 0.
Agreement coefficients are computed using items with complete ratings across all raters. At least one complete item is required.
When the denominator of the kappa coefficient is zero, kappa is undefined
and is returned as NA.
The number of items used for agreement is reported in the agreement
component of the returned object. The print and summary methods also
report this number when it differs from the total number of items.
SDT criteria are estimated using all available observations for each rater, including observations from items excluded from the agreement calculation because of incomplete ratings.
Hit rates and false-alarm rates are estimated using a log-linear correction to avoid infinite normal quantiles. The decision criterion for rater i is computed as
where H and F denote the corrected hit rate and false-alarm rate, respectively, and the inverse standard normal cumulative distribution function is applied to both rates.
The resulting criteria are expressed in standard deviation units relative to the midpoint of the class-conditional evidence distributions under the equal-variance Gaussian SDT model.
Sensitivity, specificity, and accuracy are computed from the observed classification counts without the log-linear correction.
SCI is computed as
where the sample variance of the estimated rater-specific decision criteria is
and K denotes the number of raters.
The reference variance is defined as
where a and b are the lower and upper limits of the reference threshold interval, respectively. This quantity is the variance of a uniform distribution over the specified interval. It is not the maximum attainable variance of thresholds within that interval.
SCI ranges from 0 to 1. A value of 1 indicates zero dispersion in the estimated decision criteria. When the observed threshold variance equals or exceeds the reference variance, SCI is set to 0.
The reference interval is used exclusively for normalisation. Its limits do not constrain or truncate the estimated decision criteria.
If variance_bounds is NULL, symmetric empirical bounds are defined
by the interval , where
Consequently, the reference variance may differ across rating panels when empirical bounds are used. Comparisons across panels or conditions should use common fixed bounds and a common SDT criterion scale.
SCI describes convergence in estimated decision criteria. A high SCI does not necessarily imply high observed agreement, discriminative performance, or classification accuracy.
An object of class "scindex_fit" containing the following
components:
kappaThe estimated agreement coefficient.
Returns NA when kappa is undefined.
kappa_typeA character string identifying the agreement coefficient as Cohen's kappa or Fleiss' kappa.
agreementA list containing the agreement coefficient, observed agreement, expected agreement, the number of complete items used for agreement, and coefficient-specific diagnostic information.
sciThe Strategic Convergence Index.
Returns NA_real_ when ground-truth labels are not supplied.
thresholdsA data frame containing rater identifiers,
corrected hit rates and false-alarm rates, their standard normal
quantiles, estimated SDT decision criteria, sensitivity, specificity,
and accuracy. Returns NULL when ground-truth labels are
not supplied.
sdtA list containing the rater-specific SDT estimates,
the mean decision criterion, and the sample variance of the
estimated criteria. Returns NULL when ground-truth labels
are not supplied.
threshold_varianceThe sample variance of the estimated
decision criteria. Returns NA_real_ when ground-truth labels
are not supplied.
n_ratersThe total number of raters in the supplied data.
n_itemsThe total number of distinct items in the supplied data, including items with incomplete ratings.
truth_availableA logical value indicating whether ground-truth labels were supplied.
positiveThe original value identifying the positive class.
callThe matched function call.
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:
Integer identifier of the rated item, ranging from 1 to 8.
Character identifier of the rater, either A or B.
Numeric binary classification assigned by the rater, coded as 0 or 1.
Numeric binary ground-truth classification, coded as 0 or 1 and shared by both raters for each item.
The dataset represents a complete rating panel in which each of the eight items is evaluated by both raters. Four items belong to the positive ground-truth category and four belong to the negative ground-truth category.
Both ratings and ground-truth labels are coded as 0 and 1, with 1 identifying the positive category.
The dataset illustrates the computation and complementary interpretation of Cohen's kappa and the Strategic Convergence Index (SCI).
The two raters differ in observed classification performance but have identical estimated signal-detection-theoretic decision criteria. The resulting Cohen's kappa is 0.5, whereas SCI is 1.
This example illustrates that complete convergence in estimated decision criteria does not necessarily imply perfect observed agreement, equal discriminative ability, or identical classification accuracy.
The data are intended for methodological illustration and software demonstration.
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:
Integer identifier of the rated item, ranging from 1 to 8.
Character identifier of the rater, either A, B, or C.
Numeric binary classification assigned by the rater, coded as 0 or 1.
Numeric binary ground-truth classification, coded as 0 or 1 and shared by all three raters for each item.
The dataset represents a complete rating panel in which each of the eight items is evaluated by all three raters. Four items belong to the positive ground-truth category and four belong to the negative ground-truth category.
Both ratings and ground-truth labels are coded as 0 and 1, with 1 identifying the positive category.
The dataset illustrates the computation and complementary interpretation of Fleiss' kappa and the Strategic Convergence Index (SCI) in a multi-rater setting.
The three raters differ in observed classification performance. Raters A and C have identical estimated signal-detection-theoretic decision criteria, whereas rater B has a negative estimated criterion. The resulting Fleiss' kappa is approximately 0.497.
The sample variance of the estimated decision criteria is approximately 0.04777. With the default empirical reference interval, SCI is approximately 0.857. When fixed reference bounds of -3 and 3 are supplied, SCI is approximately 0.984.
This example illustrates the dependence of SCI on the reference variance used for normalisation. The estimated decision criteria, their sample variance, and the agreement coefficient remain unchanged when the reference bounds are varied.
Comparisons of SCI across rating panels or conditions should use common fixed reference bounds and a common SDT criterion scale.
The data are intended for methodological illustration and software demonstration.
Simulated example data.
data(scindex_example_multi) # SCI with default empirical reference bounds fit <- scindex( data = scindex_example_multi, item = item, rater = rater, rating = rating, truth = truth ) fit summary(fit) # SCI with fixed reference bounds fit_fixed <- scindex( data = scindex_example_multi, item = item, rater = rater, rating = rating, truth = truth, variance_bounds = c(-3, 3) ) fit_fixed # Compare SCI under the two normalisation settings c( empirical = fit$sci, fixed = fit_fixed$sci )data(scindex_example_multi) # SCI with default empirical reference bounds fit <- scindex( data = scindex_example_multi, item = item, rater = rater, rating = rating, truth = truth ) fit summary(fit) # SCI with fixed reference bounds fit_fixed <- scindex( data = scindex_example_multi, item = item, rater = rater, rating = rating, truth = truth, variance_bounds = c(-3, 3) ) fit_fixed # Compare SCI under the two normalisation settings c( empirical = fit$sci, fixed = fit_fixed$sci )
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. When the number of items used for agreement differs from the total number of items, both quantities are reported.
Invisibly returns object.