Home / Software / R Packages & Functions
R · CRAN & standalone scripts

R packages & functions

Two ways to compute the same agreement coefficients as AgreeStat360, from R: install the CRAN packages, or source individual script files directly.

01 · Packages

irrCAC & irrICC

Both packages were developed by Dr. Gwet. irrCAC computes chance-corrected agreement coefficients (CAC) — Cohen's Kappa, Gwet's AC1/AC2, Krippendorff's alpha, and related measures. irrICC computes intraclass correlation coefficients (ICC) for quantitative ratings.

irrCAC

Chance-corrected agreement coefficients for categorical ratings.

View on CRAN ↗

irrICC

Intraclass correlation coefficients for quantitative ratings.

View on CRAN ↗

Both packages can be installed from CRAN like any standard R package, or directly from GitHub:

# from GitHub
devtools::install_github("kgwet/irrCAC")
devtools::install_github("kgwet/irrICC")
02 · Standalone scripts

Downloadable R script files

Prefer not to install a package? These script files each contain a set of R functions you can source directly, covering the same coefficients.

2 raters · contingency table

agree.coeff2.r

Computes agreement coefficients and their standard errors for 2 raters, with ratings organized as a contingency table (a square matrix of subject counts by rater and category). Works best when both raters rated every subject — otherwise subjects rated by only one rater may not be classified correctly.

2+ raters · n × q table

agree.coeff3.dist.r

Computes agreement coefficients and their standard errors for multiple raters, with ratings organized as an n × q table — n subjects by q categories — showing how many raters assigned each subject to each category.

2+ raters · raw ratings

agree.coeff3.raw.r

Computes agreement coefficients and their standard errors for multiple raters, with ratings organized as an n × r table of raw (alphanumeric) ratings — n subjects, r raters, one row per subject. Requires weights.gen.r to also be loaded.

Supporting script

weights.gen.r

Generates the weight sets used for computing weighted agreement coefficients. Also required by paired.ttest.r below.

Significance testing

paired.ttest.r

Implements the paired t-test for testing whether two agreement coefficients differ significantly, based on the linearization method described in the 2016 paper on correlated agreement coefficients.

Using these scripts: read the full script file into R with source(), along with weights.gen.r where noted. For example:
source("C:\\YourDirectory\\weights.gen.r")
← Back to Software