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.

382 CTABLES<br />

• The output contains two tables: one for general happiness by number of children and one<br />

for happiness in marriage by number of children. Except for missing values, all of the<br />

cases in the data appear in both tables.<br />

Nesting variables creates hierarchical tables.<br />

Example<br />

CTABLES /TABLE SEX > HAPMAR BY CHILDCAT.<br />

Gender<br />

Male<br />

Female<br />

Happiness<br />

of marriage<br />

Happiness<br />

of marriage<br />

Very happy<br />

Pretty happy<br />

Not too happy<br />

Very happy<br />

Pretty happy<br />

Not too happy<br />

• The output contains one table with a subtable for each value of SEX. The same subtables<br />

would result from the table expression HAPMAR BY CHILDCAT BY SEX, but the subtables<br />

would appear in separate layers.<br />

Stacking and nesting can be combined. When they are, by default, nesting takes precedence<br />

over stacking. You can use parentheses to alter the order of operations.<br />

Example<br />

CTABLES /TABLE (HAPPY + HAPMAR) > SEX.<br />

General<br />

happiness<br />

Happiness<br />

of marriage<br />

Very happy<br />

Pretty happy<br />

Not too<br />

happy<br />

Very happy<br />

Pretty happy<br />

Not too<br />

happy<br />

Gender<br />

Gender<br />

Gender<br />

Gender<br />

Gender<br />

Gender<br />

Male<br />

Female<br />

Male<br />

Female<br />

Male<br />

Female<br />

Male<br />

Female<br />

Male<br />

Female<br />

Male<br />

Female<br />

Number of children (grouped categories)<br />

None 1-2<br />

3-4 5 or more<br />

Count Count Count Count<br />

48 216 102 30<br />

25 110 58 11<br />

3 7 4 1<br />

63 246 130 19<br />

26 128 75 11<br />

2 11 6 3<br />

Count<br />

373<br />

518<br />

712<br />

863<br />

133<br />

207<br />

396<br />

459<br />

205<br />

240<br />

15<br />

22<br />

• The output contains two tables. Without the parentheses, the first table, for general happiness,<br />

would not have separate rows for male and female.

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

Saved successfully!

Ooh no, something went wrong!