User Manual: Inquisit Attentional Network Task - Revised with Mouse Tracking (ANT-R)


___________________________________________________________________________________________________________________	

								ATTENTION NETWORK TEST- Revised (ANT-R)
								*with mouse tracking*
___________________________________________________________________________________________________________________	

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date:	05-12-2015
last updated:  03-12-2024 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 03-12-2024 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	

This script implements the revised Attention Network Test (ANT-R); a behavioral measure of alerting, orienting and 
executive attention. The revised ANT paradigm expands the original ANT by providing additional conditions that 
allow the study of the relationship amongst the three attention networks in more detail. 
The implemented procedure is based on:

Fan, J., Gu, X., Guise, K.G., Liu, X., Fossella, J., Wang, H. & Posner, M.I. (2009).
Testing the behavioral interaction and integration of attentional networks.
Brain and Cognition, 70, 209–220.

The original ANT-R (e-prime, version 1) can be downloaded at: http://people.qc.cuny.edu/Faculty/Jin.Fan/Pages/Downloads.aspx

This script has been adapted to use mouse input instead of keyboard input in order to 
collect continuous mouse movements for mouse tracking (every 6-7ms), similarly to:

Yamauhi, T., Leontyev, A., & Razavi, M. (2019). Mouse Tracking Measures Reveal Cognitive Conflicts 
Better than Response Time and Accuracy Measures. In A.K. Goel, C.M. Seifert, & C. Freksa (Eds.), 
Proceedings of the 41st Annual Conference of the Cognitive Science Society
(pp. 3150-3156). Montreal, QB: Cognitive Science Society.

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________	

Participants are presented arrows either to the left or right to a fixation cross. Arrows may be flanked by other 
stimuli  (3 flanker conditions). Participants have to decide whether the arrows point right or left. 
Several cue conditions (6)  (may) alert the participants that the targets are about to come on screen 
and potentially where on the screen (above or below the fixation cross).
Once the targets come on screen, participants are asked to move the mouse as fast as possible to the
left and right response buttons at the top of the screen.

Differences in mean reaction times in the different cue/flanker conditions can be used to calculate
several Attentional Network Effects.

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

___________________________________________________________________________________________________________________	
DATA FILE INFORMATION 
___________________________________________________________________________________________________________________
The default data stored in the data files are:

(1) Raw data file: 'ant_r_mousetracking_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

blockcount:						counts the number of experimental blocks run
blockcode:						the name and number of the current block
trialcount:						counts the number of trials run (resets after practice)
trialcode: 						the name and number of the currently recorded trial

trialphase:						0 = starttrial; 1 = cue trial; 2 = targettrial (collects response)

startFixationDuration:			the duration (in ms) of the fixation cross that is presented after clicking on the next button
								(values are sampled from an exponential distribution with mean = 4000ms; range = 2000-12000ms)

cuecondition:					the current cue condition (1 = no cue; 2 = double cue; 3 = valid spatial cue1; 4 = valid spatial cue2, 5 = validspatialcue 3; 6 = invalid spatial cue)
cuevalidity:					the validity of the current cue
flankercongruence:				the current flanker congruence condition (1 = congruent => flanker and target point in same direction; 2 = incongruent)
targetposition:					current position of target (1 = right of fixation; 2 = left of fixation)
targetdirection:				the current direction of the target (1 = points to the right; 2 = points to the left)

locationcongruence:				1 = target direction and target position are congruent 
								(target points to left and sits to left of fixation; or target points to right and sits to the right of fixation cross); 
								2 = otherwise 

CT_ISI:							stores the current interstimulus interval between offset of cue and onset of target in ms

(parameter) target_duration:	the maximal duration of the target/flanker presentation in ms (default: 500ms)
(parameter) min_validlatency:	minimum response latency (in ms) that is considered valid and not anticipatory (default: 0) 

response:						the response of participant (scancode of response button: 18 = left E; 23 = right I)
latency:						response latency (in ms)
valid:							1 = valid latency (latency >= (parameter) min_validlatency); 0 = anticipatory latency
correct:						correct of response regardless of validity (1 = correct; 0 = error)
validcorrect:					correctness of responses taking latency into account (1 = correct AND valid; 0 = otherwise)

picture.flanker1.currentItem/
picture.flanker4.currentItem:	store the arrow images used as flanker1-flanker4 as well as the target

Variables that contain x/y coordinates for cues, targets, flankers:
target_x
flanker1_x
cue1_x

(2) Summary data file: 'ant_r_mousetracking_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)	

(parameter) min_validlatency:	minimum response latency (in ms) that is considered valid and not anticipatory (default: 0) 
trialcount:						counts the number of trials run, across testblocks 
overallpropcorrect:				total percent correct; across testblocks

Note: latency summary variables are based on correct and valid responses (latency >= (parameter) min_validlatency)
meanRT:			mean response latency (in ms) of correct and valid responses across testblocks
stdR:			standard deviation of latencies of correct and valid responses across testblocks


Attentional Network Effects: All effects are calculated based on the means of correct and valid responses:
(for interpretation, see Fan et al, 2009, p.212-213)

(1) Alerting Effect:
Alerting:				 		RTno-cue - RTdouble-cue						

(2) Orienting Effects:							
ValidityEffect:					RTinvalid cue - RTvalid cue 
MovingEngaging:					RTdouble-cue - RTvalid cue
Disengaging:					RTinvalid cue - RTdouble-cue
OrientingTime:					(RTvalid cue, 0 ms cue-to-targetinterval) - (RTvalid cue, 800 ms cue-to-target interval)

(3) Conflict (Cost) Effects:
FlankerConflictEffect:			RTflanker incongruent - RTflanker congruent
LocationConflictEffect:			RTlocation incongruent - RTlocation congruent

(4) Interaction Effects:
FlankerByLocation:				(RTflanker incongruent; location incongruent - RTflanker congruent; location incongruent) - (RTflanker incongruent; location congruent- RTflanker congruent; location congruent)
AlertingByFlankerConflict:		(RTno-cue, flanker incongruent - RTno-cue, flanker congruent) - (RTdouble-cue, flanker incongruent - RTdouble-cue, flankercongruent)
OrientingByFlankerConflict:		(RTdouble-cue, flanker incongruent - RTdouble-cue, flanker congruent) - (RTvalid cue, flanker incongruent - RTvalid cue, flanker congruent)
ValidityByFlankerConflict:		(RTinvalid cue, flanker incongruent -RTinvalid cue, flanker congruent) - (RTvalid cue, flanker incongruent - RT valid cue, flanker congruent)
AlertingByLocationConflict:		(RTno-cue, location incongruent - RTno-cue,location congruent) - (RTdouble-cue, location incongruent - RTdouble-cue, location congruent)
OrientingByLocationConflict:	(RTdouble-cue, location incongruent - RTdouble-cue, location congruent) - (RTvalid cue, location incongruent - RTvalid cue, location congruent)	
ValidityByLocationConflict:		(RTinvalid cue, location incongruent - RTinvalid cue, location congruent) - (RTvalid cue, location incongruent - RTvalid cue, location congruent)

IOR_Effect:						(RTinvalid cue, 0 ms cue-to-target interval - RTvalid cue, 0 ms cue-to-targetinterval) - (RTinvalid cue, 400 ms cue-to-target interval - RT valid cue, 400 ms cue-to-target interval)	


(3) Mouse Tracking data file: 'ant_r_mousetracking_stream*.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

blockcount:						counts the number of experimental blocks run
blockcode:						the name and number of the current block
trialcount:						counts the number of trials run (resets after practice)
trialcode: 						the name and number of the currently recorded trial

trialphase:						0 = starttrial; 1 = cue trial; 2 = targettrial (collects response)

startFixationDuration:			the duration (in ms) of the fixation cross that is presented after clicking on the next button
								(values are sampled from an exponential distribution with mean = 4000ms; range = 2000-12000ms)

cuecondition:					the current cue condition (1 = no cue; 2 = double cue; 3 = valid spatial cue1; 4 = valid spatial cue2, 5 = validspatialcue 3; 6 = invalid spatial cue)
cuevalidity:					the validity of the current cue
flankercongruence:				the current flanker congruence condition (1 = congruent => flanker and target point in same direction; 2 = incongruent)
targetposition:					current position of target (1 = right of fixation; 2 = left of fixation)
targetdirection:				the current direction of the target (1 = points to the right; 2 = points to the left)

locationcongruence:				1 = target direction and target position are congruent 
								(target points to left and sits to left of fixation; or target points to right and sits to the right of fixation cross); 
								2 = otherwise 
								
CT_ISI:							stores the current interstimulus interval between offset of cue and onset of target in ms								
								
//Mouse Coordinates:
mouse.x:						horizontal pixel mouse coordinate
mouse.y:						vertical pixel mouse coordinate

elapsedTime:					measures the script elapsedTime in ms from script start


___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	
"6"* cue conditions (no cue, double cue, invalid spatial cue, valid spatial cue) x 3 cue target ISI (0, 400, 800ms) x 2 flanker congruence (congruent, incongruent) x 2 location congruence (position and direction of target are congruent, incongruent)
within-subjects design

*Note: valid spatial cue trials are 1/2 of all the trials => valid spatial cue condition is treated as "3" conditions instead of just 1

A) Practice
Practice is run by script ANT_R_practice_mousetracking.iqx

B) 4 Blocks of 72 trial sequences each - no feedback (2 blocks use the same predetermined sequence, then they get repeated)
- 12 nocue; 12 doublecue; 12 invalid spatial cue; 36 valid spatial cues trials per block
Note: the valid spatial cue condition is split into 3 identical ones of 12 trials (=> for balancing purposes there are 6 cue types)
- conditions are counterbalanced across 2 blocks (144 trials)
		=> 3 Cue-Target ISI x 6 cue conditions (no cue, double cue, invalid spatial cue, 3*valid spatial cue) x 2 flanker conditions (congruent, incongruent) x 2 target position (left, right to fixation) x 2 target directions (arrow points right, left)

		TRIAL SEQUENCE (one sequence for each cue condition) - order is predetermined
		
		-> trialstart: press 'next' button
		
		-> upon clicking the next button, a fixation cross as well as the left and right presentation boxes are presented for
		a variable duration (duration is randomly sampled from an exponential distribution with mean = 4000ms;
		the durations are kept between 2000 - 12000ms)
		
		-> cue (100ms) -> random cue-target ISI (0, 400ms, 800ms) 
		-> target, flanker (500ms duration for target)-> until response (Note: timeout was removed for mouse tracking script)
		-> trialstart: press 'next' button
		-> etc.
		
		Note: the mouse cursor is forced on the center coordinates of the next button at time of
		target presentation. Thus, all participants start out at the same cursor position.
		
		
!Note: this script uses the predetermined trialsequences used in the original e-prime program 
(http://people.qc.cuny.edu/Faculty/Jin.Fan/Pages/Downloads.aspx)

___________________________________________________________________________________________________________________	
STIMULI
___________________________________________________________________________________________________________________
A) black rectangles on gray blackground to the left and right side of a fixation cross.
cues: one or both (or none) of these rectangles turns white for a brief amount of time
target/flanker: 5 black arrows presented in the center of the black rectangles

arrows are presented as images and can be exchanged under section EDITABLE STIMULI

B) Size of Stimuli:
Fan et al (2009) give specific dimensions of the size and distance of targets/flankers (p.211)

This script does NOT attempt to replicate these dimensions as different monitors require different fontsizes etc.
Fine-tune sizes of stimuli, distance of flanker to target, and position of target left and right to 
fixation cross under section EDITABLE values
Furthermore, the canvaswindow can be specified under section DEFAULTS

___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________
Instructions are modelled after the instructions in the original e-prime program
at: http://people.qc.cuny.edu/Faculty/Jin.Fan/Pages/Downloads.aspx

___________________________________________________________________________________________________________________	
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:
Stimuli Dimension/Placement: change settings below
/fontsize_fixation:						regulates the size of the fixation cross, in canvas height percentage (default:  5%)
/picturesize:							regulates the size of the target/flanker, in canvas height percentage (default: 5%)
/flankerdistance:						the relative screen distance between stimuli, in canvas width percentage (default: 5%)
/left_x:								the y-coordinate of the target left of the fixation cross (default: 30%)
/right_x:								the y-coordinate of the target right of the fixation cross (default: 70%)
/cue_width:								the width of the cue-box in canvas width percentage (32%)
/cue_height:							the height of the cue-box in canvas height percentage (10%)

static Trial Durations:
/fixation_blockstart:					duration of first fixation cross in the block in ms (default: 3000ms)
/cue_duration:							sets the duration of the cue presentation in ms (default: 100ms)
/target_duration:						sets the maximal duration of the target/flanker presentation in ms (default: 500ms)
/min_validlatency:						minimum response latency (in ms) that is considered valid and not anticipatory (default: 0)