Computes 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.

svykappa(formula, design, ...)

Arguments

formula

one-sided formula giving two measurements

design

survey design object

...

passed to svymean internally (such as return.replicates or influence)

Value

Object of class svystat

See also

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)
#> Warning: NaNs produced
#>       nlcon  SE
#> kappa     1 NaN


(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