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: 02-06-2024 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 02-06-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 OUTPUT DICTIONARY
___________________________________________________________________________________________________________________

The fields in the data files are:

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

blockCounter:						counts the number of experimental blocks run
blockCode:						the name and number of the current block
trialCounter:						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 

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

(parameter) targetDuration:	the maximal duration of the target/flanker presentation in ms (default: 500ms)
(parameter) minValidLatency:	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) minValidLatency); 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:
targetX:
flanker1X:
cue1X:

(2) Summary data file: 'antRmousetrackingsummary*.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) minValidLatency:	minimum response latency (in ms) that is considered valid and not anticipatory (default: 0) 
trialCounter:						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) minValidLatency)
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)

iorEffect:						(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: 'antRmousetrackingstream*.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

blockCounter:						counts the number of experimental blocks run
blockCode:						the name and number of the current block
trialCounter:						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 
								
cueTargetISI:							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 antRpracticemousetracking.iqjs

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
/fontSizeFixation:						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%)
/leftX:								the y-coordinate of the target left of the fixation cross (default: 30%)
/rightX:								the y-coordinate of the target right of the fixation cross (default: 70%)
/cueWidth:								the width of the cue-box in canvas width percentage (32%)
/cueHeight:							the height of the cue-box in canvas height percentage (10%)

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