EMMEANS Subcommand (GENLIN command)

The EMMEANS subcommand displays estimated marginal means of the dependent variable for all level combinations of a set of factors. Note that these are predicted, not observed, means. Estimated marginal means can be computed based on the original scale of the dependent variable or the based on the link function transformation.

TABLES Keyword

The TABLES keyword specifies the cells for which estimated marginal means are displayed.

CONTROL Keyword

The CONTROL keyword specifies the covariate values to use when computing the estimated marginal means.

The SCALE keyword specifies whether to compute estimated marginal means based on the original scale of the dependent variable or based on the link function transformation.

ORIGINAL. Estimated marginal means are based on the original scale of the dependent variable. Estimated marginal means are computed for the response. This is the default.Note that when the dependent variable is specified using the events/trials option, ORIGINAL gives the estimated marginal means for the events/trials proportion rather than for the number of events.

TRANSFORMED. Estimated marginal means are based on the link function transformation. Estimated marginal means are computed for the linear predictor.

Example

The following syntax specifies a logistic regression model with binary dependent variable Y and categorical predictor A. Estimated marginal means are requested for each level of A. Because SCALE = ORIGINAL is used, the estimated marginal means are based on the original response. Thus, the estimated marginal means are real numbers between 0 and 1. If SCALE = TRANSFORMED had been used instead, then the estimated marginal means would be based on the logit-transformed response and would be real numbers between negative and positive infinity.

GENLIN y BY a
  /MODEL a
    DISTRIBUTION=BINOMIAL
    LINK=LOGIT
  /EMMEANS TABLES=a SCALE=ORIGINAL.

COMPARE Keyword

The COMPARE keyword specifies a factor or a set of crossed factors, the levels or level combinations of which are compared using the contrast type specified on the CONTRAST keyword.

CONTRAST Keyword

The CONTRAST keyword specifies the type of contrast to use for the levels of the factor, or level combinations of the crossed factors, on the COMPARE keyword. The CONTRAST keyword creates an L matrix (that is, a coefficient matrix) such that the columns corresponding to the factor(s) match the contrast given. The other columns are adjusted so that the L matrix is estimable.

The following contrast types are available.

PAIRWISE. Pairwise comparisons are computed for all level combinations of the specified or implied factors. This is the default contrast type.

For example,

GENLIN y BY a b c
  …
  /EMMEANS TABLES=a*b*c COMPARE a*b CONTRAST=PAIRWISE.

The specified contrast performs pairwise comparisons of all level combinations of factors A and B, for each level of factor C.

Pairwise contrasts are not orthogonal.

DEVIATION (value). Each level of the factor is compared to the grand mean. Deviation contrasts are not orthogonal.

DIFFERENCE. Each level of the factor except the first is compared to the mean of previous levels. In a balanced design, difference contrasts are orthogonal.

HELMERT. Each level of the factor except the last is compared to the mean of subsequent levels. In a balanced design, Helmert contrasts are orthogonal.

POLYNOMIAL (number list). Polynomial contrasts. The first degree of freedom contains the linear effect across the levels of the factor, the second contains the quadratic effect, and so on. By default, the levels are assumed to be equally spaced; the default metric is (1 2 . . . k), where k levels are involved.The POLYNOMIAL keyword may be followed optionally by parentheses containing a number list. Numbers in the list must be separated by spaces or commas. Unequal spacing may be specified by entering a metric consisting of one number for each level of the factor. Only the relative differences between the terms of the metric matter. Thus, for example, (1 2 4) is the same metric as (2 3 5) or (20 30 50) because, in each instance, the difference between the second and third numbers is twice the difference between the first and second. All numbers in the metric must be unique; thus, (1 1 2) is not valid.

A user-specified metric must supply at least as many numbers as there are levels of the compared factor. If too few numbers are specified, then a warning is issued and hypothesis tests are not performed. If too many numbers are specified, then a warning is issued but hypothesis tests are still performed. In the latter case, the contrast is created based on the specified numbers beginning with the first and using as many numbers as there are levels of the compared factor. In any event, we recommend printing the L matrix (/PRINT LMATRIX) to confirm that the proper contrast is being constructed.

For example,

GENLIN y BY a
  …
  /EMMEANS TABLES=a CONTRAST=POLYNOMIAL(1 2 4).

Suppose that factor A has three levels. The specified contrast indicates that the three levels of A are actually in the proportion 1:2:4.

Alternatively, suppose that factor A has two levels. In this case, the specified contrast indicates that the two levels of A are in the proportion 1:2.

In a balanced design, polynomial contrasts are orthogonal.

REPEATED. Each level of the factor except the last is compared to the next level. Repeated contrasts are not orthogonal.

SIMPLE (value). Each level of the factor except the last is compared to the last level. The SIMPLE keyword may be followed optionally by parentheses containing a value. Put the value inside a pair of quotes if it is formatted (such as date or currency) or if the factor is of string type. If a value is specified, then the factor level with that value is used as the omitted reference category. If the specified value does not exist in the data, then a warning is issued and the last level is used.

For example,

GENLIN y BY a
  …
  /EMMEANS TABLES=a CONTRAST=SIMPLE(1).

The specified contrast compares all levels of factor A (except level 1) to level 1.

Simple contrasts are not orthogonal.

PADJUST Keyword

The PADJUST keyword indicates the method of adjusting the significance level.

LSD. Least significant difference. This method does not control the overall probability of rejecting the hypotheses that some linear contrasts are different from the null hypothesis value(s). This is the default.

BONFERRONI. Bonferroni. This method adjusts the observed significance level for the fact that multiple contrasts are being tested.

SEQBONFERRONI. Sequential Bonferroni. This is a sequentially step-down rejective Bonferroni procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.

SIDAK. Sidak. This method provides tighter bounds than the Bonferroni approach.

SEQSIDAK. Sequential Sidak. This is a sequentially step-down rejective Sidak procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.