Select random trial from randomized block implement feedback based on choice | XM Community
Solved

Select random trial from randomized block implement feedback based on choice

  • 19 July 2018
  • 2 replies
  • 27 views

I am implementing an experiment wherein I have configured embedded randomization (e.g., participants are allocated to condition 1 or 2). Within these conditions, they are then further allocated a particular order of blocks (1A & 1B; 2A & 2B). Within the blocks, there are a number of trials that are also randomized. Within these trials, participants must chose from one of two "gambles". At the end of the experiment, I would like to (1) randomly select one of the trials (doesn't actually need to be "random" since they are presented randomly) (2) check which of the two "gambles" they selected, (3) use a random number generator to decide the "outcome" of the gamble, and (4) present the participant with feedback about this outcome. I know how to do all of this in principle, and am pretty clear about how to use the random number to determine the outcome (#3). I'm not totally clear how to track the trials (since they're randomly presented), nor how to attach actionable information to the trials (e.g., probability of win vs. loss; monetary amount tied to outcome). I presume that there should be some way to do this with a Javascript trial counter and embedded variables, updating the embedded variables as the participant progresses (w/ Javascript), and then using the final embedded variable info for feedback. I'm a bit fuzzy on the practical details of the implementation though. Any advice would be most appreciated.
icon

Best answer by akshay11 6 August 2018, 20:27

View original

2 replies

Badge +1
You can set embedded data using javascript through the following function:

Qualtrics.SurveyEngine.setEmbeddedData('field_name','field_value');
Hello @ntvandam

You can add embedded data through javascript as
Qualtrics.SurveyEngine.setEmbeddedData('field_name','field_value');

OR

You can add embedded data through survey flow after every step you need.

Leave a Reply