See Crunch Automation basics for more information.
The CREATE COMBINED RESPONSE command allows you to create a new categorical variable with the combined selected values of the input categoricals.
This is not the same as the CREATE CATEGORICAL RECODE command, which collapses categories into ‘buckets’. Instead, CREATE COMBINED RESPONSE looks at the union of responses across input variables (in DP jargon, this might be thought of as ‘creating a net across variables’). You could express the same thing using the CREATE CATEGORICAL CASE command, though the CREATE COMBINED RESPONSE command simply is a more descriptive way to express the outcome.
- All input variables must be either categorical or subvariables of arrays, but array variables aren't allowed as an input.
- Missing data is considered as per the “OR” operator (see the CREATE LOGICAL command page for more details on how the OR union treats missing data).
CREATE COMBINED RESPONSE alias, ..., alias SELECTED [code|"label", ..., code|"label"] AS alias [TITLE "string"] [DESCRIPTION "string"] [NOTES "string"];
Using the example 2019 Mobile Technology and Home Broadband dataset, suppose we want to create a net variable of those who used at least one social media channel at least daily. Let's look at the following:
- We can use the source variables that contribute to the array Frequency of Social Media as inputs (not the subvariables of the array, but the hidden original variables that share the same scale).
- We’ll select “Several times a day” and “About once a day” as the responses to consider (selected by category id in this example).
CREATE COMBINED RESPONSE sns2a,sns2b,sns2c,sns2d,sns2e SELECTED 1,2 AS sns2_daily TITLE "Use any social media channel at least daily";
The output is the following variable. Note that the missing data is in alignment with the “OR” operator between the subvariables (see the CREATE LOGICAL command for more details on how the OR union treats missing data):