Randomization of 30 image+sentence in within design without repetition | XM Community
Skip to main content
Solved

Randomization of 30 image+sentence in within design without repetition

  • January 24, 2025
  • 1 reply
  • 53 views

Forum|alt.badge.img

Hi there,

I have 30 photos of people and 30 sentences describing actions. I need to create randomized pairs where a photo is displayed with a sentence below it, and participants will evaluate the person depicted using a Likert scale. Participants must see all 30 pairs.

Participants should not see any repeated photos or sentences. I want the pairs to be randomized so that any photo can be paired with any sentence from the set. Additionally, I need to record which photo and sentence were shown for each evaluation in the dataset.

(I expect to have a certain amount of mid-dropout participants because the task is lengthy).

What approach can I use to achieve this?

 

So far, I created a block with a multiple-choice item using images and another item with sentences. I applied advanced randomization to ensure that only one of the image choices is displayed evenly. I did the same for the sentences. Then, I applied JavaScript to hide the image item, automatically select the displayed choice, and click the "Next" button (to save the response in the data). I repeated this process for the sentence item. Afterward, I piped the image and sentence into a Likert scale. All of this was set up within a block using loop & merge, repeating 30 times.

It is working well in my tests, but I am concerned that with real participants, some may drop out and disrupt the even distribution of the images and sentences. I fear that eventually some participants might see repeated images or sentences due to the disruption.

Would this be a real concern?

Best answer by TomG

Yes, it is a real concern and not just with drop-outs.  Multiple respondents taking the survey at the same time will also mess up the rotation because ‘Evenly present’ counts across all responses.

There are a number of ways to achieve your goal. Here is one way:

  1. Add a question before your loop and merge with 30 choices for the sentences and randomize the choices. Do not force response. Add JS to loop through the choices and save the sentences to embedded data fields for each choice (e.g. choice1, choice2, …, choice30). Hide the question with JS (and click next if it is on a page by itself)
  2. In your loop & merge setup add 30 rows with the image url in field 1 and the alt text in field 2. In field 3 pipe your randomized sentence (e.g. ${e://Field/choice1}). Randomize your loop.
  3. Pipe the loop and merge fields into the html of your evaluation question. 
View original

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5911 replies
  • Answer
  • January 24, 2025

Yes, it is a real concern and not just with drop-outs.  Multiple respondents taking the survey at the same time will also mess up the rotation because ‘Evenly present’ counts across all responses.

There are a number of ways to achieve your goal. Here is one way:

  1. Add a question before your loop and merge with 30 choices for the sentences and randomize the choices. Do not force response. Add JS to loop through the choices and save the sentences to embedded data fields for each choice (e.g. choice1, choice2, …, choice30). Hide the question with JS (and click next if it is on a page by itself)
  2. In your loop & merge setup add 30 rows with the image url in field 1 and the alt text in field 2. In field 3 pipe your randomized sentence (e.g. ${e://Field/choice1}). Randomize your loop.
  3. Pipe the loop and merge fields into the html of your evaluation question. 

Leave a Reply