Displaying questions randomly to respondents
There are some circumstances in which you might wish to display one or more questions to your respondents at random. For example, a large number of respondents is available for a wide-ranging questionnaire but you want to minimise the size of the questionnaire for each respondent.
This worksheet explains how to create a derived variable based on the time a respondent logs in, which then selects which of three routes the respondent takes through the survey. This is not true randomness, as it will be evenly distributed across the three paths, but the route each respondent is assigned is essentially random.
Background
To set respondents randomly on different routes through the survey you need to set up the possible routes through the survey. In this example we are assuming that there are three routes through the survey. You then need to create a derived variable that randomly assigns the respondents to one of three codes, and then routes them through the survey according to the code value.

Since this technique uses derived variables, it will only work on Snap Online and mobile interviewer surveys.
The code in the derived variable is set according to the second the respondent logs on. Since sixty has a high number of factors, this is a convenient way of splitting respondents into 2, 3, 4, 5, 6, 10, 12, 15, 20, 30 or 60 groups. Snap can automatically record the time a respondent starts the survey in the id.start paradata variable. You can extract the seconds from this using the "second" time function and then perform a simple calculation to sort it into as many different groups as you want.
Summary of steps
This worksheet assumes that you have already created all the questions in your survey.
Step 1: Adding the start time to your survey
- Open the survey in Questionnaire mode.
- Click
to open the survey properties. - Select Paradata
in the lefthand column.

- Select the Start Time system variable and check the Use in survey box. Click [OK].
- Save the changes to the Questionnaire by clicking
.
Step 2: Setting up the derived variable
- Click
to open the Variables window. - Click
to create a new variable. - Set the Response type to Single.
- Add the values for the three codes.

This uses the second time function to extract the seconds from the id.start paradata variable. The first code is selected if the respondent started the survey at some time plus 0 - 19 seconds. If that isn't true, the second code tests if they started the survey at some time plus 0 - 39 seconds (equivalent to 20 - 39 seconds) and the third code is chosen otherwise.
Step 3: Setting up your survey routing
Depending on the number of questions that you wish to display randomly you may choose different methods of routing. This worksheet shows how to use Goto After Question routing to direct you to different groups.
- Select the question or text immediately before the random blocks begin.
- Right-click and select Routing Rules from the context menu.

- Click [Add] to create a new rule.
- Select Goto After Question from the Type dropdown list and click [OK].

- Specify the first question of the second group to go to, and set the If condition of
v1==2(where v1 is the derived variable that you just created from the start time). - Click [Add] and set up a second Goto After Question which specifies the first question of the third group and an If condition of
v1==3. Click [OK] to close the routing rules dialog.
This should cause respondents assigned to group one to drop into the first block of questions, respondents assigned to group two to go to the second block, and respondents assigned to group three to go to the third block.
- Go to the end of the first random group of questions and add another Goto After Question that jumps respondents to the question after all the random blocks. (You do not need an If clause). Click [OK].

- Repeat this at the end of the second random group. (The last random group will just drop into the next question automatically.)