Issues with results

19 views
Skip to first unread message

Nicolás Comay

unread,
Sep 11, 2020, 1:35:31 AM9/11/20
to JATOS
Hi, I'm a psychologist from Argentina. With my research group we're using your platform to run psychophysics experiments (we're using it a lot! thanks!)

The experiment is a perceptual task and consists on 120 trials. The problem is that sometimes (not always!) two trials concatenate when they shouldn't. It looks like this: 

{"Trial_number":110,"var2":4.097766398684142,"var3":2.0943951023931953,"var4":6879.731179865731,"var5":4815.811825906011,"var6":963.1623651812023,"var7":1,"var8":1,"var9":1,"var10":0.7,"var11":0.2,"var12":3,"var13":1495,"var14":1,"var15":true,"var16":1,"var17":644}
{"Trial_number":91,"var2":2.4483441960165044,"var3":2.0943951023931953,"var4":5390.018492477775,"var5":3773.012944734442,"var6":1131.9038834203325,"var7":1,"var8":2,"var9":2,"var10":0.7,"var11":0.3,"var12":3,"var13":1392,"var14":2,"var15":true,"var16":0.9554896142433235,"var17":1004}{"Trial_number":111,"var2":0.0497202551139122,"var3":2.0943951023931953,"var4":7110.7254837008795,"var5":4266.435290220527,"var6":1279.930587066158,"var7":2,"var8":2,"var9":2,"var10":0.6,"var11":0.3,"var12":3,"var13":1325,"var14":2,"var15":true,"var16":1,"var17":983}

Here the trial number 91 appears in the middle of the trial 110 and 111. We don't know why this is happening. We run a pilot and this only happeneed in two of nine subjects, and we can't see the reason. 

We are saving the data like this:

var Data = {"var1": sc.trials,
"var2": DataToSave.var2,
"var3": DataToSave.var3, 
"var4": DataToSave.var4,
"var5": DataToSave.var5,
"var6": DataToSave.var6,
"var7": DataToSave.var7, 
"var8": DataToSave.var8,  
"var9": DataToSave.var9,                     
"var10": DataToSave.var10,
"var11": DataToSave.var11, 
"var12": DataToSave.var12,
"var13": DataToSave.var13,
"var14": DataToSave.var14,
"var15": DataToSave.var15,
"var16": DataToSave.var16,
"var17": DataToSave.var17};
jatos.appendResultData(JSON.stringify(Data));
if(sc.trial < sc.maxtrials){ 
jatos.appendResultData("\n");
}

the last line ("\n") introduces a line break so we can read the file in Rstudio. This line break isn't working in the 91 to 111 trial, so it makes the error appears in Rstudio, since the two trials are concatenated.

Thanks for the answers!

Best regards,
Nico.

Elisa Filevich

unread,
Sep 11, 2020, 6:02:53 AM9/11/20
to ja...@googlegroups.com
Hola Nico, 

Happy to hear JATOS is helpful!
I *guess* that the problem has to do with the fact that you’re appending data after each trial. This is a very common mistake /something new to learn for those of us not used to testing online: data transfer between the client (browser) and the server usually works, but is not automatic. In some cases it might fail, or take a bit longer. By default, JATOS waits 15 seconds (or 30, depending on the version) if a request doesn’t work, and then retries up to 4 times. My guess is that some requests take a while longer or fail a couple of times and in the meantime JATOS moved on to send the data for other trials. 

Which JATOS version are you running on your server? Since v.3.5.3 I believe, requets get sent in the background and the order is respected. So there are three solutions. If you’re using an old JATOS version, update it. You could also probably solve this by not sending data after every single trial but instead every few (say 10?) trials. This is what I’d recommend anyway, it seems excessive to create so much traffic with so many requests, and usually saving every ~10 trials is more than enough. Alternatively, keep it this way and know that there’s nothing to worry about, and account for that in your analysis script. 

Hope this helps
Elisa

--
You received this message because you are subscribed to the Google Groups "JATOS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jatos+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jatos/bb079681-caac-4bde-8213-8a477d3d582cn%40googlegroups.com.

Nicolás Comay

unread,
Sep 14, 2020, 10:26:14 AM9/14/20
to JATOS
following your suggestion, we decided to save the trials data at the end of the study and it solved the problem!

thank you! 

Nicolás Comay

unread,
Sep 14, 2020, 10:26:14 AM9/14/20
to ja...@googlegroups.com
following your suggestion, we decided to save the trials data at the end of the study and it solved the problem!

thank you! ☺

You received this message because you are subscribed to a topic in the Google Groups "JATOS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jatos/WNMI56UBWQ8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jatos+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jatos/B8F80871-DBBA-4B36-B447-2DEA03BA0976%40gmail.com.

Elisa Filevich

unread,
Sep 14, 2020, 10:28:14 AM9/14/20
to JATOS
Great!
It sounds like you went all the way though- if you save the trials only at the end, it is of course possible that people do the whole study, try to send the data and fail, because their internet connection failed at that time. Depending on how long your study is, an intermediate solution might be reasonable. 
The exact answer depends on your study, just be sure that you know what you're doing

Best 

Reply all
Reply to author
Forward
0 new messages