Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

subject_nr assignment on JATOS

Hi everyone!

I'm running the experiment I created with OpenSesame on JATOS. I'm having a problem with subject_nr assignement though. JATOS seems to not be able to assign the subject_nr correctly (meaning, automatically and progressively), rather it always assigns 1 or 0. This is a problem for me, as in a sequence of my experiment participants are assigned to List 1, List 2 or List 3 based on subject_nr, and it's important that the assignment is counterbalanced: if subject_nr is always 0 or 1, participants only get assigned to List 1 or List 3.

I have already tried this, and it seems to not work: I add this inline_javascript at the start of the experiment (inside the sequence that contains everything),

Then I add this inline_javascript inside the sequence that contains the 3 lists, but before the 3 lists.

As I said, this method doesn't work. The second inline does, but there is a problem with the first one, and now I don't even get an output when the participants do the experiment (in the column "State" in JATOS I always get FAIL).


If you have any suggestions or you've come across the same problem and found a solution and you could help me, that would be very much appreciated :)

Comments

  • Hi,

    As far as I understand your code, this problem has nothing to do with JATOS, it's to do with how you use the studyResultId to obtain the subject_nr. I would recommend you debug this in the console, to get the output at every line, and see if you can improve the code.

    Best

    Elisa

  • Also, a better way to solve your problem could be to follow an example. Go to https://www.jatos.org/Example-Studies and search for 'Randomize'. You'll find two example studies that might be easier to adapt to your needs.

Sign In or Register to comment.