User Manual for Inquisit's Four Choice Reaction Time Task


___________________________________________________________________________________________________________________	

						Four Choice Reaction Time Task - Keyboard Input
___________________________________________________________________________________________________________________	

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 04-11-2017
last updated:  02-22-2022 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 02-22-2022 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________
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 DESCRIPTION	
___________________________________________________________________________________________________________________
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.

___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. 2.5 minutes to complete

___________________________________________________________________________________________________________________	
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:						The specific Inquisit version used (the 'build') that was run
computer.platform:			the platform the script was run on (win/mac/ios/android)
date, time: 				date and time script was run 
subject, group: 			with the current subject/groupnumber
session:					with the current session id

blockcode, blocknum:		the name and number of the current block (built-in Inquisit variable)
trialcode, trialnum: 		the name and number of the currently recorded trial (built-in Inquisit variable)
								Note: trialnum is a built-in Inquisit variable; it counts all trials run; even those
								that do not store data to the data file such as feedback trials. Thus, trialnum 
								may not reflect the number of main trials run per block. 
										
										
totalTrialcount:			number of test trials run
position:					1, 2, 3, or 4 => screen position of the stim from left to right

response:					the participant's response (scancode of response button)
							32 = D (left middle finger)
							33 = F (left index finger)
							36 = J (right index finger)
							37 = K (right middle finger)

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: rt < parameters.prematureErrorWindow)
							0 = otherwise;
									
timeoutError:				1 = a timeout error was made; 
							(timeout error: rt > parameters.timeoutErrorWindow)
							0 = otherwise;
									
incorrectChoice:			1 = a valid (neither premature nor timeout response) but incorrect response was made; 
							0 = otherwise

ACC:						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)*

inquisit.version: 			Inquisit version run
computer.platform:		the platform the script was run on (win/mac/ios/android)
startdate:				date script was run
starttime:				time script was started
subjectid:				assigned subject id number
groupid:				assigned group id number
sessionid:				assigned session id number
elapsedtime:			time it took to run script (in ms); measured from onset to offset of script
completed:				0 = script was not completed (prematurely aborted); 
						1 = script was completed (all conditions run)
									
totalTrialcount:		number of test trials run 
propCorrect:			proportion correct responses (correct in terms of response button and timing of response)
meanRT:					the average reaction time (in ms) of correct responses
SD:						the standard deviation of correct response reaction times 									
									
propPrematureErrors:	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:
																
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:					the first response button ("D"); furthest left
/responsekey2:					the second response button ("F")
/responsekey3:					the third response button ("J")
/responsekey4:					the fourth response button ("K"); furthest right

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 fro m  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)