confIntKappa: Confidence intervals for weighted kappa and m >= 2 raters

View source: R/confIntKappa.R

confIntKappaR Documentation

Confidence intervals for weighted kappa and m >= 2 raters

Description

Compute confidence intervals for the coefficient of agreement for two nominal or ordered variables and two or more raters.

Usage

confIntKappa(
  data,
  type = c("not Cohen", "Cohen"),
  weights = c("squared", "absolute"),
  m = 1000,
  conf.level = 0.95
)

Arguments

data

m x n matrix or data.frame containing data from m subjects and n raters. If data represents ordered rating, variables should be numeric.

type

String defining the type of confidence interval. If equal to "not Cohen" (default), the weighted version for ordered ratings is computed. If "Cohen", Cohen's unweighted kappa is computed, i.e. ratings are assumed to be nominal.

weights

Define weights to be used if ordered ratings are compared. Can be "squared" (default) or "absolute". Only used if type != "Cohen".

m

Number of bootstrap samples to be generated.

conf.level

Confidence level for confidence interval. Default is 0.95.

Details

This function computes bootstrap confidence intervals for an unweighted or weight kappa coefficient, based on all pairwise complete observations in data.

Fleiss' kappa for m raters according to Conger (1980), allows for weighting also in the case of m > 2 raters computed using the function lkappa in package psy. For bootstrap confidence interval the package boot is used.

Value

A list containing:

n

Number of observations used to compute confidence intervals.

kappa

Computed kappa.

boot.quant

Confidence interval based on quantiles of the bootstrap distribution.

References

Conger, A.J. (1980), Integration and generalisation of Kappas for multiple raters, Psychological Bulletin, 88, 322-328.

See Also

lkappa, boot

Examples


## example is similar to example in ?lkappa
data("expsy", package = "psy")
set.seed(14)
confIntKappa(data = expsy[, c(11,13,15)], type = "not Cohen", weights = "absolute",
             m = 200, conf.level = 0.95)


felix-hof/biostatUZH documentation built on Sept. 27, 2024, 1:48 p.m.