Produce a Codebook

A codebook is a listing of all dictionary information (names, labels, properties and attributes) together with descriptive statistical information (counts and percentages for categorical variables and summary statistics for scale variables).

This information is useful to have all information you need on a variable in a single table: variable documentation information as well as basic statistics that let you diagnose your variables: categories with very small counts, numbers of missing values etc. Codebook combines functionalities of three commands into one: the for dictionary information and basic statistics: the command for categorical variables, and the command for scale variables.

Important The kind of statistics produced by this procedure depends on the setting of property of each variable.

Using the menu

To produce a codebook use . On the first panel select the variables you would like to include in the codebook.

As shown below the Output and Statistics tab let you choose the information you would like to display. Default is to display all variable related information in full detail. In a ordinary analysis situation not all information is useful, i.e. you should make a selection according to what you need...

Below you will find two examples, the first for a categorical variable, the second for a scale variable. Note that with scale variables, labelled values appear with counts and percentages.

Using syntax: the CODEBOOK command
 CODEBOOK.

The default output includes variable information for all variables, Counts and percents for all categories of nominal and ordinal variables, summary statistics for all scale variables.

CODEBOOK V1 TO V20 V30 [N]. 

Codebook information from variables V1 to V20 (output depending on the measurement level of the variables; treat variable V30 as a nominal variable (for this procedure).

Refer to the documentation for the full details; the command has many options to select the information to be shown

See also