Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Random Block design

Hi there,

Let me explain what I am trying to do. I would like to divide my respondents to different blocks. In total I have 70 questions, which I want to divide in either 7 or 14 blocks (still have to decide after some pretesting). I want to divide respondents randomly to only 1 of these blocks, NOT based on asnwers on a previous question. Is there a way to insert a hidden question that randomly selects one answer so that I can implement the normal skip-logic features based on such a question? Or is there another way to accomplish what I want?

I am using version 8.

Thanks in advance,
asked Mar 20, 2012 by Sander (260 points)

3 Answers

+1 vote
You can insert a hidden question at the beginning of your survey that stores a random number in a defined range that you can set.

Here's an example of a free format hidden question called "HdNumGen" which stores a random number between 1-100 ...

<input name="HdNumGen_CODE" type="hidden" value="
Begin Unverified Perl

 my $NumGen_code=0;

 return $NumGen_code;
End Unverified

You can use skips based on HdNumGen.
answered Mar 20, 2012 by Paul Moon Platinum (101,255 points)
edited May 4, 2012 by Bahadir Ozkurt
I believe you should use ""HdNumGen_CODE" for skips, the whole question name
I have today realized SYSRAND uses Unix Time stamp as random seed, so it creates the same output for the same point in time... just make sure you don't use this heavily to distinguish between users
When testing a survey and using SYSRAND, I like how it changes the random number as you go backward and forward. Makes the testing far simpler. In the old days, I would have to keep restarting the survey to generate a new random number. I found that this function was good at geenrating random numbers. I like it better than RANDNUM.
We have used this as an unique identifier to a stjdy without usernames and multiple platforms. What we have learned is that if two respondents come to this code at the same unix time, regardless of ofline/online they are assigned the same random code.

Just wanted to underline that
+1 vote
if you have a predefined user/pass list, you can use merged variables to assign a randomized (or ordered) sequence number to each respondent and use skips based on that merged variable
answered Mar 20, 2012 by Bahadir Ozkurt Gold (16,980 points)
+1 vote
You can use randomized blocks with a constructed list that contains only 1 element.  This way the respondent will only see the first block and all other blocks will be dropped and they will not see them.

So for the constructed list logic use:

Make sure the parent list has the 7 or 14 members (1 for each block) that you wish to use.
Then you can assign the questions to a block and they will be chosen at random and will only see 1 block and none else. No skip logic required.
answered Mar 21, 2012 by Mike Lodder Gold (22,975 points)