kappa_test_corr {kappaGold} | R Documentation |
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
)
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
|
conf.level |
numeric. confidence level for confidence intervals |
Value
list. test results as class htest
. The confidence interval shown
by print
refers to the 1st difference k1-k2
.
Note
Due to limitations of the htest
print method the confidence interval shown
by print
refers to the 1st difference k1-k2
. If there are more than 2
groups access all confidence intervals via entry conf.int
.
Examples
# 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))