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.

Scale Variables<br />

CTABLES 383<br />

Scale variables, such as age in years or population of towns, do not define multiple cells<br />

within a table. The table expression /TABLE AGE creates a table with one cell containing the<br />

mean of AGE across all cases in the data. You can use nesting and/or dimensions to display<br />

summary statistics for scale variables within categories. The nature of scale variables<br />

prevents their being arranged hierarchically. Therefore:<br />

• A scale variable cannot be nested under another scale variable.<br />

• Scale variables can be used in only one dimension.<br />

Example<br />

CTABLES /TABLE AGE > HAPPY BY SEX.<br />

Age of<br />

respondent<br />

General<br />

happiness<br />

Specifying Summaries<br />

Very happy<br />

Pretty happy<br />

Not too happy<br />

Gender<br />

Male Female<br />

Mean Mean<br />

47 47<br />

44 45<br />

43 47<br />

You can specify one or more summary functions for variables in any one dimension. For<br />

category variables, summaries can be specified only for the variables at the lowest nesting<br />

level. Thus, in the table expression<br />

/TABLE SEX > (HAPPY + HAPMAR) BY AGECAT<br />

you can assign summaries to HAPPY and HAPMAR or to AGECAT, but not to both and not to<br />

SEX.<br />

If a scale variable appears in a dimension, that becomes the statistics dimension, and all<br />

statistics must be specified for that dimension. A scale variable need not be at the lowest level<br />

of nesting. Thus, the following is a valid specification:<br />

CTABLES /TABLE AGE [MINIMUM, MAXIMUM, MEAN] > SEX > HAPPY.<br />

A multiple response variable also need not be at the lowest level of nesting. The following is<br />

a valid specification:<br />

CTABLES /TABLE $MLTCARS [COUNT, RESPONSES] > SEX.<br />

However, if two multiple response variables are nested, as in $MULTCARS > $MULTNEWS,<br />

summaries can be requested only for the one at the innermost nesting level (in this case,<br />

$MULTNEWS).<br />

The general form for a summary specification is<br />

[summary ’label’ format, ..., summary ’label’ format]<br />

• The specification follows the variable name in the table expression. You can apply a summary<br />

specification to multiple variables by enclosing them in parentheses. The following

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

Saved successfully!

Ooh no, something went wrong!