The GLM Procedure

Computational Method

Let bold upper X represent the n times p design matrix and bold upper Y the n times 1 vector of dependent variables. (See the section Parameterization of PROC GLM Models for information about how bold upper X is formed from your model specification.)

The normal equations bold upper X prime bold upper X bold-italic beta equals bold upper X prime bold upper Y are solved using a modified sweep routine that produces a generalized inverse left-parenthesis bold upper X prime bold upper X right-parenthesis Superscript minus and a solution bold b equals left-parenthesis bold upper X prime bold upper X right-parenthesis Superscript minus Baseline bold upper X prime bold y. The modification is that rows and columns corresponding to diagonal elements that are found during sweeping to be zero (or within the expected level of numerical error of zero) are zeroed out. The left-parenthesis bold upper X prime bold upper X right-parenthesis Superscript minus produced by this procedure satisfies the following two equations:

StartLayout 1st Row 1st Column left-parenthesis bold upper X prime bold upper X right-parenthesis left-parenthesis bold upper X prime bold upper X right-parenthesis Superscript minus Baseline left-parenthesis bold upper X prime bold upper X right-parenthesis 2nd Column equals 3rd Column left-parenthesis bold upper X prime bold upper X right-parenthesis 2nd Row 1st Column left-parenthesis bold upper X prime bold upper X right-parenthesis Superscript minus Baseline left-parenthesis bold upper X prime bold upper X right-parenthesis left-parenthesis bold upper X prime bold upper X right-parenthesis Superscript minus 2nd Column equals 3rd Column left-parenthesis bold upper X prime bold upper X right-parenthesis Superscript minus EndLayout

Pringle and Rayner (1971) call a generalized inverse with these characteristics a g 2-inverse, and this is the term usually used in SAS documentation and output. Urquhart (1968) uses the term reflexive g-inverse to emphasize that left-parenthesis bold upper X prime bold upper X right-parenthesis Superscript minus is a generalized inverse of bold upper X prime bold upper X in the same way that bold upper X prime bold upper X is a generalized inverse of left-parenthesis bold upper X prime bold upper X right-parenthesis Superscript minus. Note that a g 2-inverse is not necessarily unique: if bold upper X prime bold upper X is singular, then sweeping the matrix in a different order will result in a different g 2-inverse that also satisfies the two preceding equations.

For each effect in the model, a matrix bold upper L is computed such that the rows of bold upper L are estimable. Tests of the hypothesis bold upper L bold-italic beta equals 0 are then made by first computing

SS left-parenthesis bold upper L bold-italic beta equals 0 right-parenthesis equals left-parenthesis bold upper L bold b right-parenthesis prime left-parenthesis bold upper L left-parenthesis bold upper X prime bold upper X right-parenthesis Superscript minus Baseline bold upper L Superscript prime Baseline right-parenthesis Superscript negative 1 Baseline left-parenthesis bold upper L bold b right-parenthesis

and then computing the associated F value by using the mean squared error.

Last updated: December 09, 2022