Wald test that a chosen kappa coefficient is equal across two or more [kappa()] fits (or, with a single fit, equal to `value`). Pass the fits to `...`; name them to label the output.
Set `paired = TRUE` when the fits are computed on the **same subjects in the same row order** (two estimators, two weight schemes, two rated attributes, rater pairs, ...); the dependence is taken from the per-subject influence functions (`fit$psi`). Set `paired = FALSE` for independent samples, where the variances add. With more than two fits this is the joint hypothesis that all are equal (`G - 1` degrees of freedom).
Arguments
- ...
Two or more `misskappa_estimate` objects from [kappa()] (a single fit tests `coef = value`). Names become labels in the output.
- coef
Coefficient to compare; default `"Conger"`.
- paired
`TRUE` (default) for same-subject fits, `FALSE` for independent samples.
- value
Null value: the coefficient (single fit) or the pairwise difference (default `0`).
Examples
# Paired: are two rater pairs equally consistent on the same 50 subjects
# (Zapf 2016)? The dependence is read from the per-subject influence
# functions, so paired = TRUE (the default) is appropriate.
kappa_test(AB = kappa(dat.zapf2016[, 1:2], estimator = "pairwise"),
CD = kappa(dat.zapf2016[, 3:4], estimator = "pairwise"),
coef = "Conger")
#>
#> Paired (dependent) test of equal Conger across 2 fits
#>
#> data: AB, CD
#> X-squared = 2.2432, df = 1, p-value = 0.1342
#> sample estimates:
#> AB CD
#> 0.9309091 0.8466753
#>
# Independent samples (different subjects in two studies): variances add.
kappa_test(gwet = kappa(dat.gwet2014, estimator = "ipw"),
klein = kappa(dat.klein2018, estimator = "ipw"),
coef = "Conger", paired = FALSE)
#> Warning: rater pair(s) rater4-rater5 co-observed by only one subject; the corresponding pairwise covariance is degenerate and the standard error unreliable.
#>
#> Independent-sample test of equal Conger across 2 fits
#>
#> data: gwet, klein
#> X-squared = 0.0019646, df = 1, p-value = 0.9646
#> sample estimates:
#> gwet klein
#> 0.4233051 0.4301049
#>
