How to randomly show question groups
Do you need to randomly show participants a single Question group from a larger set of question groups? Let's say you have 3 question groups, each containing a scenario that you want to survey them about, but you want to randomly display only 1 of those question groups to a participant.

For example, say you are conducting a survey and have two experimental conditions; participants are going to read one of two vignettes that are designed to influence them in specific ways and one control condition in which the vignette is designed not to influence participants in any way.

First, you have to create a variable that randomly assigns each participant to one of the 3 groups.  This should basically be the first variable in your survey.  But, the key is that you don’t let participants see the variable. 

To start, you need add a new question to your first Question group. This question is going to calculate and store a random number.

To do this, we're going create a question of the question type "Equation", and we're going to assign it the Question code "random" (you can call it whatever you want, we just like random).

We want to generate a random number between 1 and 3, so we enter this value: {rand(1,3)}. If you wanted to generate a number between 1 and 10, you'd change the value to {rand(1,10)}.

The calculation string goes right in the Question box:

Of course, we do not want to show this question to participants -- it's just a question we want to use behind the scenes, so you need to set the question to hidden:

So, what we've done is said that a number between 1 and 3 will be assigned to this participant, at the beginning of our survey, and stored in the Question code named random

Next, save the question.

Now, in each of the Question groups we want to randomly display, we check to see which random number the participant was assigned (contained in the Question code/variable random) we created.

In the example below, we are indicating that this question group should only be shown in the value stored in Question code random is 1. The Relevance equation contains: ((random==1))

In the next question group we'd use ((random==2)), and the last one ((random==3))

Now you can go test your survey, and note how over a series of tests, the 3 question groups will be randomly displayed to you.

If you use a Question code in your Relevance equation that is invalid (ie: doesn't exist), it will be highlighted on the Question group summary page. Shown below, here we made the mistake of using rand instead of the correct question code which is random.

295 of 555 people found this helpful.   

Powered by LiveZilla Customer Support Software