randomize blocks between participants #1663
Unanswered
lily2brain
asked this question in
Q&A
Replies: 1 comment 4 replies
-
One way to do this is to use jsPsych.randomization.shuffle to randomize the order of the two procedures, and then add the procedures to the timeline in this randomized order: // this will give you an array with the two procedures in random order
var random_block_order = jsPsych.randomization.shuffle([blocktrial_procedure_1_free, blocktrial_procedure_2_fixed]);
// add the first procedure from the randomized array to your timeline
timeline.push(random_block_order[0]);
// add the second procedure from the randomized array to your timeline
timeline.push(random_block_order[1]); I hope this helps. Let us know if this works and if you have any other questions. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys
I am having difficulties to randomize 2 blocks (blocktrial_1_free and blocktrial_2_fixed), the two have different configurations and the information within each block is already randomized, but I need the presentation of these blocks to be random for the participant (ex: participant 1 - blocktrial_2_fixed and blocktrial_1_free / participant 2 - blocktrial_1_free and blocktrial_2_fixed) ... part of the script is below for better understanding:
Beta Was this translation helpful? Give feedback.
All reactions