fleiss.kappa.raw: Fleiss' generalized kappa among multiple raters (2, 3, +)...

Description Usage Arguments Value References Examples

View source: R/agree.coeff3.raw.r

Description

Fleiss' generalized kappa among multiple raters (2, 3, +) when the input data represent the raw ratings reported for each subject and each rater.

Usage

1
2
fleiss.kappa.raw(ratings, weights = "unweighted", categ.labels = NULL,
  conflev = 0.95, N = Inf)

Arguments

ratings

An nxr matrix / data frame of ratings where each column represents one rater and each row one subject.

weights

is a mandatory parameter that is either a string variable or a matrix. The string describes one of the predefined weights and must take one of the values ("quadratic", "ordinal", "linear", "radical", "ratio", "circular", "bipolar"). If this parameter is a matrix then it must be a square matri qxq where q is the number of posssible categories where a subject can be classified. If some of the q possible categories are not used, then it is strobgly advised to specify the complete list of possible categories as a vector in parametr categ.labels. Otherwise, the program may not work.

categ.labels

An optional vector parameter containing the list of all possible ratings. It may be useful in case some of the possibe ratings are not used by any rater, they will still be used when calculating agreement coefficients. The default value is NULL. In this case, only categories reported by the raters are used in the calculations.

conflev

An optional parameter representing the confidence level associated with the confidence interval. Its default value is 0.95.

N

An optional parameter representing the population size (if any). It may be use to perform the final population correction to the variance. Its default value is infinity.

Value

A data list containing 3 objects: (1) a one-row data frame containing various statistics including the requested agreement coefficient, (2) the weight matrix used in the calculations if any, and (3) the categories used in the analysis. These could be categories reported by the raters, or those that were available to the raters whether they used them or not. The output data frame contains the following variables: "coeff.name" (coefficient name-here it will be "Fleiss' Kappa"), "pa" (the percent agreement), "pe" (the percent chance agreement), coeff.val (the agreement coefficient estimate-Fleiss' Kappa), "coeff.se" (the standard error), "conf.int" (Fleiss Kappa's confidence interval), "p.value"(Fleiss Kappa's p-value), "w.name"(the weights' identification).

References

Fleiss, J. L. (1981). Statistical Methods for Rates and Proportions. John Wiley \& Sons.

Examples

1
2
3
4
5
6
7
#The dataset "cac.raw4raters" comes with this package. Analyze it as follows:
cac.raw4raters
fleiss.kappa.raw(cac.raw4raters) #Fleiss' kappa, precision measures, weights & categories
fleiss.kappa.raw(cac.raw4raters)$est #Yields Fleiss' kappa with precision measures
fleiss <- fleiss.kappa.raw(cac.raw4raters)$est$coeff.val #Yields Fleiss' kappa alone.
fleiss
fleiss.kappa.raw(cac.raw4raters, weights = "quadratic") #weighted Fleiss' kappa/quadratic wts

Example output

   Rater1 Rater2 Rater3 Rater4
1       1      1     NA      1
2       2      2      3      2
3       3      3      3      3
4       3      3      3      3
5       2      2      2      2
6       1      2      3      4
7       4      4      4      4
8       1      1      2      1
9       2      2      2      2
10     NA      5      5      5
11     NA     NA      1      1
12     NA     NA      3     NA
$est
     coeff.name        pa        pe coeff.val coeff.se  conf.int     p.value
1 Fleiss' Kappa 0.8181818 0.2387153   0.76117  0.15302 (0.424,1) 0.000419173
      w.name
1 unweighted

$weights
     [,1] [,2] [,3] [,4] [,5]
[1,]    1    0    0    0    0
[2,]    0    1    0    0    0
[3,]    0    0    1    0    0
[4,]    0    0    0    1    0
[5,]    0    0    0    0    1

$categories
[1] 1 2 3 4 5

     coeff.name        pa        pe coeff.val coeff.se  conf.int     p.value
1 Fleiss' Kappa 0.8181818 0.2387153   0.76117  0.15302 (0.424,1) 0.000419173
      w.name
1 unweighted
[1] 0.76117
$est
     coeff.name        pa        pe coeff.val coeff.se  conf.int      p.value
1 Fleiss' Kappa 0.9753788 0.8177083   0.86494  0.14603 (0.544,1) 9.976081e-05
     w.name
1 quadratic

$weights
       [,1]   [,2]   [,3]   [,4]   [,5]
[1,] 1.0000 0.9375 0.7500 0.4375 0.0000
[2,] 0.9375 1.0000 0.9375 0.7500 0.4375
[3,] 0.7500 0.9375 1.0000 0.9375 0.7500
[4,] 0.4375 0.7500 0.9375 1.0000 0.9375
[5,] 0.0000 0.4375 0.7500 0.9375 1.0000

$categories
[1] 1 2 3 4 5

irrCAC documentation built on Sept. 23, 2019, 5:05 p.m.