Wednesday 8 December 2010

More CTable commands in Syntax

% in columns and Ns is col after it.
CTABLES /TABLE NEWS [COUNT COLPCT] /SLABELS POSITION=ROW VISIBLE=NO.


Or the same thing but the Ns in rows instead of a separate column.

CTABLES /TABLE NEWS [COUNT COLPCT].

CTABLES /TABLE (CONFINAN + CONBUS + CONBUS + CONEDUC + CONPRESS + CONMEDIC)[COUNT ROWPCT] /CLABELS ROWLABELS=OPPOSITE.

CTABLES /TABLE $MLTNEWS [COUNT COLPCT] BY SEX /SLABELS VISIBLE=NO /CATEGORIES VARIABLES=SEX TOTAL=YES.

CTABLES /TABLE POLVIEWS [COLPCT] BY AGECAT.


CTABLES /TABLE (CONFINAN + CONEDUC + CONBUS + CONMEDIC + CONPRESS + CONTV ) /SLABELS VISIBLE=NO /CLABELS ROWLABELS=OPPOSITE

OR

CTABLES /TABLE (CONFINAN + CONEDUC + CONBUS + CONMEDIC + CONPRESS + CONTV )

To add "Totals"

CTABLES /TABLE AGECAT
/CATEGORIES VARIABLES=AGECAT TOTAL=YES LABEL='Total Respondents'.
/TABLE SEX [COUNT] + HAPPY [COUNT, COLPCT] /TABLE (SEX + HAPPY [COLPCT])[COUNT]