Skip to contents

Wald test that a coefficient is equal across two or more fits, or equal to value for a single fit. With more than two fits it tests that all are equal (G - 1 degrees of freedom).

Fits are independent samples by default, so their variances add. Use paired = TRUE for fits on the same subjects (two estimators, two attributes, two rater groups, ...): the dependence then comes from the per-subject influence rows, matched by the row names of the rating data, or by row number when there are none.

Usage

agreement_test(..., coef = NULL, paired = FALSE, value = 0)

Arguments

...

Fits from agreement() or agreement_counts(). Names label the output.

coef

Coefficient to compare. Defaults to the first one ("Conger" for agreement(), "Fleiss" for agreement_counts()).

paired

FALSE (default) for independent samples, TRUE for fits on the same subjects.

value

Null value for the coefficient (one fit) or the difference (two fits). Default 0.

Value

An htest object.

Examples

# Two studies with different subjects.
agreement_test(gwet  = agreement(dat.gwet2014),
               klein = agreement(dat.klein2018))
#> 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 Wald test of equal Conger across 2 fits
#> 
#> data:  gwet, klein
#> X-squared = 0.0019646, df = 1, p-value = 0.9646
#> alternative hypothesis: true difference in Conger is not equal to 0
#> sample estimates:
#>      gwet     klein 
#> 0.4233051 0.4301049 
#> 

# Two rater pairs on the same 50 subjects.
agreement_test(AB = agreement(dat.zapf2016[, 1:2], estimator = "pairwise"),
               CD = agreement(dat.zapf2016[, 3:4], estimator = "pairwise"),
               paired = TRUE)
#> 
#> 	Paired Wald test of equal Conger across 2 fits
#> 
#> data:  AB, CD
#> X-squared = 2.2432, df = 1, p-value = 0.1342
#> alternative hypothesis: true difference in Conger is not equal to 0
#> sample estimates:
#>        AB        CD 
#> 0.9309091 0.8466753 
#>