******************************************************************************* * This program indicates how to calculate Cohen's kappa statistic for * * evaluating the level of agreement between two variables. * *******************************************************************************; proc format; value raterfmt 0='Normal' 1='Benign' 2='Suspected' 3='Cancer'; run; data radiology; input rater1 rater2 count; format rater1 rater2 raterfmt.; cards; 0 0 21 0 1 12 0 2 0 0 3 0 1 0 4 1 1 17 1 2 1 1 3 0 2 0 3 2 1 9 2 2 15 2 3 2 3 0 0 3 1 0 3 2 0 3 3 1 ; run; proc freq data=radiology; tables rater1*rater2/agree; weight count; test kappa; exact kappa; title "Cohen's Kappa Coefficients"; run;