/* Homophone confusions and Alzheimer's disease */ data homophone; input patient confusions1 confusions2; difference=confusions2-confusions1; cards; 1 5 5 2 1 3 3 0 0 4 1 1 5 0 1 6 2 1 7 5 6 8 1 2 9 0 9 10 5 8 11 7 10 12 0 3 13 3 9 14 5 8 15 7 12 16 10 16 17 5 5 18 6 3 19 9 6 20 11 8 ; proc print data=homophone; title 'homophone confusions example'; /* ------------------------------------------ */ /* graphical summary */ /* ------------------------------------------ */ proc sgplot data=homophone; title 'homophone confusions difference distribution'; histogram difference / binwidth=1 datalabel=percent; density difference / type=kernel; proc sgplot data=homophone; title 'homophone confusions difference distribution'; histogram difference / binwidth=2 datalabel=percent; density difference / type=kernel; proc sgplot data=homophone; hbox difference; run; title; /* ------------------------------------------ */ /* numerical summary */ /* ------------------------------------------ */ proc means data=homophone maxdec=4 n min q1 median q3 max range qrange mean std; var difference; proc means data=homophone maxdec=4 p1 p5 p10 p20 p30 p40 p50 p60 p70 p80 p90 p95 p99; var difference; proc univariate data=homophone nextrval=5;; var difference; ods select ExtremeValues BasicMeasures Quantiles; title 'homophone confusions difference distribution'; run; title; /* -------------------------------------------------- */