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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

662 GLM: Univariate<br />

A*B 0 0 0<br />

1/3 1/3 1/3<br />

-1/3 -1/3 -1/3<br />

/LMATRIX = “B1 vs B2 at A2”<br />

ALL 0<br />

0 0 0<br />

1 -1 0<br />

0 0 0 1 -1 0 0 0 0<br />

/DESIGN = A, B, A*B.<br />

Assume that factors A and B each have three levels. There are three LMATRIX subcommands;<br />

each is treated independently.<br />

• B1 versus B2 at A1. In the first LMATRIX subcommand, the difference is tested between levels<br />

1 and 2 of effect B when effect A is fixed at level 1. Since there are three levels each in effects<br />

A and B, the interaction effect A*B should take up nine columns in the design matrix. Notice<br />

that only the first two columns of A*B are specified with values 1 and –1; the rest are all<br />

assumed to be 0. Columns corresponding to effect B are all assumed to be 0.<br />

• Effect A. In the second LMATRIX subcommand, effect A is tested. Since there are three levels<br />

in effect A, at most two independent contrasts can be formed; thus, there are two rows in<br />

the L matrix, which are separated by a semicolon (;). The first row tests the difference<br />

between levels 1 and 3 of effect A, while the second row tests the difference between levels<br />

2 and 3 of effect A.<br />

• B1 versus B2 at A2. In the last LMATRIX subcommand, the keyword ALL is used. The first 0<br />

corresponds to the intercept effect; the next three zeros correspond to effect A.<br />

KMATRIX Subcommand<br />

The KMATRIX subcommand allows you to customize your hypothesis tests by specifying the<br />

K matrix (contrast results matrix) in the general form of the linear hypothesis LB = K. The<br />

vector B is the parameter vector in the linear model.<br />

• The default K matrix is a zero matrix; that is, LB = 0 is assumed.<br />

• For the KMATRIX subcommand to be valid, at least one of the following subcommands must<br />

be specified: the LMATRIX subcommand or the INTERCEPT = INCLUDE subcommand.<br />

• If KMATRIX is specified but LMATRIX is not specified, the LMATRIX is assumed to take the row<br />

vector corresponding to the intercept in the estimable function, provided the subcommand<br />

INTERCEPT = INCLUDE is specified. In this case, the K matrix can be only a scalar matrix.<br />

• If KMATRIX and LMATRIX are specified, then the number of rows in the requested K and<br />

L matrices must be equal. If there are multiple LMATRIX subcommands, then all requested<br />

L matrices must have the same number of rows, and K must have the same number of<br />

rows as these L matrices.<br />

• A semicolon (;) can be used to indicate the end of a row in the K matrix.<br />

• If more than one KMATRIX subcommand is specified, only the last one is in effect.

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

Saved successfully!

Ooh no, something went wrong!