Desktop User Guides > Professional > Interview scripting > Writing interview scripts > Questions and responses > Setting initial values
Setting initial values
Initial values are a way of speeding up the interview by displaying questions with a certain answer or set of answers preselected. If the respondent is happy with those answers, they can just click Next to continue. Initial values are particularly useful with large numeric grids, where the respondent might only have answers to fill in for certain cells. If you define initial values for each cell, the respondent only has to change the cells that apply to them For example, in a grid that asks how many times the respondent did particular activities on each day of the week, if you define the initial value for each cell as zero, it might reduce the number of cells that the respondent has to fill in. In large grids this might affect the likelihood that the respondent will continue with the interview.
Once the respondent clicks Next, any initial values that have not been changed become true responses to the question and will be saved in the data as such.
You can define initial values in the metadata and routing sections of the script. In the metadata section, append:
to the question’s definition or, for categorical responses, to the response definition. In the routing section, type:
Qname.Response.Initial = Value
In both cases, Value is the answer you want to preset. Categorical responses must be enclosed in curly braces. To set more than one categorical response, separate the responses with commas and enclose the whole list in curly braces.
For grids, you need to define an initial value for each repetition and for each question in the grid. The general syntax to use is:
GridName[..].Qname.Response.Initial = Value
GridName is the name of the grid. [..] means "for each repetition".
Qname is the name of a question in the grid.
You will need one of these statements for each question in the grid. For more information, see Initial and default cell values.
For example:
Children "How many children do you have?"
long [0..9] initialanswer(0);
Initial values with default answers
Do not confuse default answers and initial values. Initial values are answers that are to be displayed preselected. Default answers are answers that will be written to the case data if no other response is chosen and the script allows the respondent not to answer the question: see Setting default answers.
If a question has an initial value only and no na response, the respondent must either accept the initial value as their answer or must replace it with a different answer. Deleting the initial value and clicking Next issues the “Missing answer” error and redisplays the question with the initial value preselected. Even if MustAnswer is set to False, the respondent is still required to answer the question. (For information about MustAnswer, see Allowing respondents not to answer questions.)
If a question has an initial value and a default answer or an na response, the question is displayed with the initial answer preselected. If the respondent deletes the initial value and then clicks Next without choosing another answer, the interviewing program uses the default answer or na, as appropriate, as long as the script indicates that the question might be unanswered.
See also
Questions with categorical responses