User Manual: Inquisit Choice Reaction Time Test for the Touchscreen


__________________________________________________________________________________________________________________	

								* Choice Reaction Time Task (Touchscreen)*
___________________________________________________________________________________________________________________	

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 08-17-2018
last updated:  01-02-2025 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 01-02-2025 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	
This script implements a Choice Reaction Time Task for the touchscreen.
 
___________________________________________________________________________________________________________________
TASK DESCRIPTION
___________________________________________________________________________________________________________________	
Choice Reaction Time Task: press a home button that is presented within the half circle of 5 possible
response buttons until one of the response buttons turns yellow, then click the yellow response button 
as fast as possible

The Choice Reaction Time Task tracks the durations participants spent on various subtasks:
1. time spent on homeButton
2. time between onset of target stimulus and lifting finger off homeButton (A)
3. time between lifting finger off homeButton and pressing down on target stimulus (B)
4. time spent on target stimulus (C)
5. time between lifting finger off target stimulus and pressing down on homeButton (D)

Note: 
The stimuli in this script can be sized absolutely so that distances btw. buttons are the same
on each monitor. To do so, go to section Defaults for more information.

By default, this script uses proportional sizing; using 100% of the available screen height and
screen width = 4/3 * screen height (width:height: 4:3)

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

___________________________________________________________________________________________________________________	
DATA OUTPUT DICTIONARY
___________________________________________________________________________________________________________________	
The fields in the data files are:

(1) Raw data file: 'choicereactiontimetask_touchscreenRaw*.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. 
																			
										
list.practiceCorrect.mean:		stores the proportion correct of the last 5 responses during the current practice session

practicePass:					0 = participant did not pass practice criteria; 
								1 = participant passed practice criteria	

	
trialCount:						counts all trials (trial = current trial sequence) in a block
isi:							current interstimulus interval in ms
targetPosition:					response square 1-5
responseArea:					stores the response area clicked
								choice Reaction Time Task: 'target button' vs. 'elsewhere'  vs. " " (did not respond during response window)
																		
acc:							1=correct/right stimulus, 
								2="elsewhere" i.e. outside the stimulus; 
								3 = no response
									
finalAcc:						stores final correctness of response (1 = correct; 0 = incorrect)
								choice Reaction Time Task: correct = target is pressed
									
rt:								response time (in ms) from onset of Stim until the stim is pressed
								(rt is empty if the stim is not pressed)
									
rtDown1:						script.elapsedTime (in ms) of clicking home-button (measured relative to start of script in ms)
								!Note: if finger lifts off home button prior to Stim appearance, 
								rtDown1 resets to the moment the finger returns to the home button
								and isi is restarted from that moment.
										
rtUp1:							script.elapsedTime (in ms) of lifting finger off home-button (measured relative to start of script in ms)
								Note: rtUp1 is measured AFTER Stim appearance
										
rtDown2:						script.elapsedTime (in ms) of clicking stim-button or 'elsewhere' (measured relative to start of script in ms)
rtUp2:							script.elapsedTime (in ms) of lifting finger off stim-button or 'elsewhere' (measured relative to start of script in ms)

rtDown3:						script.elapsedTime (in ms) of clicking home-button after lifting finger off stim-button (measured relative to start of script in ms)					
								Note: if participants stays on home button until stim appears 
								rtDown3 is assigned rtDown1 of the next trial

stimPresentTime:				timestamp of target square (measured relative to start of script in ms):
								the time (in ms) measured from start of script until this target appeared on screen
									
a:		time (in ms) btw. onset of target button (stimPresentTime) and lifting finger off home button (rtUp1)
b:		time (in ms) btw taking finger off Home Button and pressing down on Stim Button
c:		time (in ms) finger spends on Stim Button (pressing down on stimulus to lifting off stimulus)
d:		time (in ms) btw taking finger off Stim Button and pressing down again on Home Button
									
durationHomeButton:		time (in ms) finger spent on homeButton
countEarlyResponses:		counts premature lift-offs (off homebutton) during the current trial
totalEarlyResponses:		counts premature lift-offs (off homebutton) across all test trials

	
(2) Summary data file: 'choicereactiontimetask_touchscreen_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)
																						
choiceRTDuration:					stores the duration (in ms) of the choice RT task (only test session; excludes demo & practice)

practicePassChoiceRT:				0 = participant did not pass practice criteria for choiceRT; 
									1 = participant passed practice criteria for choiceRT
									
meanRTChoiceRT:						mean latency (in ms) of pressing down on stim (latency measured from onset of target to 
									pressing down on it); only correct responses
									
accChoiceRT:						mean proportion correct (correct = target square was hit as opposed to elsewhere or no response)

totalEarlyResponsesChoiceRT:		counts premature lift-offs (off homebutton) across all test trials in the choiceRT task

only for responses with finalAcc = 1:
meanDurationA:				mean duration (in ms) btw. onset of target button (stimPresentTime) and lifting finger off home button
meanDurationB:				mean duration (in ms) btw taking finger off Home Button and pressing down on Stim Button
meanDurationC:				mean duration (in ms) finger spent on Stim Button
meanDurationD:				mean duration (in ms) btw taking finger off Stim Button and pressing down again on Home Button
									
meanDurationHomeButton:	mean duration (in ms) finger spent on homeButton

___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________

1. Intro with a demo: runs 2 demo trials for each participant regardless of performance

2. Practice:
- max. 10 trials
- Pass Criteria: 5 correct trials in a row (correct = finger lifts off home button after square appears and presses down on square within 5000ms)

3. Test: 20 trials (default; each response button runs 4 times)
- 4 isi (see list.isiChoiceRT: 1000ms, 3000, 2000ms, 4000ms), selected randomly
	
___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________	
provided 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:

// design parameters
/ button1ChoiceRT = true				//true (default) = button 1 (left button) is presented; false = button 1 not presented
/ button2ChoiceRT = true				//true (default) = button 2 is presented; false = button 2 not presented
/ button3ChoiceRT = true				//true (default) = button 3 (center button) is presented; false = button 3 not presented
/ button4ChoiceRT = true				//true (default) = button 4 is presented; false = button 4 not presented
/ button5ChoiceRT = true				//true (default) = button 5 (right button) is presented; false = button 5 not presented

/ numberTestTrials = 20					//the number of test trials run (default: 20)
										//Note: needs to be divisible by the number of presented responseButtons (responseaquares)

/ presentFinalRTFeedback = true			//true (1): participants receive feedback about their average (correct) reaction time 
										//at test termination (default)
										//false (0): no reaction time feedback is provided at the end

//color parameter
/ canvasColor = lightGray				//Display color of the actively used portion of the screen (the 'canvas')
										//Note: if set to a color other than the screenColor, you can distinguish the active canvas
										//from the inactive portion of the screen
									
/ screenColor = lightGray				//Color of the screen not used by the canvas ('inactive screen')
/ defaultTextColor = black				//Default color of text items

//CANVAS SIZING PARAMETERS
//sizing Parameters in RELATIVE measurements relative to CANVAS HEIGHT
//NOTE: to run the script with ABSOLUTE screen measurements, go to 'defaults' and set 
//canvasSize to absolute measurements

//sizing parameters
/ homeButtonSize = 15%				//the proportional size of the Home Button (relative to canvas) (default: 15%)
/ responseButtonSize = 15%			//the proportional size of the response squares (relative to canvas) (default: 15%)																	
/ homeButtonChoiceRTY = 50%			//the vertical position of the homeButton in the choice Reaction Time Task in canvas height% (default: 50%)
/ circleProportion = 0.3			//proportion of canvas height used for the circle radius of response buttons in choice Reaction Time Task (default: 0.4)

//timing parameters
/ feedback = 2000						//presents feedback (default: 2000ms)

/ homeButtonRW = 6000					//home button response window until a reminder is flashed onto the screen (default:  6000ms)
										//Note: the trial continues until the home button is pressed
												
/ stimRW = 6000							//response window after stim is presented (default: 6000ms)