The STDRATE Procedure

Example 109.4 Displaying SMR Results from BY Groups

(View the complete code for this example.)

This example illustrates the use of ODS OUTPUT statement to save standardized mortality ratios for different causes and to display these statistics together in a table and in a plot.

The Florida_Cs data set contains the stratum-specific mortality information for stomach cancer and skin cancer in year 2000 for the state of Florida (Florida Department of Health 2000, 2013). The variable Age is the grouping variable that forms the strata in the standardization. The variables Event_C16, Event_C43, and PYear identify the number of events for stomach cancer, the number of events for skin cancer, and the person-years, respectively. The COMMA9. format is specified in the DATA step to input numerical values that contain commas in PYear.

data Florida_Cs;
   input Age $1-5 Event_C16 Event_C43 PYear:comma9.;
   datalines;
00-04    0    0    953,785
05-14    0    0  1,997,935
15-24    0    4  1,885,014
25-34    1   14  1,957,573
35-44   19   43  2,356,649
45-54   64   72  2,088,000
55-64  114   70  1,548,371
65-74  201  126  1,447,432
75-84  294  136  1,087,524
85+    136   73    335,944
;

The following statements construct and list the mortality information by cancer cause:

data Florida_Cs;
   set Florida_Cs;
   Cause='Stomach';  Event=Event_C16;  output;
   Cause='Skin';     Event=Event_C43;  output;
   drop Event_C16 Event_C43;
run;
proc sort data=Florida_Cs;
   by Cause;
run;

proc print data=Florida_Cs;
   var Cause Age Event PYear;
run;

Output 109.4.1: Florida Data

ObsCauseAgeEventPYear
1Skin00-040953785
2Skin05-1401997935
3Skin15-2441885014
4Skin25-34141957573
5Skin35-44432356649
6Skin45-54722088000
7Skin55-64701548371
8Skin65-741261447432
9Skin75-841361087524
10Skin85+73335944
11Stomach00-040953785
12Stomach05-1401997935
13Stomach15-2401885014
14Stomach25-3411957573
15Stomach35-44192356649
16Stomach45-54642088000
17Stomach55-641141548371
18Stomach65-742011447432
19Stomach75-842941087524
20Stomach85+136335944


The US_Cs data set contains the corresponding stratum-specific mortality information for the United States (Miniño et al. 2002; US Bureau of the Census 2011). The variable Age is the grouping variable that forms the strata in the standardization. The variables Event_C16, Event_C43, and PYear identify the number of events for stomach cancer, the number of events for skin cancer, and the person-years, respectively.

data US_Cs;
   input Age $1-5 Event_C16 Event_C43 PYear:comma10.;
   datalines;
00-04     0     0  19,175,798
05-14     1     1  41,077,577
15-24    14    41  39,183,891
25-34   124   186  39,892,024
35-44   484   626  45,148,527
45-54  1097  1199  37,677,952
55-64  1804  1303  24,274,684
65-74  3054  1637  18,390,986
75-84  3833  1624  12,361,180
85+    2234   803   4,239,587
;

The following statements construct and list the mortality information by cancer cause:

data US_Cs;
   set US_Cs;
   Cause='Stomach';  Event=Event_C16;  output;
   Cause='Skin';     Event=Event_C43;  output;
   drop Event_C16 Event_C43;
run;
proc sort data=US_Cs;
   by Cause;
run;

proc print data=US_Cs;
   var Cause Age Event PYear;
run;

Output 109.4.2 lists the mortality information by cancer cause.

Output 109.4.2: Florida Data

ObsCauseAgeEventPYear
1Skin00-04019175798
2Skin05-14141077577
3Skin15-244139183891
4Skin25-3418639892024
5Skin35-4462645148527
6Skin45-54119937677952
7Skin55-64130324274684
8Skin65-74163718390986
9Skin75-84162412361180
10Skin85+8034239587
11Stomach00-04019175798
12Stomach05-14141077577
13Stomach15-241439183891
14Stomach25-3412439892024
15Stomach35-4448445148527
16Stomach45-54109737677952
17Stomach55-64180424274684
18Stomach65-74305418390986
19Stomach75-84383312361180
20Stomach85+22344239587


The following statements invoke the STDRATE procedure and request indirect standardization to compute the skin and stomach SMR estimates for the state of Florida. The BY statement requests separate analyses of causes that are defined by the Cause variable.

ods graphics on;
ods select StdInfo StrataSmrPlot Smr;
proc stdrate data=Florida_Cs refdata=US_Cs
             stat=rate
             method=indirect
             plots=smr
             ;
   population event=Event total=PYear;
   reference  event=Event total=PYear;
   strata Age;
   by Cause;
ods output smr=Smr_Cs;
run;

Only the tables and plots that are specified in the ODS SELECT statement are displayed.

The STDINFO option in the ODS SELECT statement requests that the "Standardization Information" table display the standardization information for the first BY group, skin cancer, as shown in Output 109.4.3

Output 109.4.3: Standardization Information

The STDRATE Procedure

Standardization Information
Data SetWORK.FLORIDA_CS
Reference Data SetWORK.US_CS
MethodIndirect Standardization
StatisticRate
Number of Strata10
Rate Multiplier100000


The STRATASMRPLOT option in the ODS SELECT statement requests that the strata SMR plot display stratum-specific SMR estimates for skin cancer with confidence limits, as shown in Output 109.4.4.

Output 109.4.4: Strata SMR Plot

Strata SMR Plot


The SMR option in the ODS SELECT statement requests that the "Standardized Morbidity/Mortality Ratio" table display the SMR, its confidence limits, and the test for the null hypothesis for skin cancer, as shown in Output 109.4.5. With the default ALPHA=0.05, confidence limits are constructed.

Output 109.4.5: Standardized Morbidity/Mortality Ratio

Standardized Morbidity/Mortality Ratio
Observed
Events
Expected
Events
SMRStandard
Error
95% Normal Confidence
Limits
ZPr > |Z|
538528.7261.01750.04390.93161.10350.400.6893


Similarly, the "Standardization Information" table in Output 109.4.6 displays the standardization information for the second BY group, stomach cancer.

Output 109.4.6: Standardization Information

The STDRATE Procedure

Standardization Information
Data SetWORK.FLORIDA_CS
Reference Data SetWORK.US_CS
MethodIndirect Standardization
StatisticRate
Number of Strata10
Rate Multiplier100000


The "Strata SMR Plot" displays stratum-specific SMR estimates with confidence limits for stomach cancer, as shown in Output 109.4.7.

Output 109.4.7: Strata SMR Plot

Strata SMR Plot


The "Standardized Morbidity/Mortality Ratio" table displays the SMR, its confidence limits, and the test for the null hypothesis for stomach cancer, as shown in Output 109.4.8.

Output 109.4.8: Standardized Morbidity/Mortality Ratio

Standardized Morbidity/Mortality Ratio
Observed
Events
Expected
Events
SMRStandard
Error
95% Normal Confidence
Limits
ZPr > |Z|
829962.5370.86130.02990.80260.9199-4.64<.0001


The ODS OUTPUT SMR=SMR_CS statement requests that the "Standardized Morbidity/Mortality Ratio" tables for the two cancer causes be saved in the data set Smr_Cs. The following statements display the selected output variables for the data set:

proc print data=Smr_Cs;
   var Cause ObservedEvents ExpectedEvents Smr SmrLcl SmrUcl;
run;

Output 109.4.9: SMR Results from BY Groups

ObsCauseObservedEventsExpectedEventsSmrSmrLclSmrUcl
1Skin538528.7261.01750.93161.1035
2Stomach829962.5370.86130.80260.9199


The table in Output 109.4.9 shows that the study population (state of Florida) has a higher skin cancer rate and a lower stomach cancer rate than the reference population (United States), but only the lower stomach cancer rate is significant because its corresponding SMR upper confidence limit (0.9199) is less than 1.

The following statements display the standardized morbidity/mortality ratios for the two causes in a plot:

proc sgplot data=Smr_Cs;
   scatter y=Cause x=Smr / group=Cause;
   highlow y=Cause high=SmrUcl low=SmrLcl / highcap=serif lowcap=serif;
   yaxis type=discrete;
   xaxis label="SMR";
   refline 1 / axis=x transparency=0.5;
run;

Output 109.4.10: SMR Results

SMR Results


Alternatively, you can also use the following statements to obtain separate analyses for the two cancer causes, and then to display these standardized mortality ratios together in a table and in a plot:

/*----- Perform Separate Analyses for Different Causes ------*/
ods graphics on;
ods select StdInfo StrataSmrPlot Smr;
proc stdrate data=Florida_Cs refdata=US_Cs
             stat=rate
             method=indirect
             plots=smr
             ;
   population event=Event_C43 total=PYear;
   reference  event=Event_C43 total=PYear;
   strata Age;
ods output smr=Smr_c43;
run;





ods select StdInfo StrataSmrPlot Smr;
proc stdrate data=Florida_Cs refdata=US_Cs
             stat=rate
             method=indirect
             plots=smr
             ;
   population event=Event_C16 total=PYear;
   reference  event=Event_C16 total=PYear;
   strata Age;
ods output smr=Smr_c16;
run;

/*------------ Combine SMRs -----------*/
data Smr_C43;
   set Smr_C43;
   length Cause $ 7.;
   Cause='Skin';
run;

data Smr_C16;
   set Smr_C16;
   length Cause $ 7.;
   Cause='Stomach';
run;

data Smr_Cs;
   set Smr_C43 Smr_C16;
run;

/*------- Display the Cause-Specific SMRs --------*/
proc print data=Smr_Cs;
   var Cause ObservedEvents ExpectedEvents Smr SmrLcl SmrUcl;
run;

proc sgplot data=Smr_Cs;
   scatter y=Cause x=Smr / group=Cause;
   highlow y=Cause high=SmrUcl low=SmrLcl / highcap=serif lowcap=serif;
   yaxis type=discrete;
   xaxis label="SMR";
   refline 1 / axis=x transparency=0.5;
run;