gkappa: Generalized kappa

Description Usage Arguments Value Author(s) Examples

View source: R/agree_stats.R

Description

Calculates generalized kappa for k-raters

Usage

1
gkappa(ratings, data, id = "id", rater = "rater", score = "score")

Arguments

ratings

n * m matrix or data frame; n subjects, m raters

data

data in long format with three columns: ids, raters, scores

id, rater, score

column names corresponding to IDs, raters, and scores

Value

A list containing the generalized kappa coefficient, the estimated variance, the test statistic, and corresponding p-value comparing the statistic to a standard normal distribution.

$method agreement method
$ragree.name method type
$subjects number of subjects
$raters number of raters
$categories number of categories
$value generalized kappa statistic
$variance variance
$statistic test statistic
$stat.name test statistic name
$p.value p-value comparing statistic to standard normal distribution
$detail
...$p_hat_j proportion of all classifications assigned to category j; the pairwise agreement
...$p_bar overall agreement
...$p_bar_e expected chance agreement

Author(s)

Robert Redd rredd@jimmy.harvard.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## long format using data argument
gkappa(data = disease.l, id = 'patient', rater = 'rater', score = 'category')

## wide format using ratings argument
gkappa(ratings = disease.w)

## example from irr package
library('irr')
data(diagnoses)

gkappa(ratings = diagnoses)

## fleiss's variance calculation is slightly different
kappam.fleiss(diagnoses)

raredd/ragree documentation built on March 25, 2021, 1:42 p.m.