Cohen's kappa for agreement
svykappa.RdComputes the unweighted kappa measure of agreement between two raters and the standard error. The measurements must both be factor variables in the survey design object.
Examples
data(api)
dclus1<-svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc)
svykappa(~comp.imp+sch.wide, dclus1)
#> nlcon SE
#> kappa 0.55321 0.0399
dclus1<-update(dclus1, stypecopy=stype)
svykappa(~stype+stypecopy,dclus1)
#> nlcon SE
#> kappa 1 0
(kappas<-svyby(~comp.imp+sch.wide,~stype,design=dclus1, svykappa, covmat=TRUE))
#> stype kappa se.kappa
#> E E 0.4827586 0.0716370
#> H H 0.4285714 0.1638083
#> M M 0.7491639 0.1235138
svycontrast(kappas, quote(E/H))
#> nlcon SE
#> contrast 1.1264 0.5696