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.

828 LOGLINEAR<br />

Example<br />

* Testing the linear effect of the dependent variable<br />

COMPUTE X=MONTH.<br />

LOGLINEAR MONTH (1,12) WITH X<br />

/DESIGN X.<br />

• The variable specification identifies MONTH as a categorical variable with values 1<br />

through 12. The keyword WITH identifies X as a covariate.<br />

• DESIGN tests the linear effect of MONTH.<br />

Example<br />

* Specifying main effects models<br />

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

/DESIGN=A<br />

/DESIGN=A,B.<br />

• The first design tests the homogeneity of category probabilities for B; it fits the marginal<br />

frequencies on A, but assumes that membership in any of the categories of B is equiprobable.<br />

• The second design tests the independence of A and B. It fits the marginals on both A and B.<br />

Example<br />

* Specifying interactions<br />

LOGLINEAR A(1,4) B(1,5) C(1,3)<br />

/DESIGN=A,B,C, A BY B.<br />

• This design consists of the A main effect, the B main effect, the C main effect, and the<br />

interaction of A and B.<br />

Example<br />

* Single-degree-of-freedom partitions<br />

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

/CONTRAST(B)=POLYNOMIAL<br />

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

• The value 1 following B refers to the first partition of B, which is the linear effect of B;<br />

this follows from the contrast specified on the CONTRAST subcommand.<br />

Example<br />

* Specifying cell covariates<br />

LOGLINEAR HUSED WIFED(1,4) WITH DISTANCE<br />

/DESIGN=HUSED WIFED DISTANCE.<br />

• The continuous variable DISTANCE is identified as a cell covariate by specifying it after<br />

WITH on the variable list. The cell covariate is then included in the model by naming it on<br />

DESIGN.

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

Saved successfully!

Ooh no, something went wrong!