i have two subgroups in my dataset, and i estimated kappa and obtained confidence intervals for each as per this code:
proc freq data=.... order=data ;
tables var1*var2 / agree noprint;
weight frequency / zeros;
run;
is it possible to test whether the agreement (as measured by kappa) is the same within these subgroups ie Ho: kappa1 = kappa2?
I assume you have a categorical variable (gender, race, political affiliation) that you want to use to see whether the kappa for one group (females) is equivalent to the kappa for the other group (males).
I'm not an expert on this topic, but run the following example to see if it gives you some helpful information. You can put the categorical variable FIRST on the TABLES statement to get analyses that control for each strata. You also get an analysis for the overall kappa:
data Have;
input Sex $ var1 $ var2 $ Frequency ;
datalines;
F A X 20
F A Y 30
F B X 20
F B Y 20
M A X 40
M A Y 60
M B X 20
M B Y 10
;
proc freq data=Have order=data ;
tables sex*var1*var2 / agree ;
weight frequency / zeros;
test kappa;
run;
See the PROC FREQ doc, especially the sections "Overall Kappa Coefficient" and "Tests for Equal Kappa Coefficients."
I assume you have a categorical variable (gender, race, political affiliation) that you want to use to see whether the kappa for one group (females) is equivalent to the kappa for the other group (males).
I'm not an expert on this topic, but run the following example to see if it gives you some helpful information. You can put the categorical variable FIRST on the TABLES statement to get analyses that control for each strata. You also get an analysis for the overall kappa:
data Have;
input Sex $ var1 $ var2 $ Frequency ;
datalines;
F A X 20
F A Y 30
F B X 20
F B Y 20
M A X 40
M A Y 60
M B X 20
M B Y 10
;
proc freq data=Have order=data ;
tables sex*var1*var2 / agree ;
weight frequency / zeros;
test kappa;
run;
See the PROC FREQ doc, especially the sections "Overall Kappa Coefficient" and "Tests for Equal Kappa Coefficients."
thanks!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.