kappa2.table: Kappa coefficient for 2 raters

Description Usage Arguments Value Examples

View source: R/agree.coeff2.r

Description

Kappa coefficient for 2 raters

Usage

1
2
kappa2.table(ratings, weights = identity.weights(1:ncol(ratings)),
  conflev = 0.95, N = Inf)

Arguments

ratings

A square or contingency table of ratings (assume no missing ratings). See the 2 datasets "cont3x3abstractors" and "cont4x4diagnosis" that come with this package as examples.

weights

An optional matrix that contains the weights used in the weighted analysis.

conflev

An optional confidence level for confidence intervals. The default value is the traditional 0.95.

N

An optional population size. The default value is infinity.

Value

A data frame containing the following 5 variables: coeff.name coeff.val coeff.se coeff.ci coeff.pval.

Examples

1
2
3
4
5
6
#The dataset "cont3x3abstractors" comes with this package. Analyze it as follows:
kappa2.table(cont3x3abstractors) #Yields Cohen's kappa along with precision measures
kappa <- kappa2.table(cont3x3abstractors)$coeff.val #Yields Cohen's kappa alone.
kappa
q <- nrow(cont3x3abstractors) #Number of categories
kappa2.table(cont3x3abstractors,weights = quadratic.weights(1:q))#weighted kappa/quadratic wts

Example output

     coeff.name coeff.val   coeff.se     coeff.ci coeff.pval
1 Cohen's Kappa 0.7964094 0.05891072 (0.68,0.913)      0e+00
[1] 0.7964094
     coeff.name coeff.val   coeff.se      coeff.ci coeff.pval
1 Cohen's Kappa 0.8921569 0.03535151 (0.822,0.962)      0e+00

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