CROSSTAB Subcommand (MVA command)

CROSSTAB produces a table for each categorical variable, showing the frequency and percentage of values that are present (nonmissing) and the percentage of missing values for each category as related to the other variables.

  • No tables are produced if there are no categorical variables.
  • Each categorical variable yields a table, whether it is a string variable that is assumed to be categorical or a numeric variable that is declared on the CATEGORICAL subcommand.
  • The categories of the categorical variable define the columns of the table.
  • Each of the remaining variables defines several rows—one each for the number of values present, the percentage of values present, and the percentage of system-missing values; and one each for the percentage of values defined as each discrete type of user-missing (if they are defined).

PERCENT=n. Omit rows for variables with less than the specified percentage of missing values. You can specify a percentage from 0 to 100. The default is 5, indicating the omission of any variable with less than 5% missing values. If you specify 0, all rows are displayed.

Example

MVA VARIABLES=age income91 childs jazz folk
  /CATEGORICAL=jazz folk
  /CROSSTAB PERCENT=0.
  • A table of univariate statistics is displayed by default.
  • In the output are two crosstabulations (one crosstabulation for jazz and one crosstabulation for folk). The table for jazz displays, for each category of jazz, the number and percentage of present values for age, income91, childs, and folk. It also displays, for each category of jazz, the percentage of each type of missing value (system-missing and user-missing) in the other variables. The second crosstabulation shows similar counts and percentages for each category of folk.
  • No rows are omitted, because PERCENT=0.