The STDRATE Procedure

Example 109.3 Computing Attributable Fraction Estimates

(View the complete code for this example.)

This example computes the excess event risk fraction that is attributable to a specific chemical exposure for workers in a factory.

Suppose that the Factory data set contains the stratum-specific event information for exposure to a specific chemical agent. The variable Age is the grouping variable that forms the strata. The variables Event_E and Count_E indicate the number of events and number of workers for workers with the specific chemical exposure, respectively. The variables Event_NE and Count_NE indicate the number of events and number of workers for workers without the specific chemical exposure, respectively.

data Factory;
   input Age $ Event_E Count_E Event_NE Count_NE;
   datalines;
20-29   31  352  143  2626
30-39   57  486  392  4124
40-49   62  538  459  4662
50-59   50  455  337  3622
60-69   38  322  199  2155
70+      9   68   35   414
;

The following statements invoke the STDRATE procedure and compute the attributable risk and population attributable risk for the chemical exposure:

ods graphics on;
proc stdrate data=Factory
             refdata=Factory
             method=indirect(af)
             stat=risk
             plots(stratum=horizontal)
             ;
   population event=Event_E  total=Count_E;
   reference  event=Event_NE total=Count_NE;
   strata Age / stats;
run;

The "Standardization Information" table in Output 109.3.1 displays the standardization information.

Output 109.3.1: Standardization Information

The STDRATE Procedure

Standardization Information
Data SetWORK.FACTORY
Reference Data SetWORK.FACTORY
MethodIndirect Standardization
StatisticRisk
Number of Strata6


The STATS option in the STRATA statement requests that the "Indirectly Standardized Strata Statistics" table in Output 109.3.2 display the strata information and the expected number of events at each stratum. The Expected Events column shows the expected numbers of events when the stratum-specific risks in the reference data set are applied to the corresponding numbers of workers in the study data set.

Output 109.3.2: Strata Information (Indirect Standardization)

The STDRATE Procedure

Indirectly Standardized Strata Statistics
Stratum
Index
AgeStudy PopulationReference PopulationExpected
Events
Observed
Events
Number of ObservationsCrude RiskStandard
Error
 Number of ObservationsCrude
Risk
ValueProportion95% Normal Confidence
Limits
ValueProportion
120-29313520.15850.0880680.0151050.0584630.11767326260.14920.0544619.1683
230-39574860.21880.1172840.0145950.0886780.14589041240.23430.0950546.1959
340-49625380.24220.1152420.0137670.0882600.14222446620.26480.0984652.9691
450-59504550.20490.1098900.0146620.0811530.13862736220.20580.0930442.3343
560-69383220.14500.1180120.0179790.0827740.15325121550.12240.0923429.7346
670+9680.03060.1323530.0410950.0518090.2128974140.02350.084545.7488


With ODS Graphics enabled and the specified STAT=RISK option, the default PLOTS=RISK option displays the stratum-specific risk estimates in the study and reference populations, as shown in Output 109.3.3. The STRATUM=HORIZONTAL global option in the PLOTS option displays the strata information on the horizontal axis. The plot displays the stratum-specific risk estimates in the "Indirect Standardized Strata Statistics" table in Output 109.3.2. In addition, confidence limits for the risk estimates in the study population and the overall crude risks for the two populations are also displayed

Output 109.3.3: Strata Risk Plot

Strata Risk Plot


The METHOD=INDIRECT option requests that the "Standardized Morbidity/Mortality Ratio" table in Output 109.3.4 display the SMR, its confidence limits, and the test for the null hypothesis .

Output 109.3.4: Standardized Morbidity/Mortality Ratio

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


The "Standardized Morbidity/Mortality Ratio" table shows that SMR=1.259, the confidence limits do not contain the null value SMR=1, and the null hypothesis of SMR=1 is rejected at level from the normal test.

The "Indirectly Standardized Risk Estimates" table in Output 109.3.5 displays the standardized risks and related statistics.

Output 109.3.5: Standardized Risks (Indirect Standardization)

Indirectly Standardized Risk Estimates
Study PopulationReference
Crude
Risk
Expected
Events
SMRStandardized Risk
Observed
Events
Number of
Observations
Crude
Risk
EstimateStandard
Error
95% Normal Confidence
Limits
24722210.11120.0889196.1511.25920.11200.006710.09880.1251


The AF suboption in the METHOD=INDIRECT option requests that the "Attributable Fraction Estimates" table display the attributable risk and population attributable risk, as shown in Output 109.3.6

Output 109.3.6: Attributable Fraction Estimates

Attributable Fraction Estimates
ParameterEstimate95% Confidence Limits
Attributable Risk0.205870.100130.28937
Population Attributable Risk0.028060.011590.04426


The attributable risk fraction 0.206 indicates that of all events in the chemical exposure group are attributed to the chemical exposure, and the population attributable risk fraction 0.028 indicates that about of all events in the total population are attributed to the chemical exposure.

The Attributable fraction can also be computed by using Mantel-Haenszel method.

Suppose that the Factory1 data set contains the stratum-specific event information for exposure to a specific chemical agent. The variable Age is the grouping variable that forms the strata, and the variable Exposure identifies workers with chemical exposure. The variables Event and Count indicate the number of events and number of workers, respectively.

data Factory1;
   input Exposure $ Age $ Event Count;
   datalines;
Yes  20-29   31   352
Yes  30-39   57   486
Yes  40-49   62   538
Yes  50-59   50   455
Yes  60-69   38   322
Yes  70+      9    68
No   20-29  143  2626
No   30-39  392  4124
No   40-49  459  4662
No   50-59  337  3622
No   60-69  199  2155
No   70+     35   414
;

The following statements invoke the STDRATE procedure and compute the attributable risk and population attributable risk for the chemical exposure:

proc stdrate data=Factory1
             method=mh(af)
             stat=risk
             effect
             ;
   population group(order=data exposed='Yes')=Exposure
              event=Event total=Count;
   strata Age;
run;

The GROUP=EXPOSURE option specifies the variable Exposure, whose values identify the various populations. The ORDER= suboption specifies the order in which the values of Exposure are to be displayed, and the EXPOSED= option identifies the exposed group in the derivation of the attributable fraction.

The "Standardization Information" table in Output 109.3.7 displays the standardization information.

Output 109.3.7: Standardization Information

The STDRATE Procedure

Standardization Information
Data SetWORK.FACTORY1
Group VariableExposure
MethodMantel-Haenszel
StatisticRisk
Number of Strata6


The "Mantel-Haenszel Standardized Risk Estimates" table in Output 109.3.8 displays the Mantel-Haenszel standardized risks and related statistics.

Output 109.3.8: Standardized Risk Estimates (Mantel-Haenszel Estimation)

Mantel-Haenszel Standardized Risk Estimates
ExposureStudy PopulationMantel-HaenszelStandardized Risk
Observed
Events
Number of
Observations
Crude
Risk
Expected
Events
WeightEstimateStandard
Error
95% Normal Confidence
Limits
Yes24722210.1112219.1221970.260.11120.006670.09810.1243
No1565176030.0889174.1341970.260.08840.002140.08420.0926


The EFFECT option requests that the "Risk Effect Estimates" table display the risk ratio statistic for the two directly standardized risks, as shown in Output 109.3.9.

Output 109.3.9: Mantel-Haenszel Effect Estimates

Risk Effect Estimates
ExposureRisk
Ratio
 Log
Risk
Ratio
Standard
Error
ZPr > |Z|
Yes No 95% Lognormal Confidence
Limits
0.11120.08841.25841.108511.428450.22980.06473.550.0004


The AF suboption in the METHOD=MH option requests that the "Attributable Fraction Estimates" table display the attributable risk and population attributable risk, as shown in Output 109.3.10

Output 109.3.10: Attributable Fraction Estimates

Attributable Fraction Estimates
Exposed = Yes
ParameterEstimate95% Confidence Limits
Attributable Risk0.205310.097890.29994
Population Attributable Risk0.027990.010700.04497


Similar to the results of using the SMR estimates, the attributable risk fraction (0.205) indicates that of all events in the chemical exposure group are attributed to the chemical exposure, and the population attributable risk fraction (0.028) indicates that about of all events in the total population are attributed to the chemical exposure.