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.

824 LOGLINEAR<br />

[BASIS]SPECIAL(matrix) User-defined contrast. As many elements as the number of categories<br />

squared must be specified. If BASIS is specified before SPECIAL,<br />

a basis matrix is generated for the special contrast, which makes the<br />

coefficients of the contrast equal to the special matrix. Otherwise,<br />

the matrix specified is transposed and then used as the basis matrix<br />

to determine coefficients for the contrast matrix.<br />

Example<br />

LOGLINEAR A(1,4) BY B(1,4)<br />

/CONTRAST(B)=POLYNOMIAL<br />

/DESIGN=A A BY B(1)<br />

/CONTRAST(B)=SIMPLE<br />

/DESIGN=A A BY B(1).<br />

• The first CONTRAST subcommand requests polynomial contrasts of B for the first design.<br />

• The second CONTRAST subcommand requests the simple contrast of B, with the last category<br />

(value 4) used as the reference category for the second DESIGN subcommand.<br />

Example<br />

* Multinomial logit model<br />

LOGLINEAR PREF(1,5) BY RACE ORIGIN CAMP(1,2)<br />

/CONTRAST(PREF)=SPECIAL(5*1, 1 1 1 1 -4, 3 -1 -1 -1 0,<br />

0 1 1 -2 0, 0 1 -1 0 0).<br />

• LOGLINEAR builds special contrasts among the five categories of the dependent variable<br />

PREF, which measures preference for training camps among Army recruits. For PREF,<br />

1=stay, 2=move to north, 3=move to south, 4=move to unnamed camp, and 5=undecided.<br />

• The four contrasts are: (1) move or stay versus undecided, (2) stay versus move, (3)<br />

named camp versus unnamed, and (4) northern camp versus southern. Because these contrasts<br />

are orthogonal, SPECIAL and BASIS SPECIAL produce equivalent results.<br />

Example<br />

* Contrasts for a linear logit model<br />

LOGLINEAR RESPONSE(1,2) BY YEAR(0,20)<br />

/PRINT=DEFAULT ESTIM<br />

/CONTRAST(YEAR)=SPECIAL(21*1, -10, -9, -8, -7, -6, -5, -4,<br />

-3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7,<br />

8, 9, 10, 399*1)<br />

/DESIGN=RESPONSE RESPONSE BY YEAR(1).<br />

• YEAR measures years of education and ranges from 0 through 20. Therefore, allowing for<br />

the constant effect, YEAR has 20 estimable parameters associated with it.<br />

• The SPECIAL contrast specifies the constant—that is, 21*1—and the linear effect of<br />

YEAR—that is, –10 to 10. The other 399 1’s fill out the 21*21 matrix.

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

Saved successfully!

Ooh no, something went wrong!