kappaFleiss: Calculates Fleiss' kappa between k raters for all k-uplets of...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This function is based on the function 'kappam.fleiss' from the package 'irr', and simply adds the possibility of calculating several kappas at once.

Usage

1
kappaFleiss(data, nb_raters=3)

Arguments

data

dataframe with k x p columns, k being the number of raters, and p the number of traits. The first k columns represent the scores attributed by the k raters for the first trait; the next k columns represent the scores attributed by the k raters for the second trait; etc. The dataframe must contains a header, and each column must be labeled as follows: ‘VariableName_X’, where X is a unique character (letter or number) associated with each rater (cf. below for an example).

nb_raters

integer for the number of raters.

Details

For each trait, only complete cases are used for the calculation.

Value

A dataframe with p rows (one per trait) and two columns, giving respectively the kappa value for each trait, and the number of individuals used to calculate this value.

Author(s)

Frédéric Santos, frederic.santos@u-bordeaux.fr

References

Cohen, J. (1960) A coefficient of agreement for nominal scales. Educational and Psychological Measurement, 20, 37–46.

Cohen, J. (1968) Weighted kappa: Nominal scale agreement with provision for scaled disagreement or partial credit. Psychological Bulletin, 70, 213–220.

See Also

irr::kappam.fleiss

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Here we create and display an artifical dataset,
# describing two traits coded by three raters:
scores <- data.frame(
	Trait1_A = c(1,0,2,1,1,1,0,2,1,1),
	Trait1_B = c(1,2,0,1,2,1,0,1,2,1),
	Trait1_C = c(2,2,2,1,1,1,0,1,2,1),
	Trait2_A = c(1,4,5,2,3,5,1,2,3,4),
	Trait2_B = c(2,5,2,2,4,5,1,3,1,4),
	Trait2_C = c(2,4,3,2,4,5,2,2,3,4)
	)
scores

# Retrieve Fleiss' kappa for Trait1 and Trait2,
# to evaluate inter-rater agreement between raters A, B and C:
kappaFleiss(scores, nb_raters=3)

Example output

Loading required package: shiny
Loading required package: irr
Loading required package: lpSolve
   Trait1_A Trait1_B Trait1_C Trait2_A Trait2_B Trait2_C
1         1        1        2        1        2        2
2         0        2        2        4        5        4
3         2        0        2        5        2        3
4         1        1        1        2        2        2
5         1        2        1        3        4        4
6         1        1        1        5        5        5
7         0        0        0        1        1        2
8         2        1        1        2        3        2
9         1        2        2        3        1        3
10        1        1        1        4        4        4
           Kappa Subjects
Trait1 0.3308550       10
Trait2 0.3607955       10

KappaGUI documentation built on May 2, 2019, 12:38 p.m.