CTABLES

CTABLES is available in the Custom Tables option.

Note: Square brackets that are used in the CTABLES syntax chart are required parts of the syntax and are not used to indicate optional elements. All subcommands except /TABLE are optional.

CTABLES

 /FORMAT MINCOLWIDTH={DEFAULT**}  MAXCOLWIDTH={DEFAULT**}
                     {value    }              {value    }

         UNITS={POINTS**}   EMPTY= {ZERO** }   MISSING= {'.'    }
               {INCHES  }          {BLANK  }            {'chars'}
               {CM      }          {'chars'}

 /VLABELS VARIABLES= varlist 

         DISPLAY= {DEFAULT**}
                  {NAME     }
                  {LABEL    }
                  {BOTH     }
                  {NONE     }

 /MRSETS COUNTDUPLICATES= {NO**}
                          {YES }

 /SMISSING {VARIABLE**}
           {LISTWISE  }

 /PCOMPUTE &catname= EXPR(expression)

 /PPROPERTIES &catname &catname...
              LABEL= "label"
              FORMAT= summary format ... summary format
              HIDESOURCECATS= {NO**}
                              {YES }

 /HIDESMALLCOUNTS COUNT = {5**    }
                          {integer}

 /TABLE  rows BY columns BY layers 

 /SLABELS POSITION= {COLUMN**}  VISIBLE= {YES**}
                    {ROW     }           {NO   }
                    {LAYER }

 /CLABELS {AUTO**                }
          {ROWLABELS= {OPPOSITE} }
                      {LAYER   }  
          {COLLABELS= {OPPOSITE} }
                      {LAYER   }  

 /CATEGORIES  VARIABLES= varlist  

    { [value, value, value...]                              }
    { ORDER= {A**} KEY= {VALUE**       } MISSING= {EXCLUDE**} }
             {D  }      {LABEL         }          {INCLUDE  }
                      {summary(varname)} 

     TOTAL= {NO**}  LABEL= "label" POSITION= {AFTER } EMPTY= {INCLUDE**}
            {YES }                           {BEFORE}        {EXCLUDE  }

   Explicit value lists can include SUBTOTAL=’label’, HSUBTOTAL=’label’, MISSING, OTHERNM.


 /TITLES  CAPTION= ['text' 'text'...]
          CORNER=  ['text' 'text'...]
          TITLE=   ['text' 'text'...]
          Text can contain the symbols )DATE  )TIME  )TABLE 

 /SIGTEST TYPE= CHISQUARE  ALPHA= {0.05**            }
                                  {significance level}

          INCLUDEMRSETS={YES**}
                        {NO   }

          CATEGORIES={ALLVISIBLE**}
                     {SUBTOTALS   }

 /COMPARETEST TYPE= {PROP}  ALPHA= {0.05**            }
                    {MEAN}         {significance level}

          ADJUST= {BONFERRONI**}  ORIGIN=COLUMN
                  {NONE        }

          INCLUDEMRSETS={YES**}  MEANSVARIANCE={ALLCATS** }
                        {NO   }                {TESTEDCATS}

          CATEGORIES={ALLVISIBLE**}
                     {SUBTOTALS   }

          MERGE={NO**}
                {YES}

** Default if subcommand or keyword omitted.

Row, column, and layer elements each have the general form

 varname {[C]} [summary ‘label’ format...] {+}  varname ...  
         {[S]}                             {>}

When nesting (>) and concatenation (+) are combined, as in a + b > c, nesting occurs before concatenation; parentheses can be used to change precedence, as in (a + b) > c.

Summary functions available for all variables: COUNT ROWPCT.COUNT COLPCT.COUNT TABLEPCT.COUNT SUBTABLEPCT.COUNT LAYERPCT.COUNT LAYERROWPCT.COUNT LAYERCOLPCT.COUNT ROWPCT.VALIDN COLPCT.VALIDN TABLEPCT.VALIDN SUBTABLEPCT.VALIDN LAYERPCT.VALIDN LAYERROWPCT.VALIDN LAYERCOLPCT.VALIDN ROWPCT.TOTALN COLPCT.TOTALN TABLEPCT.TOTALN SUBTABLEPCT.TOTALN LAYERPCT.TOTALN LAYERROWPCT.TOTALN LAYERCOLPCT.TOTALN

Summary functions available for scale variables and for totals and subtotals of numeric variables: MAXIMUM MEAN MEDIAN MINIMUM MISSING MODE PTILE RANGE SEMEAN STDDEV SUM TOTALN VALIDN VARIANCE ROWPCT.SUM COLPCT.SUM TABLEPCT.SUM SUBTABLEPCT.SUM LAYERPCT.SUM LAYERROWPCT.SUM LAYERCOLPCT.SUM

Summary functions available for multiple response variables and their totals: RESPONSES ROWPCT.RESPONSES COLPCT.RESPONSES TABLEPCT.RESPONSES SUBTABLEPCT.RESPONSES LAYERPCT.RESPONSES LAYERROWPCT.RESPONSES LAYERCOLPCT.RESPONSES ROWPCT.RESPONSES.COUNT COLPCT.RESPONSES.COUNT TABLEPCT.RESPONSES.COUNT SUBTABLEPCT.RESPONSES.COUNT LAYERPCT.RESPONSES.COUNT LAYERROWPCT.RESPONSES.COUNT LAYERCOLPCT.RESPONSES.COUNT ROWPCT.COUNT.RESPONSES COLPCT.COUNT.RESPONSES TABLEPCT.COUNT.RESPONSES SUBTABLEPCT.COUNT.RESPONSES LAYERPCT.COUNT.RESPONSES LAYERROWPCT. COUNT.RESPONSES LAYERCOLPCT.COUNT.RESPONSES

For unweighted summaries, prefix U to a function name, as in UCOUNT.

Formats for summaries: COMMAw.d DOLLARw.d Fw.d NEGPARENw.d NEQUALw.d PARENw.d PCTw.d PCTPARENw.d DOTw.d CCA...CCEw.d Nw.d Ew.d and all DATE formats

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the CTABLES command can be generated from the Custom Tables dialog.

Release History

Release 13.0

  • HSUBTOTAL keyword introduced on the CATEGORIES subcommand.

Release 14.0

  • INCLUDEMRSETS keyword introduced on the SIGTEST and COMPARETEST subcommands.
  • CATEGORIES keyword introduced on the SIGTEST and COMPARETEST subcommands.
  • MEANSVARIANCE keyword introduced on the COMPARETEST subcommand.

Release 18.0

  • MERGE keyword introduced on the COMPARETEST subcommand.
  • PCOMPUTE and PPROPERTIES subcommands introduced.

Release 19.0

  • HIDESMALLCOUNTS subcommand introduced.

Examples

CTABLES /TABLE POLVIEWS [COLPCT] BY AGECAT.


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


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