Examples (CTABLES command)
Example: Column Percentages
CTABLES /TABLE POLVIEWS [COLPCT] BY AGECAT.

- POLVIEWS defines
the rows, and AGECAT defines the
columns. Column percentages are requested, overriding the default
COUNT
function.
Example: Using a Multiple Response Set
CTABLES /TABLE $MLTNEWS [COUNT COLPCT] BY SEX
/SLABELS VISIBLE=NO
/CATEGORIES VARIABLES=SEX TOTAL=YES.

- $MLTNEWS is a multiple response set.
- The
COLPCT
function uses the number of respondents as the percentage base, so each cell shows the percentage of males or females who gave each response, and the sum of percentage for each column is greater than 100. - Summary labels are hidden.
- The
CATEGORIES
subcommand creates a total for both sexes.
Example: Concatenation
CTABLES /TABLE (CONFINAN + CONBUS + CONBUS + CONEDUC
+ CONPRESS + CONMEDIC)[COUNT ROWPCT]
/CLABELS ROWLABELS=OPPOSITE.

- The six confidence variables all have the same categories with the same value labels for each category.
- The
CLABELS
subcommand moves the category labels to the columns.