*********************************************************************** * This is a program that illustrates the use of PROC FREQ in SAS for * * comparing two diagnostic tests based on data from one sample. * ***********************************************************************; proc format; value testfmt 1='positive' 2='negative'; run; data comparison; input test1 test2 count; format test1 test2 testfmt.; cards; 1 1 30 1 2 35 2 1 23 2 2 12 run; proc freq data=comparison; tables test1*test2/agree; weight count; exact McNem; title "McNemar's Test for Comparing Sensitivities"; run;