ckappa: Computes Cohen's Kappa for agreement in the case of 2 raters.

View source: R/stats.R

ckappaR Documentation

Computes Cohen's Kappa for agreement in the case of 2 raters.

Description

Cohen’s kappa coefficient value is a robust statistical measure of inter-rater agreement published in 1960 by Jacob Cohen. It has been reused by numerous studies in sleep medicine to measure the accuracy of predictions, especially for automatic sleep staging.

Usage

ckappa(observed, predicted)

Arguments

observed

The vector of observed values (truth).

predicted

The vector of predicted values.

References

Cohen J. A Coefficient of Agreement for Nominal Scales. Educational and Psychological Measurement. 1960;20:37-46.

Examples

observed = c("AWA", "N1", "N2", "N3", "REM")
predicted = c("AWA", "AWA", "N2", "N3", "REM")
ckappa(observed, predicted)

rsleep documentation built on Nov. 6, 2023, 1:06 a.m.