Using data of previous subjects as a variable for counterbalancing
Hi everyone,
First of all, thanks for JATOS and for this great forum!
I am trying to create an experiment by using OSWeb. It starts with a questionnaire, and then A and B loops follow. Score of this questionnaire reveals tendency to a rare condition. Therefore, basically, there will be 2 groups of subjects and I want to compare their results.
My plan is to counterbalance the loops within those groups, and to do so, use the data of the previous subjects. To be more clear, it might be better to explain: let's say, Jonah started the experiment. He scored very low at the beginning so he (presumably) has this rare condition. Now he will take the A and B loops and script should counterbalance their order. However, only 1 of the previous 50 subjects, Audrey had this condition and her loop order was A-B. Therefore, I want the script to access the data of Audrey, and unlike her, I want Jonah to take B loop first.
Is it possible to access this specific part of the data from previous subjects, and if so, can I use this as a variable in the script?
Thank you for your help in advance.
Best regards,
Jonah
Comments
Hi Jonah,
In JATOS, you can't access a specific part of the data as such (data are protected in the database) but what you can do is store the relevant information into the Batch Session. This is visible to any participant in the same batch, outlives study runs, and is accessible from the JavaScript. So it sounds like it's what you need.
See:
http://www.jatos.org/Session-Data-Three-Types.html#comparative-overview
And:
http://www.jatos.org/jatos.js-Reference.html#functions-to-access-the-batch-session
You'll probably simply need
jatos.batchSession.addandjatos.batchSession.getSo after each participant finishes the questionnaire, use
jatos.batchSession.addto store their score (or a boolean about whether you think they have the rare condition) and their counterbalancing order. Additionally, if you think they have the rare condition, usejatos.batchSession.getto figure out which counterbalancing order you want.Let us know if you need more details, but that should get you started.
Best
Elisa
Hi Elisa,
That will be very useful, thanks for the fast answer!
Best,
Jonah