Overview (CODEBOOK command)

CODEBOOK reports the dictionary information -- such as variable names, variable labels, value labels, missing values -- and summary statistics for all or specified variables and multiple response sets in the active dataset. For nominal and ordinal variables and multiple response sets, summary statistics include counts and percents. For scale variables, summary statistics include mean, standard deviation, and quartiles.

Options

Optionally, you can:

  • Specify the variables and/or multiple response sets to include in the report.
  • Choose the types of dictionary information to display.
  • Suppress the display of summary statistics for any nominal and ordinal variables and multiple response set with more than a specified number of unique values.
  • Override the defined measurement level for a variable, thereby changing the available summary statistics for the variable.
  • Include a table of file information, such as file name and location and number of cases.
  • Sort the variables in the report by variable name or label or other dictionary attributes such as type, format, or measurement level.

Basic Specification

The basic specification is the command name CODEBOOK with no additional specifications.

Subcommand Order

The command name is followed by the optional variable list, followed by the optional subcommands in any order.

Syntax Rules

  • Variables and multiple response sets listed on the optional variable list must already exist in the active dataset.
  • Each variable can only be specified or implied once.
  • Multiple response set names must include the leading dollar sign ($).
  • The keyword TO can be used to specify consecutive variables in file order. It cannot be used to specify a list of multiple response sets.
  • Each subcommand can only be specified once.
  • Equals signs and square brackets shown in examples are required syntax elements.

Operations

  • By default, CODEBOOK reads the active dataset and causes the execution of any pending transformations.
  • If /STATISTICS NONE is specified, CODEBOOK does not read the active dataset or execute pending transformations.
  • SPLIT FILE status is ignored. This includes split-file groups created by the MULTIPLE IMPUTATION command (available in Sampling and Testing).
  • FILTER status is honored for computing summary statistics.