Learn R Programming

kappaGold (version 0.4.0)

kappa_test_corr: Test for homogeneity of kappa in correlated groups

Description

Bootstrap test on kappa based on data with common subjects. The differences in kappa between all groups (but first) relative to first group (e.g., Group 2 - Group 1) are considered.

Usage

kappa_test_corr(
  ratings,
  grpIdx,
  kappaF,
  kappaF_args = list(),
  B = 100,
  alternative = "two.sided",
  conf.level = 0.95
)

Value

list. test results as class htest. The confidence interval shown by print refers to the 1st difference k1-k2.

Arguments

ratings

matrix. ratings as sbj x raters, including the multiple groups to be tested

grpIdx

list. Comprises numeric index vectors per group. Each group is defined as set of raters (i.e., columns)

kappaF

function or list of functions. kappa function to apply on each group.

kappaF_args

list. Further arguments for the kappa function. By default, these settings apply to all groups, but the settings can be specified per group (as list of lists).

B

numeric. number of bootstrap samples. At least 1000 are recommended for stable results.

alternative

character. Direction of alternative. Currently only 'two.sided' is supported.

conf.level

numeric. confidence level for confidence intervals

Examples

Run this code
# Compare Fleiss kappa between students and expert raters
# For real analyses use more bootstrap samples (B >= 1000)
kappa_test_corr(ratings = SC_test, grpIdx = list(S=1:39, E=40:50), B = 125,
                kappaF = kappam_fleiss,
                kappaF_args = list(variant = "fleiss", ratingScale=-2:2))

Run the code above in your browser using DataLab