Data Model > Available DSCs > SPSS Statistics SAV DSC > Writing to an SPSS Statistics .sav file > Variable definitions when writing to a .sav file > Multiple-response categorical variables
 
Multiple-response categorical variables
These are MDM categorical variables whose EffectiveMaxValue property is greater than 1. For this type of MDM variable, the SPSS Statistics SAV DSC creates a multiple set of IBM SPSS Statistics variables, which represent either a mutiple-category set or a multiple-dichotomy set.
If the value of the MDM variable's EffectiveMaxValue property (or the value of the Max property), if defined on the variable) is less than the number of categories in the variable, the SPSS Statistics SAV DSC creates a multiple category set. Otherwise, the SPSS Statistics SAV DSC creates a multiple dichotomy set. Note that the SPSS Statistics SAV DSC ignores any MDM categories that have the flUser flag set (such as No Answer) when determining the number of categories in the MDM variable. To force the SPSS Statistics SAV DSC to create either a multiple category set or a multiple dichotomy set, use the CategorySet property.
For each multiple-response categorical variable, the SPSS Statistics SAV DSC also adds an IBM SPSS Statistics multiple response set to the .sav file. The multiple response set's name is the MDM variable's name prefixed by a dollar sign ($).
Multiple category sets and multiple dichotomy sets are described in more detail below.
Multiple category set
The number of IBM SPSS Statistics variables created by the SPSS Statistics SAV DSC equals the value of the MDM variable's EffectiveMaxValue property. The first category in the response is written to the first IBM SPSS Statistics variable in the set, the second category in the response is written to the second IBM SPSS Statistics variable in the set, and so on. The actual value written to each IBM SPSS Statistics variable is as described (and can be customized as described) in Single-response categorical variables).
If the response contains less categories than there are IBM SPSS Statistics variables in the set, the SPSS Statistics SAV DSC writes the system-missing value (see Missing values when writing to a .sav file to the unused variables. If the response is an empty categorical response or a NULL value, the SPSS Statistics SAV DSC writes the system-missing value1.
Multiple dichotomy set
The SPSS Statistics SAV DSC creates one IBM SPSS Statistics variable for each category in the MDM variable. By default, the SPSS Statistics SAV DSC sets the value of each IBM SPSS Statistics variable to 1 to indicate that the response included the corresponding category, or 0 to indicate that the response did not include the corresponding category. To specify different values, use the DichotomyYes and DichotomyNo properties. You can also define the labels for these values by using the DichotomyLabelYes and DichotomyLabelNo properties.
If the response is an empty categorical response, the SPSS Statistics SAV DSC writes 0 (or the DichotomyNo value, if set) to all the IBM SPSS Statistics variables in the set. If the response is a NULL value, the SPSS Statistics SAV DSC writes the system‑missing value (see Missing values when writing to a .sav file or the value of the DichotomyMissing property, if specified to all the IBM SPSS Statistics variables in the set1.
By default, the SPSS Statistics SAV DSC creates one IBM SPSS Statistics variable for each MDM category that has the flUser flag set (that is, special categories such as Don't Know). To stop this from happening, use the NoUserDichotomies property. To stop the SPSS Statistics SAV DSC from creating an IBM SPSS Statistics variable for any MDM category, use the Visible property.
The following text explains the difference between a multiple category set and a multiple dichotomy set in more detail. To illustrate the difference, we will take the example of a variable called items, which represents the responses to the following question in a skiing holiday survey:
Which items did you rent?
(Circle all that apply.)
Skis/Poles
Boots
Ski school
Lift pass
Multiple category set
For each category, the SPSS Statistics SAV DSC creates a variable that is similar to the variables the creates for single response variables. When the items variable is exported as a multiple category set, the SPSS Statistics SAV DSC creates four variables named items1, items2, items3, and items4. These are numeric variables with value labels of 1="Skis/Poles", 2="Boots", 3="Ski school", 4="Lift pass".
The SPSS Statistics SAV DSC stores the first category selected by a respondent in Items1, the second category in Items2, and so on. If a respondent chooses only two categories, the SPSS Statistics SAV DSC puts the system-missing value into items3 and items4. The SPSS Statistics SAV DSC fills the variables in the order in which the category values are held in the data, and not in numerical order or the order of the category list.
If the respondent is allowed to choose only two responses, the SPSS Statistics SAV DSC creates only two variables: Items1 and Items2.
The names of the variables are based on a combination of the alias algorithm and a best fit algorithm, as follows:
The maximum number of names required for each variable is calculated.
The name is created using the maximum number of characters from the alias for which there is room after allowing for a numeric suffix with as many digits as are required to make the name unique.
Multiple dichotomy set
When the items variable is exported as a multiple dichotomy set, the SPSS Statistics SAV DSC creates four variables whose names are based on the alias held for the categories in the metadata: SkiPole, Boots, School, LiftPass. The variable labels are the same as the category texts: Skis/Poles, Boots, and so on.
Each variable is a numeric variable with value labels of 0="No" and 1="Yes". The SPSS Statistics SAV DSC gives a Yes value to the variables that correspond to the categories that the respondent selected. For example, it gives a Yes value to the SkiPole and School variables for respondents who chose the Skis/Poles and Ski school categories.
See also
Variable definitions when writing to a .sav file