The STDRATE Procedure

Example 109.2 Computing Mantel-Haenszel Risk Estimation

(View the complete code for this example.)

This example uses Mantel-Haenszel method to estimate the effect of household smoking on respiratory symptoms of school children, after adjusting for the effects of the student’s grade and household pets.

Suppose that the School data set contains the stratum-specific numbers of cases of respiratory symptoms in a given school year for a school district. Variables Pet and Grade are the grouping variables that form the strata in the standardization, and the variable Smoking identifies students who have smokers in their households. The variables Case and Student indicate the number of cases with respiratory symptoms and the total number of students, respectively.

data School;
   input Smoking $ Pet $ Grade $ Case Student;
   datalines;
Yes   Yes   K-1   109    807
Yes   Yes   2-3   106    791
Yes   Yes   4-5   112    868
Yes   No    K-1   168   1329
Yes   No    2-3   162   1337
Yes   No    4-5   183   1594
No    Yes   K-1   284   2403
No    Yes   2-3   266   2237
No    Yes   4-5   273   2279
No    No    K-1   414   3398
No    No    2-3   372   3251
No    No    4-5   382   3270
;

The following statements invoke the STDRATE procedure and compute the Mantel-Haenszel rate difference statistic between students with household smokers and students without household smokers:

ods graphics on;
proc stdrate data=School
             method=mh
             stat=risk
             effect=diff
             plots=all
             ;
   population group=Smoking event=Case total=Student;
   strata Pet Grade / order=data stats(cl=none) effect;
run;

The ORDER=DATA option in the STRATA statement sorts the strata by the order of appearance in the input data set.

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

Output 109.2.1: Standardization Information

The STDRATE Procedure

Standardization Information
Data SetWORK.SCHOOL
Group VariableSmoking
MethodMantel-Haenszel
StatisticRisk
Number of Strata6


The STATS option in the STRATA statement requests that the STDRATE procedure display a "Mantel-Haenszel Standardized Strata Statistics" table for study populations, as shown in Output 109.2.2. The table displays the strata information and the expected number of events in each stratum. The Expected Events column shows the expected number of events when the Mantel-Haenszel weights are applied to the corresponding stratum-specific risks in the study populations. The CL=NONE suboption requests that confidence limits for strata risks not be displayed.

Output 109.2.2: Mantel-Haenszel Standardized Strata Statistics

The STDRATE Procedure

Mantel-Haenszel Standardized Strata Statistics
SmokingStratum
Index
PetGradeStudy Population 
Observed
Events
Number of ObservationsCrude RiskMantel-Haenszel
ValueProportionWeightExpected
Events
No1YesK-128424030.14270.118186604.1271.398
No2Yes2-326622370.13290.118909584.3769.487
No3Yes4-527322790.13530.119789628.5975.298
No4NoK-141433980.20180.121836955.35116.396
No5No2-337232510.19310.114426947.38108.405
No6No4-538232700.19420.1168201071.62125.187
Yes1YesK-11098070.12000.135068604.1281.597
Yes2Yes2-31067910.11760.134008584.3778.310
Yes3Yes4-51128680.12910.129032628.5981.108
Yes4NoK-116813290.19760.126411955.35120.767
Yes5No2-316213370.19880.121167947.38114.791
Yes6No4-518315940.23700.1148061071.62123.028


With ODS Graphics enabled, the PLOTS=ALL option displays all appropriate plots. With the METHOD=MH and STAT=RISK options, these plots include the strata distribution plot, strata risk plot, and strata effect plot.

The strata distribution plot displays proportions for stratum-specific numbers of students in the study populations, as shown in Output 109.2.3.

Output 109.2.3: Strata Distribution Plot

Strata Distribution Plot


The strata risk plot displays stratum-specific risk estimates with confidence limits in the study populations, as shown in Output 109.2.4. This plot displays stratum-specific risk estimates in the "Mantel-Haenszel Standardized Strata Statistics" table in Output 109.2.2. In addition, the overall crude risks for the two study populations are also displayed. By default, strata levels are displayed on the vertical axis.

Output 109.2.4: Strata Risk Plot

Strata Risk Plot


The EFFECT option in the STRATA statement requests that the "Strata Risk Effect Estimates" table be displayed, as shown in Output 109.2.5. The EFFECT=DIFF option in the PROC STDRATE statement requests that strata risk differences be displayed.

Output 109.2.5: Strata Effect Estimates

Strata Risk Effect Estimates
Stratum
Index
PetGradeSmokingRisk
Difference
Standard
Error
 
No Yes 95% Normal Confidence
Limits
1YesK-10.118190.13507-.0168830.013716-.0437660.010001
2Yes2-30.118910.13401-.0150980.013912-.0423660.012169
3Yes4-50.119790.12903-.0092430.013257-.0352250.016740
4NoK-10.121840.12641-.0045740.010704-.0255540.016405
5No2-30.114430.12117-.0067400.010527-.0273730.013892
6No4-50.116820.114810.0020140.009762-.0171200.021148


The "Strata Risk Effect Estimates" table shows that for the stratum of students without household pets in Grade 4–5, the risk is higher for students without household smokers than for students with household smokers. For all other strata, the risk is lower for students without household smokers than for students with household smokers. The difference is not significant in each stratum because the null value 0 is between the lower and upper confidence limits.

With ODS Graphics enabled, the PLOTS=EFFECT option displays the plot with the stratum-specific risk effect measures and their associated confidence limits, as shown in Output 109.2.6. The EFFECT=DIFF option requests that the risk difference be displayed. By default, confidence limits are generated with confidence level. This plot displays the stratum-specific risk differences in the "Strata Risk Effect Estimates" table in Output 109.2.5.

Output 109.2.6: Strata Risk Plot

Strata Risk Plot


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

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

Mantel-Haenszel Standardized Risk Estimates
SmokingStudy PopulationMantel-HaenszelStandardized Risk
Observed
Events
Number of
Observations
Crude
Risk
Expected
Events
WeightEstimateStandard
Error
95% Normal Confidence
Limits
No1991168380.1182566.1724791.430.11820.002500.11330.1231
Yes84067260.1249599.6024791.430.12510.004040.11720.1331


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

Output 109.2.8: Mantel-Haenszel Effect Estimates

Risk Effect Estimates
SmokingRisk
Difference
 Standard
Error
ZPr > |Z|
No Yes 95% Normal Confidence
Limits
0.11820.1251-0.00698-.0162840.0023300.00475-1.470.1418


The table shows that although the standardized risk for students without household smokes is lower than the standardized risk for students with household smokes, the difference (–0.00698) is not significant at the significance level, (p-value 0.1418).