Shared Concepts and Topics

MARGINS Statement

This section applies to the following procedures: GLIMMIX and LOGISTIC.

The MARGINS statement computes predictive margins of fixed effects. You can compute predictive margins for any effect in the MODEL statement that involves only classification variables.

The predictive margin for a specific level (group) of a fixed effect represents the average predicted response if all the observations in the data set were in that group (Lane and Nelder 1982; Chang, Gelman, and Pagano 1982). You compute the predictive margin by fixing this effect at the specified level for all observations and averaging the predicted responses. The standard error of the predictive margin is computed by using the delta method.

For example, consider the model

g left parenthesis y Subscript i j Baseline right parenthesis equals alpha Subscript i Baseline plus beta x Subscript i j

where g is the link function; alpha Subscript i, i equals 1 comma ellipsis comma upper K, is the effect of the ith level of the classification effect alpha; and x Subscript i j is the covariate for the jth observation in the ith level of the effect alpha, j equals 1 comma ellipsis comma n Subscript i Baseline. Denote the number of observations in the ith level as n Subscript i, denote the frequency of the jth observation in the ith level as f Subscript i j and the total frequency as upper F equals sigma summation Underscript i equals 1 Overscript upper K Endscripts sigma summation Underscript j equals 1 Overscript n Subscript i Baseline Endscripts f Subscript i j, and denote the estimated model parameters at level k of effect alpha as left parenthesis ModifyingAbove alpha With caret Subscript k Baseline comma ModifyingAbove beta With caret right parenthesis. Then the predictive margin for level k of effect alpha is

StartFraction 1 Over upper F EndFraction sigma summation Underscript i equals 1 Overscript upper K Endscripts sigma summation Underscript j equals 1 Overscript n Subscript i Endscripts f Subscript i j Baseline g Superscript negative 1 Baseline left parenthesis ModifyingAbove alpha With caret Subscript k Baseline comma ModifyingAbove beta With caret x Subscript i j Baseline right parenthesis

Note that when the USEWEIGHT=TRUE option is in effect, f Subscript i j is the product of the frequency and weight of the observation.

By definition, predictive margins are covariate-adjusted marginal means, as are LS-means. These two approaches are discussed in the section Predictive Margins Compared with LS-Means.

Lane and Nelder (1982) and Chang, Gelman, and Pagano (1982) discuss how to use predictive margins to standardize predictions that are based on nonlinear regression models. Graubard and Korn (1999) show the computation of predictive margins in survey analysis.

Last updated: December 09, 2022