Deriving Variables
You can derive new variables based on existing variables in a dataset. The following methods are available to derive variables.
- Derive variable from filter – You can create a dichotomous variable based on a filter – all rows that match the filter definition will be shown as Selected, whereas non-missing rows that do not match the definition will be shown as Other. See Building Filters for more information.
- Combine categories – Derive a variable by combining categories from an existing categorical, multiple response, or array variable. For example, starting with a variable that recorded people’s opinions on issues on a scale from 1-10, you could derive a variable that combines the “1-3” responses into “Disagree”, “4-7” into “Unsure”, and “8-10” into “Agree”. The type of variable created will be the same as the type of the variable it is based on. Click New Variable at the bottom of the variable list and select Combine categories to get started. See Combining Categories.
- Categorical variable – To derive a categorical variable, define each category with a logical expression based on one or more existing variables. For example, you could derive a variable that defined “Soccer Moms” as “Gender = Female” and “Children Under 18 = Yes” and ”Single Dads” as “Gender = Male”, “Children Under 18 = Yes”, and “Marital Status = Single, Divorced, or Widowed”. Click New Variable at the bottom of the variable list and select Categorical variable to get started. See Building Categorical Variables.