Variable List (CODEBOOK command)
The optional variable list specification allows you to limit the results to specified variables and/or multiple response sets and override the defined measurement level for specified numeric variables.
- Each variable or multiple response set can be specified or implied only once.
- Multiple response set names must include the leading dollar sign ($).
- Keyword
TO
can be used to specify consecutive variables in file order. It cannot be used to specify a list of multiple response sets. - Keyword
ALL
can be used to specify all variables (does not include multiple response sets). Note:ALL
cannot be used in combination with a list of one or more specific variable names since a variable can be specified only once. - Keyword
$ALL
can be used to specify all multiple response sets (does not include variables). Note:$ALL
cannot be used in combination with a list of one or more specific multiple response sets, since a set can be specified only once.
Overriding Defined Measurement Level
Available summary statistics are determined by the measurement
level of the variable. You can override the defined measurement level
by including a measurement level specification in square brackets
after the variable name: [N]
for
nominal, [O]
for ordinal, and [S]
for scale. This does not change the
defined measurement level for the variable, and if results include
measurement level, the defined measurement level is displayed in the
results.
- For string variables and multiple response sets, measurement level can only be nominal or ordinal.
- Measurement level specification cannot be used with
keywords
ALL
or$ALL
.
Example
CODEBOOK Var1 Var3 [N] Var5 TO Var8 [N] $Multvar.
- Var3 and Var8 will be treated as nominal for summary statistics, so the available summary statistics for those two variables are counts and percents.
- The defined measurement level will be used to determine
available summary statistics for all other variables, including all
the variables preceding Var8 in
the set of variables defined by
Var5 TO Var8
.