library(vcd)
data(MSPatients, package="vcd")

Calculate Kappa for each set of patients

For the 3-way table, use indexing to select each patient group

Kappa(MSPatients[,,1])
##             value     ASE     z  Pr(>|z|)
## Unweighted 0.2079 0.05046 4.121 3.767e-05
## Weighted   0.3797 0.05167 7.350 1.988e-13
Kappa(MSPatients[,,2])
##             value     ASE     z  Pr(>|z|)
## Unweighted 0.2965 0.07850 3.777 1.587e-04
## Weighted   0.4773 0.07303 6.535 6.352e-11

Confidence intervals for Kappa

confint(Kappa(MSPatients[,,1]))
##             
## Kappa              lwr       upr
##   Unweighted 0.1090518 0.3068332
##   Weighted   0.2784654 0.4809957
confint(Kappa(MSPatients[,,2]))
##             
## Kappa              lwr       upr
##   Unweighted 0.1426518 0.4503813
##   Weighted   0.3341346 0.6204108

Agreement plots

agreementplot(t(MSPatients[,,1]), main = "Winnipeg Patients")

agreementplot(t(MSPatients[,,2]), main = "New Orleans Patients")

IycgLS0tDQojJyB0aXRsZTogIk1TUGF0aWVudHM6IEFncmVlbWVudCINCiMnIGF1dGhvcjogIk1pY2hhZWwgRnJpZW5kbHkiDQojJyBkYXRlOiAiYHIgZm9ybWF0KFN5cy5EYXRlKCkpYCINCiMnIG91dHB1dDoNCiMnICAgaHRtbF9kb2N1bWVudDoNCiMnICAgICB0aGVtZTogcmVhZGFibGUNCiMnICAgICBjb2RlX2Rvd25sb2FkOiB0cnVlDQojJyAtLS0NCg0KbGlicmFyeSh2Y2QpDQpkYXRhKE1TUGF0aWVudHMsIHBhY2thZ2U9InZjZCIpDQoNCiMnICMjIENhbGN1bGF0ZSBLYXBwYSBmb3IgZWFjaCBzZXQgb2YgcGF0aWVudHMNCiMnIEZvciB0aGUgMy13YXkgdGFibGUsIHVzZSBpbmRleGluZyB0byBzZWxlY3QgZWFjaCBwYXRpZW50IGdyb3VwDQpLYXBwYShNU1BhdGllbnRzWywsMV0pDQpLYXBwYShNU1BhdGllbnRzWywsMl0pDQoNCiMnIENvbmZpZGVuY2UgaW50ZXJ2YWxzIGZvciBLYXBwYQ0KY29uZmludChLYXBwYShNU1BhdGllbnRzWywsMV0pKQ0KY29uZmludChLYXBwYShNU1BhdGllbnRzWywsMl0pKQ0KDQojJyAjIyBBZ3JlZW1lbnQgcGxvdHMNCmFncmVlbWVudHBsb3QodChNU1BhdGllbnRzWywsMV0pLCBtYWluID0gIldpbm5pcGVnIFBhdGllbnRzIikNCmFncmVlbWVudHBsb3QodChNU1BhdGllbnRzWywsMl0pLCBtYWluID0gIk5ldyBPcmxlYW5zIFBhdGllbnRzIikNCg==