The SURVEYPHREG Procedure

HAZARDRATIO Statement

  • HAZARDRATIO <'label'> variable </ options>;

The HAZARDRATIO statement enables you to request hazard ratios for any variable in the model at customized settings. For example, if the model contains the interaction of a CLASS variable A and a continuous variable X, the following specification displays a table of hazard ratios that compares the hazards of each pair of levels of A at X=3:

    hazardratio A / at (X=3);

The HAZARDRATIO statement identifies the variable whose hazard ratios are to be evaluated. If the variable is a continuous variable, the hazard ratio compares the hazards for a specified change (by default, an increase of 1 unit) in the variable. For a CLASS variable, a hazard ratio compares the hazards of two levels of the variable. You can specify more than one HAZARDRATIO statement, and an optional label (specified as a quoted string) helps identify the output.

Table 4 summarizes the options available in the HAZARDRATIO statement.

Table 4: HAZARDRATIO Statement Options

Option Description
ALPHA= Specifies the alpha level
AT Specifies the variables that interact with the variable of interest
DIFF= Specifies which differences to compute
E Displays the coefficients for the log-hazard ratio
UNITS= Specifies the units of change


You can specify the following options in the HAZARDRATIO statement:

ALPHA=number

specifies the alpha level of the interval estimates for the hazard ratios, where number must be between 0 and 1. The default is the value of the ALPHA= option in the PROC SURVEYPHREG statement, or 0.05 if that option is not specified.

AT (variable=ALL | REF | list <…variable=ALL | REF | list> )

specifies the variables that interact with the variable of interest and the corresponding values of the interacting variables. If the interacting variable is continuous and a numeric list is specified after the equal sign, hazard ratios are computed for each value in the list. If the interacting variable is a CLASS variable, you can specify, after the equal sign, a list of quoted strings that correspond to various levels of the CLASS variable, or you can specify the keyword ALL or REF. Hazard ratios are computed at each value of the list if a list is specified, or at each level of the interacting variable if ALL is specified, or at the reference level of the interacting variable if REF is specified.

If this option is not specified, PROC SURVEYPHREG finds all the variables that interact with the variable of interest. If an interacting variable is a CLASS variable, variable=ALL is the default; if the interacting variable is continuous, variable=m is the default, where m is the weighted average of the observed values of the continuous variable.

Suppose the model contains two interactions: an interaction A*B of CLASS variables A and B, and another interaction A*X of A with a continuous variable X. If 3.5 is the weighted average of the values of X, the following two HAZARDRATIO statements are equivalent:

hazardratio A;
hazardratio A / at (B=ALL X=3.5);
DIFF=diff-request

specifies which differences to consider for the level comparisons of a CLASS variable. This option is ignored in the estimation of hazard ratios for a continuous variable. You can specify the following diff-requests:

DISTINCT
DISTINCTPAIRS

requests all comparisons of only the distinct combinations of pairs.

PAIRWISE

requests all possible pairwise comparisons of levels.

REFERENCE
REF

requests comparisons between the reference level and all other levels of the CLASS variable.

For example, let A be a CLASS variable that has three levels (A1, A2, and A3), where A3 is specified as the reference level. The following table depicts the hazard ratios that are displayed for the three alternatives of the DIFF= option.

Hazard Ratios Displayed
DIFF=option A1 vs A2 A2 vs A1 A1 vs A3 A3 vs A1 A2 vs A3 A3 vs A2
DISTINCT square-root square-root square-root
PAIRWISE square-root square-root square-root square-root square-root square-root
REF square-root square-root

By default, DIFF=DISTINCT.

E

displays the vector bold l of linear coefficients such that bold l prime bold-italic beta is the log-hazard ratio, where bold-italic beta is the vector of regression coefficients.

UNITS=value

specifies the units of change in the continuous explanatory variable for which the customized hazard ratio is estimated. This option is ignored in the computation of the hazard ratios for a CLASS variable. By default, UNITS=1.

Last updated: December 09, 2022