Creating ANOM Charts for Rates from Group Counts
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: ANMU1 */
/* TITLE: Creating ANOM Charts for Rates from Group Counts */
/* PRODUCT: QC */
/* SYSTEM: ALL */
/* KEYS: ANOM Charts, Rates Charts, UCHART, Group Counts */
/* PROCS: ANOM */
/* DATA: */
/* */
/* SUPPORT: saswgr */
/* REF: PROC ANOM, UCHART Statement Getting Started 1 */
/* */
/****************************************************************/
data MSAdmits;
length ID $ 2;
input ID Count MemberMonths @@;
KMemberYrs = MemberMonths/12000;
label ID = 'Medical Group Id Number';
datalines;
1A 1882 697204 1K 600 224715 1B 438 154720
1D 318 82254 3M 183 76450 3I 220 73529
1N 121 60169 3H 105 52886 1Q 124 52595
1E 171 51229 3B 88 34775 1C 100 31959
1H 112 28782 3C 84 27478 1R 69 26494
1T 21 25096 1M 130 24723 1O 61 24526
3D 66 22359 1J 54 19101 3J 30 16089
3G 36 13851 3E 26 10587 1G 28 10351
1I 25 6041 1L 20 5138 1S 7 2723
1F 7 2424 1P 2 2030
;
proc sort data=MSAdmits;
by ID;
run;
title 'Medical/Surgical Admissions';
proc print data=MSAdmits (obs = 10) noobs;
run;
ods graphics off;
title 'Analysis of Medical/Surgical Admissions';
proc anom data=MSAdmits;
uchart Count*ID / groupn = KMemberYrs
turnhlabels
nolegend;
label Count = 'Admits per 1000 Member Years';
run;