Writing single choice and multiple choice questions
Single choice and multiple choice questions offer a list of choices from which respondents may choose one, or sometimes more, responses. The general name for these types of questions is categorical.
In this example, we will write two categorical questions. The multiple choice question looks like this when asked:
Procedure
1 Enter a name and a text for the categorical question, followed by the categorical keyword to specify that this is a categorical question:
HowDrink "How do you take tea?" categorical
2 Specify how many responses are allowed. In this example, one or more responses are allowed because you might drink tea in a number of ways. This is known as a multiple-response categorical question. The number of responses allowed for this question is defined as at least one, with no maximum, and must be in square brackets:
HowDrink How do you take tea?" categorical [1..]
3 Enter the responses for the question. The responses in the list must be separated by commas, and the whole list must be enclosed in braces. End the question with a semicolon:
HowDrink "How do you take tea?" categorical [1..]{
Black,
WithMilk,
WithLemon
};
4 Response names cannot contain spaces, punctuation, or other symbols, but in this example some of the responses such as With Milk should be displayed with spaces. For these responses, enter the text you want to display, enclosed in double quotation marks, after the response name:
HowDrink "How do you take tea?" categorical [1..]
{
Black,
WithMilk "With milk",
WithLemon "With lemon"
};
5 Add an other response so that respondents can enter some other way of taking tea that has not been included in the list of choices. Just like the rest of the responses in the list, the other response has a name, OtherTakeTea, and an optional label, “Some other way”. The addition of the other keyword is what specifies that it is a special response. An other response has a text box so that the respondent can enter text.
HowDrink "How do you take tea?" categorical [1..]
{
Black,
WithMilk "With milk",
WithLemon "With lemon",
OtherTakeTea "Some other way" other
};
6 The second categorical question allows only one answer to be chosen and is known generically as a single-response categorical question. It looks like this when asked:
7 Define the question as follows. Notice that the response range is defined as [1..1], meaning that only one response may be chosen. You can abbreviate this to [1] but when you close and reopen the file you will see that it has changed to [1..1].
BagOrLoose "Do you mostly use tea bags or loose tea?" categorical [1..1]
{
TeaBags "Tea bags",
LooseTea "Loose tea"
};
8 Press F5 to run your script.
Requirements
UNICOM Intelligence Professional with Interview Scripting.
Next
See also