Responses based on answers to previous questions
Shared lists are commonly used to simplify the manipulation of responses, for example, when you want to base the response list for one question on the answers given or not given at a previous question. A typical example is aided/unaided awareness questions where you start by asking respondents to name items spontaneously, and then ask them specifically about any other items that they did not mention.
Setting up this type of script means placing statements in both the metadata and the routing sections of the questionnaire. You specify the shared lists and the questions in the metadata section, but specify which responses are to be presented for each question in the routing section. The following example illustrates how to set up an aided and unaided awareness script, and also how to merge the two sets of answers into a single variable for use later on in the questionnaire.
The metadata section contains the following text:
Spont "Which brands of fresh cream puddings do you know?"
categorical [1..]
{
use BrandList
};
BrandsUsed "And of those brands, which ones do you buy?"
categorical [1..]
{
use BrandList
};
AidedQ "Do you recognize any of the following brand names?"
categorical [1..]
{
use BrandList,
AidedNA "Do not recognize any of these names" na
} ran;
KnownQ "The brands that you named are as follows." categorical [1..]
{
use BrandList
};
The Known question is a dummy question that is used for display purposes only. Its purpose is to define a variable that can be used for storing categorical information for use later in the questionnaire. Data is placed in the variable by statements in the routing section, and the variable will be available for analysis in UNICOM Intelligence Reporter - Survey Tabulation in the same way as ordinary question variables. You will see dummy questions of this type referred to as derived variables in some documentation because the question generates a variable whose value is derived from the values of other questions or variables.
The routing section contains the following statements:
Spont.Ask()
' Set response list for BrandsUsed to be those brands mentioned
' at Spont.
BrandsUsed.Categories.Filter = Spont
BrandsUsed.Ask()
' Set response list for AidedQ to be all brands not mentioned
' at Spont.
AidedQ.Categories.Filter = AidedQ.Categories - Spont
AidedQ.Ask()
' Merge unaided and aided mentions into a single variable
KnownQ = Spont + AidedQ
KnownQ.Show()
The key statements to notice in this example are the ones that create the aided awareness response list and merge the answers to the unaided and aided awareness questions. The response list for the Aided question is created by taking the full list of brands defined for the question in the metadata section (Aided.Categories) and removing any that were mentioned at the Unaided question.
The brands that the respondent recognizes are added into the Known variable. Because the metadata section specifies that the response list for this question comes from the Brands shared list, a response of “Do not recognize any of these brands” at the aided awareness question is ignored because it is not part of the shared list.
The last statement in the script snippet displays the KnownQ question and response list, but with the responses that have been set into it marked. The respondent cannot make any changes on this page. If they want to make changes, they must go back to the original question from which that part of the answer came. For example, if the respondent forgot to say that they recognize the Alpine brand name, they must go back to AidedQ and change it there.
See also