Estimating custom odds ratios in LOGISTIC, SURVEYLOGISTIC, GLIMMIX, GENMOD, or GEE


Because an odds ratio compares the odds of any two groups, the calculation depends on how the two groups are defined based on the logistic model. In general, the calculation involves determining the coefficients of the linear combinations (contrasts) of model parameters that define each of the groups, subtracting these contrasts to get the contrast that defines the group difference on the log odds scale, and then exponentiating the value of this contrast. This is illustrated in Examples of Writing CONTRAST and ESTIMATE Statements (see Example 3).

The LOGISTIC and SURVEYLOGISTIC procedures automatically provide odds ratio estimates (with confidence intervals) for main effects that are not involved in interactions. For an effect in the CLASS statement, they provide odds ratios by comparing each level with the reference level. For an effect that is not in the CLASS statement, they provide odds ratios by comparing levels one unit apart—that is, the change in odds for a unit increase in the predictor. In PROC LOGISTIC, the ODDSRATIO statement can be used to obtain odds ratio estimates for effects involved in interactions. See SAS Note 24455 for details.

In the GLIMMIX procedure, the ODDSRATIO option in the MODEL statement provides odds ratio estimates for categorical (CLASS) variables not involved in interactions and continuous variables.

The GEE and GENMOD procedures do not provide odds ratio estimates automatically. However, estimates can be obtained using the LSMEANS, LSMESTIMATE, SLICE, or ESTIMATE statement. These statements can also be used in the LOGISTIC, GLIMMIX, and SURVEYLOGISTIC procedures. SAS Note 24455 illustrates with examples using the LOGISTIC and GLIMMIX procedures. SAS Note 42728 provides an example of using these statements with a main effects GEE model in GENMOD.