This article is part of The Definitive Guide to Uploading and Preparing Data.
When the same question in survey is posed with a different brand, concept or other object, this is what is known as piping in survey scripting.
For example, a respondent might be asked: “How do you feel about this <CONCEPT>?” where the concept is different for each respondent. We say that the "Concept" here has been piped in (from another question, or from a dummy variable).
When respondents see multiple questions that involve piping, and the things being piped in are randomized or rotated, that is knowing as looping. The data is asked and captured a bit like the following:
- var1 = How do you feel about <1st_Concept>?
- var2 = How do you feel about <2nd_Concept>?
- var3 = How do you feel about <3rd_Concept>?
The variables above show the order of presentation in the questionnaire, but what we really want are variables that tells us about how they feel about each concept rather than the order of presentation. So if we had 6 concepts being evaluated we'd want to end up with 6 variables:
- var_depiped_a = How do you feel about <Concept_A>?
- var_depiped_b = How do you feel about <Concept_B>?
- var_depiped_c = How do you feel about <Concept_C>?
- var_depiped_d = How do you feel about <Concept_D>?
- var_depiped_e = How do you feel about <Concept_E>?
- var_depiped_f = How do you feel about <Concept_F>?
The variables A through F above are 'depiped' and 'delooped'.
Crunch Automation
Below is an example of Crunch Automation. Each respondent was asked 3 piped questions in a looping situation. A hidden dummy variable(s) (hBRAND1, hBRAND2, hBRAND3) stored the rotation so we know which brand is being piped into the 3 questions (q5_1, q5_2, q5_3). The resultant variables are used to construct a categorical array and are then hidden.
CREATE CATEGORICAL
CASE
WHEN hBRAND1 = 1 THEN VARIABLE q5_1
WHEN hBRAND2 = 1 THEN VARIABLE q5_2
WHEN hBRAND3 = 1 THEN VARIABLE q5_3
ELSE INTO NULL
END
AS q5_brand1
DESCRIPTION "Pepsi";
CREATE CATEGORICAL
CASE
WHEN hBRAND1 = 2 THEN VARIABLE q5_1
WHEN hBRAND2 = 2 THEN VARIABLE q5_2
WHEN hBRAND3 = 2 THEN VARIABLE q5_3
ELSE INTO NULL
END
AS q5_brand2
DESCRIPTION "Coke";
CREATE CATEGORICAL
CASE
WHEN hBRAND1 = 3 THEN VARIABLE q5_1
WHEN hBRAND2 = 3 THEN VARIABLE q5_2
WHEN hBRAND3 = 3 THEN VARIABLE q5_3
ELSE INTO NULL
END
AS q5_brand3
NAME "Fanta";
CREATE CATEGORICAL ARRAY
q5_brand1, q5_brand2, q5_brand3
LABEL COPY(DESCRIPTION)
AS q5_delooped
TITLE "Feelings towards brands"
DESCRIPTION "Q5 - How do you feel about each of the following brands";
ORGANIZE q5_brand1, q5_brand2, q5_brand3 INTO HIDDEN "Q5";