STOP-IT jsPsych can be installed on local computers or on a web server, and is available under a GNU license. The software is based on the jsPsych (De Leeuw, 2015), which is “a JavaScript library for running behavioral experiments in a web browser. The library provides a flexible framework for building a wide range of laboratory-like experiments.” We refer STOP-IT users to the jsPsych website (https://www.jspsych.org) for more information about jsPsych itself.
(Customised) jsPsych functions are used for randomization, timing, stimulus presentation, and response registration. In addition, standard JavaScript libraries and PHP scripts are used for the staircase tracking procedure and some additional features of the program, such as writing the data to an output file.
To ensure accurate timing, STOP-IT requires a Firefox or Chrome web browser. To install STOP-IT jsPsych, simply download the jsPsych folder from https://github.com/fredvbrug/STOP-IT. This folder can be placed on a local computer (running Windows, macOS, or linux) or on a web server (e.g. “https://myownwebspace/”).
In the jsPsych folder, researchers can find the ‘experiment.html’ file, the ‘app.R’ file (see the README-ANALYSIS file for more information), and several folders:
The main advantages of this version of STOP-IT are (a) the version is platform-independent; (b) it can be used for both offline and online studies; and (c) there is no need for additional programming for basic use. Of course, more advanced users can adjust the source files when wanted or needed.
The primary go task is a simple two-choice task in which participants have to discriminate between a white arrow pointing to the left and a white arrow pointing to the right. On go trials (75% of the trials), participants have to respond as fast and accurate as possible to these arrows. On stop-signal trials (25% of the trials), the arrows turn red (i.e. a visual stop signal) after a variable delay, instructing participants to cancel their response.
The default go stimuli are two white arrows (RGB: 255, 255, 255), whith a black border (RGB = 0, 0, 0). The fixation sign (a black dot; RGB: 0,0,0) and arrows are presented in the center of the screen on a white background. Stimulus size will correspond to the size of the go stimuli in the ‘./images’ folder. Occasionally, a visual stop signal (the arrow turning red; RGB: 255,38,0) is presented shortly after the stimulus onset in the go task, replacing the (white) go stimulus. Again, the size of the default stop signal will depend on the size of the stop signal in the images folder. Researchers can change all stimuli by uploading new images in the ‘./images’ folder. Be aware that the file names should correspond to the names described in the ‘experiment_variables.js’ file (see below).
By default, the response keys are ‘leftarrow’ (for the stimulus associated with the left response) and ‘rightarrow’ (for the stimulus associated with the right response). The experiment is aborted when the ESC key is pressed and the browser window is closed.
The program starts with a welcome message, and the informed consent (which can be adjusted via the configuration folder). Depending on the settings (see below), participant ID is then entered. After this, participants are required to enter their age and gender, and the experiment switches to fullscreen mode. At this point, the task instructions are presented on the screen.
The experiment consists of two phases: a practice phase (one block of 32 trials) and an experimental phase (4 blocks of 64 trials). As we will outline below, some of these default numbers can be changed.
In both phases, each trial starts with the presentation of the fixation sign, which is replaced by the go stimulus after 250 ms. The stimulus remains on the screen until participants respond (using the predefined responses keys), or until 1,250 ms (i.e., the maximal RT) have elapsed. The default inter-stimulus interval is 750 ms and independent of RT. On stop trials, a stop signal is presented after a variable SSD. SSD is initially set to 300 ms and is adjusted continuously with the staircase tracking procedure: when inhibition is successful, SSD increases by 50 ms; when inhibition is unsuccessful, SSD decreases by 50 ms. Response registration continues during stop-signal presentation.
During the practice phase, immediate feedback is presented for 750 ms:
Between each block, subjects have to wait for 15 seconds before they can start the next block. During this interval, participants will receive information about their performance in the last block: the mean RT on go trials, the number of go omissions (with a reminder that this value should be 0), and the percentage of correctly cancelled responses on stop trials (with a reminder that this value should be close to .50).
The results are written to a data file that is stored in the data folder. The data file is a csv file (‘SST_data_ID.csv’, where ID corresponds to the participant number), which can be opened in Microsoft Excel or statistical-software packages such as R and SPSS. STOP-IT will never overwrite data files; when a data file already exists (i.e., the participant number was already used), the new data will be appended to the existing file. When data files need to be replaced (e.g., because a participant did not complete the experiment), the user can manually delete the data file with the basic file system utilities.
The data file consists of the following information:
When the experiment is hosted on a web server (i.e. online experiments), the data will be automatically written to the data file (stored in the data folder) after every trial. Thus, data will be available when online experiments are aborted before the end. For experiments that are hosted on a local computer (i.e. offline experiments), data will be written to the data file at the end of the experiment. Thus, no data are saved if local experiments are aborted before the end. When the data are stored, a Download window will open (in the browser) and researchers can select the data folder.
The task can be used immediately after installation. However, users can adjust some of the default values of the task. This can be done by opening the ‘experiment_variables.js’ and ‘text_variables.js’ files (which can be found in the ‘./configuration’ folder) in a text editor (such as Notepad).
The default values comply with the recommendations described in “Capturing the ability to inhibit actions and impulsive behaviors: A consensus guide to the stop-signal task” (Verbruggen et al., 2019). Please read this guide carefully before adjusting any of the values (the design variables in particular).
Researchers can change the values of certain experimental variables. The structure of file is always the same: var NAME = VALUE. Researchers can change the VALUE but they should not change ‘var NAME’ (unless they also change the code in the ‘experiment.html’) file.
The images themselves can be adjusted by replacing the .png files in the image folder. The names of the images and the values defined in this ‘experiment_variables.js’ file (see below) should correspond.
There are separate image files for the stop signal that will replace the left go stimulus, and the stop signal that will replace the right go stimulus.
In the first step, researchers can adjust the proportion of stop signals:
The proportion of stop signals is used to determine the number of trials in the basic design. More specifically, the number of trials of the basic design = 2 (number of go stimuli) / proportion of stop signals. For example, when var nprop = 1/4 (or .25), then the basic design contains 8 trials (2 x 4).
In a second step, researchers can determine how many times the basic design should be repeated per block. This can be done separately for the practice block and the experimental block (although the number of trials in a practice block can never be higher than the number of trials in an experimental block). This value will then be multiplied by the number of trials in the basic design to determine the total number of trials within a block. For example, when var NdesignReps_exp = 8 and var nprop = 1/4 (see above), the number of trials per block = 64 (8 x 2 x 4).
In a third step, researchers can alter the number of experimental blocks.
All time intervals are in ms.
There are three different ways to determine the participant number for the file names:
The value is determined via var id:
Researchers can redirect participants to another URL when the experiment ends (useful for redirecting to e.g. Prolific or MTurk)
This file can be used to alter all text presented during the experiment. This includes: