Overview (GLM: Univariate command)

This section describes the use of GLM for univariate analyses. However, most of the subcommands that are described here can be used in any type of analysis with GLM. For additional subcommands that are used in multivariate analysis, see GLM: Multivariate. For additional subcommands that are used in repeated measures analysis, see GLM: Repeated Measures. For basic specification, syntax rules, and limitations of the GLM procedures, see GLM.

Options

Design specification
You can use the DESIGN subcommand to specify which terms to include in the design. This allows you to estimate a model other than the default full factorial model, incorporate factor-by-covariate interactions or covariate-by-covariate interactions, and indicate nesting of effects.
Contrast types
You can specify contrasts on the CONTRAST subcommand.
Optional output
You can choose from a variety of optional output on the PRINT subcommand. Output that is appropriate to univariate designs includes descriptive statistics for each cell, parameter estimates, Levene tests for equality of variance across cells, tests for heteroskedasticity, partial eta-squared for each effect and each parameter estimate, the general estimable function(s) matrix, and a contrast coefficients table (L' matrix). The OUTFILE subcommand allows you to write out the covariance or correlation matrix, the design matrix, or the statistics from the between-subjects ANOVA table into a separate data file.

Using the EMMEANS subcommand, you can request tables of estimated marginal means of the dependent variable and their standard deviations. The SAVE subcommand allows you to save predicted values and residuals in weighted or unweighted and standardized or unstandardized forms. You can use the POSTHOC subcommand to specify different means comparison tests for comparing all possible pairs of cell means. In addition, you can specify your own hypothesis tests by specifying an L matrix and a K matrix to test the univariate hypothesis LB = K.

You can display robust or heteroskedasticity-consistent (HC) standard errors by using the ROBUST subcommand, and you can write the robust covariance matrix estimates to a new file or dataset. You can also display a second set of output for custom hypothesis tests, with results based on the specified robust covariance matrix estimator.

Basic specification

  • The basic specification is a variable list identifying the dependent variable, the factors (if any), and the covariates (if any).
  • By default, GLM uses a model that includes the intercept term, the covariate (if any), and the full factorial model, which includes all main effects and all possible interactions among factors. The intercept term is excluded if it is excluded in the model by specifying the keyword EXCLUDE on the INTERCEPT subcommand. Sums of squares are calculated and hypothesis tests are performed by using type-specific estimable functions. Parameters are estimated by using the normal equation and a generalized inverse of the SSCP matrix.

Subcommand order

  • The variable list must be specified first.
  • Subcommands can be used in any order.

Syntax rules

  • For many analyses, the GLM variable list and the DESIGN subcommand are the only specifications that are needed.
  • If you do not enter a DESIGN subcommand, GLM uses a full factorial model, with main effects of covariates, if any.
  • At least one dependent variable must be specified, and at least one of the following specifications must occur: INTERCEPT, a between-subjects factor, or a covariate. The design contains the intercept by default.
  • If more than one DESIGN subcommand is specified, only the last subcommand is in effect.
  • Dependent variables and covariates must be numeric, but factors can be numeric or string variables.
  • If more than one MISSING subcommand is specified, only the last subcommand is in effect.
  • If more than one ROBUST subcommand is specified, only the last one is in effect.
  • The following words are reserved as keywords or internal commands in the GLM procedure:

INTERCEPT, BY, WITH, ALL, OVERALL, WITHIN

Variable names that duplicate these words should be changed before you run GLM.

Limitations

  • Any number of factors can be specified, but if the number of between-subjects factors plus the number of split variables exceeds 18, the Descriptive Statistics table is not printed even when you request it.
  • Memory requirements depend primarily on the number of cells in the design. For the default full factorial model, this equals the product of the number of levels or categories in each factor.