Randomise array within subjects and present equal number of times #2815
Replies: 2 comments 2 replies
-
Could you share a little bit of the material that you currently have. E.g., what stimulus type are you using for each trial, a few example statements and in what format you have these statements? From your description: is it correct that you will have two blocks (one for each repetition)? |
Beta Was this translation helpful? Give feedback.
-
Hello! The stimuli are a pair of images which are defined as pairs but the position of which is randomised on each trial (i.e., they swap positions). Each pair is presented once in each block (blocks are focus on speed, focus on accuracy). I managed to create a for loop which sort of does what I want except it doesn't present the elements from the array an equal number of times. Here's an example of one strategy I've tried. ` var whichTray = ["A", "B"]
for (let i=0, j=12; i<j; i++) { Then later when I want to call an indexed array element I use:
The array is just "A" and "B". Say I have 12 trials in each block, I want to present each element 6 times. I get why it isn't working but I don't know how to fix it. |
Beta Was this translation helpful? Give feedback.
-
I'm programming an experiment where I have 72 trials that I'll repeat twice in different blocks in a different order using a for loop.
I'm presenting participants with statement that they have to endorse, which, based on the trial, will either be correct or incorrect. I want there to be an equal number of trials within each block and across the whole experiment.
I'd also need to record what the statement to endorse was so I can label it as correct or incorrect.
I'm adapting someone else's script and am not the most proficient programmer (despite having been using jsPsych for a few years now) so if there is a reasonably simple way to this (i.e., can I avoid using JATOS?).
Any help or points in the right direction will be much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions