Return to the Four Choice Reaction Time Task page
Four Choice Reaction Time Task - Keyboard Input
SCRIPT INFO
Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 04-11-2017
last updated: 02-09-2018 by K.Borchert (katjab@millisecond.com) for Millisecond Software LLC
Script Copyright © 02-09-2018 Millisecond Software
BACKGROUND INFO
*Purpose*
This script implements a version of a 4 Choice Reaction Time Task similar to the one described in:
Armstrong et al (2012). Mild Dehydration Affects Mood in Healthy Young Women.
The Journal of Nutrition: Ingestive Behavior and Neurosciences.
Feb;142(2):382-8. doi: 10.3945/jn.111.142000. Epub 2011 Dec 21
*Task*
4 boxes are presented on the screen in a horizontal array. Each box has an assigned response key (by default, the
response keys are matched spatially to the position of their assigned boxes: DFJK).
After a fixed amount of time, one of the boxes turns red and participants are asked to press the
corresponding response key as fast as possible.
DATA FILE INFORMATION:
The default data stored in the data files are:
(1) Raw data file: 'fourchoicereactiontimetask_raw*.iqdat' (a separate file for each participant)*
build: Inquisit build
computer.platform: the platform the script was run on
date, time, subject, group: date and time script was run with the current subject/groupnumber
blockcode, blocknum: the name and number of the current block
trialcode, trialnum: the name and number of the currently recorded trial
(Note: not all trials that are run might record data; by default data is collected unless /recorddata = false is set for a particular trial/block)
/totalTrialcount: number of test trials run
response: the participant's response (scancode of response button)
/selectedPosition: the selected position based on keyboard press
latency: the response latency (in ms) measured from start of trial (onset of the 4 gray boxes)
/rt: stores the latency measured from onset of red box (Note: negative latencies => response was made before ONSET of red box)
/prematureError: 1 = premature error was made
(premature error: values.rt < parameters.prematureErrorWindow)
0 = otherwise;
/timeoutError: 1 = a timeout error was made;
(timeout error: values.rt > parameters.timeoutErrorWindow)
0 = otherwise;
/incorrectChoice: 1 = a valid (neither premature nor timeout response) but incorrect response was made;
0 = otherwise
/correct: the correctness of the response
1 => valid (no premature response nor late response) AND correct choice of response button
0 => otherwise
/countPrematureErrors: counts incorrect premature responses
(responses made BEFORE appearance of red box and those made AFTER within the prematureErrorWindow)
/countTimeoutErrors: responses made after parameters.timeoutErrorWindow
/countIncorrectChoices: counts the number of valid responses (neither premature nor late) that are incorrect response choices
(2) Summary data file: 'fourchoicereactiontimetask_summary*.iqdat' (a separate file for each participant)*
script.startdate: date script was run
script.starttime: time script was started
script.subjectid: subject id number
script.groupid: group id number
script.elapsedtime: time it took to run script (in ms)
computer.platform: the platform the script was run on
/completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run)
/totalTrialcount: number of test trials run
/propCorrect: proportion of correct responses
Notes: all trials with values.prematureError = 1 OR values.timeoutError = 1 are automatically scored as 0 (incorrect)
regardless of response key hit
/meanRT: mean correct response latency (in ms; measured from onset of red box)
/SD: standard deviations of correct latencies
/propPrematureError: proportion of Premature Errors relative of total number of trials
/propTimeoutErrors: proportion of Timeout Errors relative of total number of trials
/propIncorrectChoices: proportion of IncorrectChoices (otherwise valid) relative of total number of trials
* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions
EXPERIMENTAL SET-UP
1. Practice Block: 10 practice trials with feedback
by default, the positions of the red box is randomly determined with replacement (see section Editable Lists)
error feedback provided
2. Testblock: 100 trials (default; can be adjusted under section Editable Parameters)
by default, the positions of the red box is randomly determined with replacement (see section Editable Lists)
Trial Sequence:
4 gray boxes (default: 500ms; parameters.SOA; fixed)-> onset of red box -> waits for response to continue
Two latencies recorded:
1) 'latency' measured from onset of trial (with onset of the 4 gray boxes)
2) values.RT measured from onset of red box
Error Categories:
premature Errors: all responses with values.rt < parameters.prematureErrorWindow (measured from onset of red box)
If participant responds BEFORE red box appears, values.rt will be negative and automatically scored as a prematureError.
timeoutErrors: all responses with values.rt > parameters.timeoutErrorWindow (measured from onset of red box)
incorrectChoiceErrors: all responses that are valid (aka: no premature Error nor a timeoutError) BUT
the incorrect response button was pressed
INSTRUCTIONS
provided by Millisecond Software - can be edited under section EDITABLE INSTRUCTIONS
EDITABLE CODE:
check below for (relatively) easily editable parameters, stimuli, instructions etc.
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment.
The parameters you can change are:
The parameters you can change are:
Interface:
/pos1_x: the first horizonal box position from the left in canvas width percentages (0% at the far left of canvas - 100% far right of canvas)
/pos2_x: the second horizonal box position from the left in canvas width percentages
/pos3_x: the third horizonal box position from the left in canvas width percentages
/pos4_x: the fourth horizonal box position from the left in canvas width percentages
/stimHeight: height of the boxes in canvas height percentages (default: 5%)
Response Keys (from left to right):
/responsekey1: scancode of the first response button (see Tool -> Keyboard Scancode)
/responsekey1_label: label of the scancode of the first response button
/responsekey2: scancode of the second response button
/responsekey2_label: label of the scancode of the second response button
/responsekey3: scancode of the third response button
/responsekey3_label: label of the scancode of the third response button
/responsekey4: scancode of the fourth response button
/responsekey4_label: label of the scancode of the fourth response button
Duration Parameters (in ms):
/SOA: Response Stimulus Interval in ms (interval between onset of gray boxes and onset of red box) (default: 500ms)
/prematureErrorWindow: responses made before the end of this window (measured in ms from onset of red box) are scored as premature errors (default: 100)
(Note: ALL responses BEFORE appearance of red box are automatically considered premature)
/timeoutErrorWindow: responses made after this response window (measured from onset of red box in ms) are considered 'timeOut Errors' (default: 1000ms)
Example: if a response is made 1000ms AFTER onset of red box, the response is scored as a timeout error.
/readyDuration: duration (in ms) of getting ready trial (default: 5000ms)
/feedbackDuration: duration (in ms) of feedback during the practice trials (default: 1000ms)
Trial Numbers:
/maxTrials: number of trials to run (default: 100)