27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Example<br />

GLM: Univariate 663<br />

GLM DEP BY A B<br />

/LMATRIX = “Effect A”<br />

A 1 0 -1; A 1 -1 0<br />

/LMATRIX = “Effect B”<br />

B 1 0 -1; B 1 -1 0<br />

/KMATRIX = 0; 0<br />

/DESIGN = A B.<br />

In this example, assume that factors A and B each have three levels.<br />

• There are two LMATRIX subcommands; both have two rows.<br />

• The first LMATRIX subcommand tests whether the effect of A is 0, while the second<br />

LMATRIX subcommand tests whether the effect of B is 0.<br />

• The KMATRIX subcommand specifies that the K matrix also has two rows, each with value 0.<br />

CONTRAST Subcommand<br />

CONTRAST specifies the type of contrast desired among the levels of a factor. For a factor with<br />

k levels or values, the contrast type determines the meaning of its k –<br />

1 degrees of freedom.<br />

• Specify the factor name in parentheses following the subcommand CONTRAST.<br />

• You can specify only one factor per CONTRAST subcommand, but you can enter multiple<br />

CONTRAST subcommands.<br />

• After closing the parentheses, enter an equals sign followed by one of the contrast keywords.<br />

• This subcommand creates an L matrix such that the columns corresponding to the factor<br />

match the contrast given. The other columns are adjusted so that the L matrix is estimable.<br />

The following contrast types are available:<br />

DEVIATION Deviations from the grand mean. This is the default for between-subjects<br />

factors. Each level of the factor except one is compared to the grand mean.<br />

One category (by default, the last) must be omitted so that the effects will be<br />

independent of one another. To omit a category other than the last, specify<br />

the number of the omitted category (which is not necessarily the same as its<br />

value) in parentheses after the keyword DEVIATION. For example,<br />

GLM Y BY B<br />

/CONTRAST(B)=DEVIATION(1).<br />

Suppose factor B has three levels, with values 2, 4, and 6. The specified contrast<br />

omits the first category, in which B has the value 2. Deviation contrasts<br />

are not orthogonal.<br />

POLYNOMIAL Polynomial contrasts. This is the default for within-subjects factors. The<br />

first degree of freedom contains the linear effect across the levels of the factor,<br />

the second contains the quadratic effect, and so on. In a balanced<br />

design, polynomial contrasts are orthogonal. By default, the levels are<br />

assumed to be equally spaced; you can specify unequal spacing by entering<br />

a metric consisting of one integer for each level of the factor in parentheses

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!