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.

822 LOGLINEAR<br />

• CWEIGHT imposes structural zeros on the diagonal of the symmetric crosstabulation.<br />

Because a variable name is specified, only one CWEIGHT can be used.<br />

Example<br />

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

/CWEIGHT=(0, 4*1, 0, 4*1, 0, 4*1, 0)<br />

/DESIGN=HUSED WIFED DISTANCE<br />

/CWEIGHT=(16*1)<br />

/DESIGN=HUSED WIFED DISTANCE.<br />

• The first CWEIGHT matrix specifies the same values as variable CWT provided in the first<br />

example. The specified matrix is as follows:<br />

0 1 1 1<br />

1 0 1 1<br />

1 1 0 1<br />

1 1 1 0<br />

• The same matrix can be specified in full as (0 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0).<br />

• By using the matrix format on CWEIGHT rather than a variable name, a different<br />

CWEIGHT subcommand can be used for the second model.<br />

GRESID Subcommand<br />

GRESID (Generalized Residual) calculates linear combinations of observed cell frequencies,<br />

expected cell frequencies, and adjusted residuals.<br />

• The specification is either a numeric variable or a matrix whose contents are coefficients<br />

of the desired linear combinations.<br />

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

as the number of cells implied by the variables specification. An asterisk can be<br />

used to signify repetitions of the same value.<br />

• Each GRESID subcommand specifies a single linear combination. Each matrix or variable<br />

must be specified on a separate GRESID subcommand. All GRESID subcommands specified<br />

are displayed for each design.<br />

Example<br />

LOGLINEAR MONTH(1,18) WITH Z<br />

/GRESID=(6*1,12*0)<br />

/GRESID=(6*0,6*1,6*0)<br />

/GRESID=(12*0,6*1)<br />

/DESIGN=Z.<br />

• The first GRESID subcommand combines the first six months into a single effect. The<br />

second GRESID subcommand combines the second six months, and the third GRESID subcommand<br />

combines the last six months.<br />

• For each effect, LOGLINEAR displays the observed and expected counts, the residual, and<br />

the adjusted residual.

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

Saved successfully!

Ooh no, something went wrong!