Return to the Cued Go/No-Go Task page
___________________________________________________________________________________________________________________	

									Cued Go / No-Go Task
___________________________________________________________________________________________________________________

last updated:  03-09-2020 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC
Script Copyright © 03-09-2020 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________
Go/Nogo Tasks are used as behavioral measures of inhibition and cognitive control. 											
This script implements a probability based cued Go / No-Go Task that presents 
a) cues that predict go trials with a high probability ('go cue') and b) cues that predict nogo 
trials with a high probability ('nogo cue'). 
In general, commission errors are of particular interest in all Go/Nogo tasks as a measure of cognitive
control. In cued Go/Nogo tasks, go-cues are thought to generate a response prepotency that
speed up correct responses in go-trials but add an additional difficulty to overcome in subsequent
nogo trials and therefore increase the likelihood of commission errors.
As a result, the cued go/nogo paradigm provides a sensitive measure of cognitive control.

The implemented procedure is based on:

Fillmore, M. T., Rush, C. R., & Hays, L. (2006). Acute effects of cocaine in two models of inhibitory control: 
implications of non-linear dose effects. Addiction, 101, 1323–1332.

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________
Participants are asked to press the Spacebar when they see a green rectangle (=go) but refrain from pressing the Spacebar
when they see a blue rectangle (=nogo). The blue and green rectangles can be vertical or horizontal. The 
vertical rectangle has a high probability of being green (a go trial) and the horizontal rectangle has a high probability of
being blue (a nogo trial). Participants get information about the orientation of the rectangle (=cue) shortly before 
the color of the rectangle is revealed.

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

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

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

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. 
										
trialcount:							current trialcount

cuetype:							1 = vertical cue (high probability of preceding a go-trial ~ a go cue)
									2 = horizontal cue (high probability of preceding a nogo-trial ~ a nogo cue)

targettype:							1 = vertical go
									2 = vertical nogo
									3 = horizonal go
									4 = horizonal nogo
								
targetcondition:					1 = go target
									2 = nogo target
									
soa:								current stimulus onset asynchrony
cuepic:								the image file presented as the cue
targetpic:							the image file presented as the target	

response:							response made (either 57 = Spacebar or "" for no response)
correct:							the accuracy of response (1 = correct; 0 = error)
latency:							the latency (in ms) of the response (or if no response: trialduration); measured from onset of target


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

errorrate:							overall error rate (omission + commission errors)
omissionrate:						error rate in go-trials (participant missed to press Spacebar)
commission:							error rate in nogo trials (participants hit the Spacebar)

error_verticalcue:					error rate for trials in which cue = vertical
error_horizontalcue:				error rate for trials in which cue = horizontal
omissionerror_v:					error rate for trials in which cue = vertical ('go' cue) and target = go
commission_v:						error rate for trials in which cue = vertical ('go' cue) and target = nogo (DV of interest)
omissionerror_h:					error rate for trials in which cue = horizontal ('nogo' cue) and target = go
commission_h:						error rate for trials in which cue = horizontal ('nogo' cue) and target = nogo

meanrt:								overall mean rt (in ms) for target = go (for hits = correct responses only)
meanrt_verticalcue_gotarget:		mean rt (in ms) for trial in which cue = vertical (go cue) and target = go (for hits = correct responses only)
meanrt_horizontalcue_gotarget:		mean rt (in ms) for trial in which cue = horizontal (nogo cue) and target = go (for hits = correct responses only)

___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	

Factorial design with
	5 x SOA (100,200,300,400,500)
	2 x Cue (1=vertical,2=horizontal)
	2 x Target (Go, No-Go)

	Vertical cue go / no-go ratio is 4:1 (80% go trials, 20% no-go trials) => higher probability of go trials after vertical cue
	Horizontal cue go / no-go ratio is 1:4 (20% go trials, 80% no-go trials) => higher probability of nogo trials after horizontal cue

	Minimum number of trials required to fulfill the above conditions is 50.
	Task runs 250 trials, i.e., each factor combination is repeated 5 times.

	=> 100 vertical cue-go targets (20 for each SOA); 25 vertical cue-nogo targets (5 for each SOA)
	=> 100 horizontal cue-nogo targets (20 for each SOA); 25 horizontal cue-go targets (5 for each SOA)
	
___________________________________________________________________________________________________________________	
STIMULI
___________________________________________________________________________________________________________________	
see section Editable Stimuli

___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________	
see 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:

/ fixationduration:				duration of the fixation cross in ms (default: 800)
/ cue_delay:					interstimulus interval between offset of fixation and onset of cue in ms (default: 500ms)
/ responsetimeout:				responsetimeout in ms (default: 1000)
/ iti:							intertrial interval in ms (default: 700)