PsyToolkit: Create and run cognitive psychological experiments in the browser
psytoolkit.org
psytoolkit.org
E.g. if response time is defined as the time between when the visual stimulus appears on the physical screen and the time when a click or keypress is registered, there's quite some things to take into account. I don't know browser internals, but the code 'show stimulus' doesn't lead to the stimulus being on the screen immediately. Calculation takes time. Then the rendering takes time and it's normally going to take at least a couple of frames, plus extra latency introduced by some monitors, etc, before anything effectively changes on the screen. And this might not be a fixed number (best case scenario it's just noise). And there might be an unknown amount of input latency on the mouse/keyboard/touch screen/... And that all might change if you hook up a different screen or switch browser.
Now this doesn't matter a thing for toy experiments, or when doing A/B and the noise is the same for A and B, but suppose you want to do an actual experiment to measure response time to a simple and complex stimulus and for some reason the complex stimulus consequently takes a longer time to make it to the screen whereas the subject's actual response time remains the same, but you start measuring from the time where you sent the 'calculate and show stimulus' command, you might draw the wrong conclusion. From experience I know such mistakes get made, and if lucky they get discovered before publishing. But I wouldn't be certain that is always the case.
If you're interested, the authors of jsPsych have compared native experimental software to their JS-based one (https://dx.doi.org/10.3758/s13428-015-0567-2), and our lab has also done some comparisons (https://dx.doi.org/10.3758/s13428-015-0678-9). There's a fair amount of literature around this very topic now.
In a nutshell, while there's definitely some latency and jitter involved, it's usually far smaller than human response time variability, and averaging across many trials, as well as analysis that takes into account stimulus variability, helps massively to remove noise from the analysis. Also, in many cases, we're interested in difference between times across several experimental conditions/scenarios rather than an exact absolute measurements.
Thus, for many applications, browsers are usually accurate enough, and the ease of collecting more data outways the noise. In the end, the only way to deal with latencies properly is to measure and correct for them by calibrating the entire setup. That's what we've done for the new software we're building, which also takes into account render latencies and introduces some more tricks (see https://psyarxiv.com/fqr49)
Hope that helps, would love to chat about this in detail if you're interested!
(also, somewhat relieved that I'm not the only researcher in my field who checks HN obsessively -- glad to see everyone coming out of the woodwork)
http://www.palamedestoolbox.org Is also useful in this type of research.
[Disclaimer: I'm an alum of the lab that created psychtoolbox]
My tweet from last year celebrating the first fruits of code sharing https://twitter.com/dagmarfraser/status/1060871652408475648 with response from the lead of psychopy.
MATLAB is going to have a long slow death as open source methods demanded by open science displace it. However the PTB will live on in Octave, and now psychopy.
(Note: I am the main developer of this library)
Simple task: 246 ms (with 0 error)
Choice task: 482 ms (with 2-3 errors)
How to interpret this result? How much intelligence do I have..
Also it would also be nice to include things like age, sex etc to normalize the data?
And to put it online: JATOS.
PsyToolkit is designed for experiments.
All three of these pieces of functionality are required for many common paradigms in experimental psychology.