Return to the Attentional Network Task - Revised (ANT-R) page
___________________________________________________________________________________________________________________	

								ATTENTION NETWORK TEST- Revised (ANT-R)
___________________________________________________________________________________________________________________	

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

Script Copyright © 05-19-2020 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

___________________________________________________________________________________________________________________
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).

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_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
script.sessionid:					with the current session id

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


values.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)
values.cuevalidity:					the validity of the current cue
values.flankercongruence:			the current flanker congruence condition (1 = congruent => flanker and target point in same direction; 2 = incongruent)
values.targetposition:				current position of target (1 = right of fixation; 2 = left of fixation)
values.targetdirection:				the current direction of the target (1 = points to the right; 2 = points to the left)

values.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 

values.CT_ISI:						stores the current interstimulus interval between offset of cue and onset of target in ms
parameters.target_duration:			the maximal duration of the target/flanker presentation in ms (default: 500ms)
parameters.responsewindow:			maximum amount of time (in ms) participant can respond after target onset (default: 1700ms)
values.TC_ISI:						stores the current interstimulus interval between offset of target and onset of next cue in ms
parameters.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)
values.valid:						1 = valid latency (latency >= parameters.min_validlatency); 0 = anticipatory latency
correct:							correct of response regardless of validity (1 = correct; 0 = error)
values.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_summary*.iqdat' (a separate file for each participant)

computer.platform:					the platform the script was run on (win/mac/ios/android)
script.startdate:					date script was run
script.starttime:					time script was started
script.subjectid:					assigned subject id number
script.groupid:						assigned group id number
script.sessionid:					assigned session id number
script.elapsedtime:					time it took to run script (in ms); measured from onset to offset of script
script.completed:					0 = script was not completed (prematurely aborted); 
									1 = script was completed (all conditions run)

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

Note: latency summary variables are based on correct and valid responses (latency >= parameters.min_validlatency)
expressions.meanRT:					mean response latency (in ms) of correct and valid responses across testblocks
expressions.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)	

___________________________________________________________________________________________________________________	
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.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
		cue (100ms) -> random cue-target ISI (0, 400ms, 800ms) -> target, flanker (500ms duration for target, 1700ms response window, measured at onset of target)-> random target-cue ISI (measured from offset of target; not end of trial)
		
!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)
/responsewindow:						sets the maximal amount of time (in ms) participant can respond after target onset (default: 1700ms)
/min_validlatency:						minimum response latency (in ms) that is considered valid and not anticipatory (default: 0) 

Response Keys:

/responsekey_left:						the left response key (default: "E")
/responsekey_right:						the right response key (default: "I")