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.

LOGLINEAR 821<br />

• To enter cell covariates into a model, the covariates must be specified on the DESIGN subcommand.<br />

• Cell covariates are not applied on a case-by-case basis. The mean covariate value for a<br />

cell in the contingency table is applied to that cell.<br />

Example<br />

LOGLINEAR DPREF(2,3) RACE CAMP (1,2) WITH CONSTANT<br />

/DESIGN=DPREF RACE CAMP CONSTANT.<br />

• Variable CONSTANT is a continuous variable specified as a cell covariate. Cell covariates<br />

must be specified after the keyword WITH following the variable list. No range is defined<br />

for cell covariates.<br />

• To include the cell covariate in the model, variable CONSTANT is specified on DESIGN.<br />

CWEIGHT Subcommand<br />

CWEIGHT specifies cell weights, such as structural zeros, for a model. By default, cell<br />

weights are equal to 1.<br />

• The specification is either one numeric variable or a matrix of weights enclosed in<br />

parentheses.<br />

• If a matrix of weights is specified, the matrix must contain the same number of elements<br />

as the product of the levels of the categorical variables. An asterisk can be used to signify<br />

repetitions of the same value.<br />

• If weights are specified for a multiple-factor model, the index value of the rightmost<br />

factor increments the most rapidly.<br />

• If a numeric variable is specified, only one CWEIGHT subcommand can be used on<br />

LOGLINEAR.<br />

• To use multiple cell weights on the same LOGLINEAR command, specify all weights in<br />

matrix format. Each matrix must be specified on a separate CWEIGHT subcommand, and<br />

each CWEIGHT specification remains in effect until explicitly overridden by another<br />

CWEIGHT subcommand.<br />

• CWEIGHT can be used to impose structural, or a priori, zeros on the model. This feature<br />

is useful in the analysis of symmetric tables.<br />

Example<br />

COMPUTE CWT=1.<br />

IF (HUSED EQ WIFED) CWT=0.<br />

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

/CWEIGHT=CWT<br />

/DESIGN=HUSED WIFED DISTANCE.<br />

• COMPUTE initially assigns CWT the value 1 for all cases.<br />

• IF assigns CWT the value 0 when HUSED equals WIFED.

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

Saved successfully!

Ooh no, something went wrong!