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.

384 CTABLES<br />

specifications are equivalent:<br />

/TABLE SEX [COUNT] + HAPPY [COUNT, COLPCT]<br />

/TABLE (SEX + HAPPY [COLPCT])[COUNT]<br />

• The brackets are required even if only one summary is specified.<br />

• Commas are optional.<br />

• Label and format are both optional; defaults are used if they are not specified.<br />

• If totals or subtotals are defined for a variable (on the CATEGORIES subcommand), by<br />

default, the same functions specified for the variable are used for the totals. You can use<br />

the keyword TOTALS within the summary specification to specify different summary<br />

functions for the totals and subtotals. The specification then has the form<br />

[summary ‘label’ format ... TOTALS [summary ‘label’ format...]].<br />

You must still specify TOTAL=YES on the CATEGORIES subcommand to see the totals.<br />

• Summaries that are available for category variables are also available for scale variables<br />

and multiple response sets. Functions specific to scale variables and to multiple response<br />

sets are also available.<br />

• If case weighting is in effect, summaries are calculated taking into account the current<br />

WEIGHT value. To obtain unweighted summaries, prefix a U to the function name, as in<br />

UCOUNT. Unweighted functions are not available where weighting would not apply, as<br />

in the MINIMUM and MAXIMUM functions.<br />

Example<br />

CTABLES /TABLE SEX > HAPMAR [COLPCT] 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 />

Number of children (grouped categories)<br />

None 1-2<br />

3-4 5 or more<br />

Column % Column % Column % Column %<br />

63.2% 64.9% 62.2% 71.4%<br />

32.9% 33.0% 35.4% 26.2%<br />

3.9% 2.1% 2.4% 2.4%<br />

69.2% 63.9% 61.6% 57.6%<br />

28.6% 33.2% 35.5% 33.3%<br />

2.2% 2.9% 2.8% 9.1%<br />

Example<br />

CTABLES /TABLE AGECAT > TVHOURS [MEAN F5.2,<br />

STDDEV 'Standard Deviation' F5.2, PTILE 90 '90th Percentile'].<br />

Age<br />

category<br />

Less than 25<br />

25 to 34<br />

35 to 44<br />

45 to 54<br />

55 to 64<br />

65 or older<br />

Hours per day watching TV<br />

Hours per day watching TV<br />

Hours per day watching TV<br />

Hours per day watching TV<br />

Hours per day watching TV<br />

Hours per day watching TV<br />

Mean<br />

Standard<br />

Deviation 90th Percentile<br />

2.85 2.03 5<br />

2.78 2.37 5<br />

2.56 2.11 5<br />

2.58 1.97 5<br />

3.02 2.22 6<br />

3.58 2.50 6

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

Saved successfully!

Ooh no, something went wrong!