Numeric and Boolean variables
A numeric variable stores one numeric value for each case. Numeric variables are often based on questions that ask “How many?” or “How much?” and require the respondent to give a numeric response.
For example, in the Short Drinks sample data set, respondents are asked to enter their age as a numeric value rather than by selecting the category that represents their age group. When respondents answer the question, they enter a whole number. For example:
Numeric question
Before analyzing the responses to a numeric question, market researchers sometimes band the responses into categories. For example, they might want to create a table that shows the age data in age groups. Banding a numeric variable is similar to coding a text variable, but it is generally easier, because you can define the bands using numeric expressions.
Numeric variables can be divided into two groups based on the type of numeric data they store:
▪Long variables. These store one integer value for each case.
▪Double variables. These store one real (decimal) value for each case.
A Boolean variable stores a value of True or False for each case. Sometimes Boolean variables are based on a question (such as Do you own a car?) that has only two possible answers. For example, Yes, which corresponds to True, and No, which corresponds to False. Boolean variables are often derived variables that have been defined for use as filters during analysis.
See also