randomized and fixed blocks | XM Community
Solved

randomized and fixed blocks

  • 12 December 2017
  • 12 replies
  • 14 views

Userlevel 5
Badge +7
We have a set of 16 blocks we would like to randomize. Three of the blocks MUST be presented, and of the 13 remaining blocks, we only want to show 8 of them picked at random. The 11 (3 required blocks and the randomly picked 😎 should all be in random order. Is there a way to randomize presentation of all 11 of the blocks we want to present?
icon

Best answer by AnthonyR 12 December 2017, 20:28

View original

12 replies

Userlevel 7
Badge +7
This would be easiest done using branches, embedded data, and 2 randomizers.

In the first randomizer, put different embedded data elements, and set each variable to 1. Display 8 of these at random.

In the second randomizer, put a branch per block with the block inside. Show each if the corresponding embedded data is 1. The 3 always shown should always be equal to 1.
Userlevel 5
Badge +7
Thanks @AnthonyR ! With your help, I was able to do the following:

I used one randomizer to set embedded data for 13 blocks:
Randomly present 8 of the following elements:
- Set Embedded Data B1 is 1
- Set Embedded Data B2 is 1
- Set Embedded Data B3 is 1
- etc.

I then used a second randomizer to present all blocks in random order: Randomly present 16 of the following elements:
-Required Block
- Required Block 2
- Required Block 3
- Then Branch if B1 is 1, then show block 1
- Then Branch if B2 is 1, then show block 2
- Then Branch if B3 is 1, then show block 3
- etc. for every single block

For the second randomizer, you present all 16 blocks because the branching takes care of the display logic for each of the blocks that were not chosen.
Userlevel 7
Badge +6
@AnthonyR and @lillianc

Would it be possible to attach an image of how this looks in the Survey Flow? I consider myself fairly knowledgeable in Qualtrics, but I am not sure what is meant by "set embedded data FOR a block."
Userlevel 7
Badge +7
@Akdashboard Absolutely! I'll work up an example qsf for you on this soon!
Userlevel 5
Badge +7
The entire survey flow doesn't fit on a screenshot so I've attached my QSF here.

Here are some screenshots:
Choosing 8 of the 13 blocks:
!

Randomly present 16 of both fixed and chosen random blocks:
!
Userlevel 5
Badge +7
@Akdashboard sorry I wasn't clear when I wrote "Set embedded data for blocks" - I am creating embedded data variables that can be used to reference which block to present later on. Variable B1 for example, will control whether I present Block 1. Variable B2 will control whether I present Block 2.
Userlevel 7
Badge +6
Thanks @lillianc. This makes perfect sense to me now.

Basically, because of the first Randomizer, only 8 of the 13 Ed fields will ever be populated, so when the 2nd Randomizer triggers, only the 8 that were filled will show up, mixed into a random order with the 3 that will always show up.

And you wouldn't need the 2nd Randomizer if you didn't need the blocks to appear in a random order.
Userlevel 5
Badge +7
@Akdashboard exactly! And thanks again to @AnthonyR for the solution, I really appreciate it!
Userlevel 4
Badge +5
@lillianc - Thanks for asking this! Very relevant to a project I'm working on and was trying to find a work around for!
Userlevel 5
Badge +7
@Libertywick I'm glad you found this useful! I ended up not being able to use the code in practice, however, since we had an additional requirement that the participants had to be able to move forward and backward through the whole survey, and the branches in the survey prevented this. For future surveys where moving forward and backward is not required, it's perfect!
Userlevel 7
Badge +27
One more note on this. On the first randomizer you would typically want to check 'Evenly Present Elements' so that you end up with a nearly equal number of respondents seeing each of the random blocks.
Userlevel 5
Badge +7
@TomG thanks, good point! Yes, in a research setting that would be very beneficial. Our use case was atypical, since we were using this for a quiz where we wanted everyone to have a truly random set and prevent cheating, so we preferred to not evenly present the elements.

Leave a Reply