User Manual: Inquisit Monetary Incentive Delay Task (GO/NO GO)


___________________________________________________________________________________________________________________	

								MONETARY INCENTIVE DELAY GONOGO TASK
___________________________________________________________________________________________________________________	

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 09-15-2016
last updated:  10-03-2024 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 10-03-2024 Millisecond Software
Millisecond Software thanks Ricardo Wilhelm for his collaboration on this script!

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	
This script implements the Monetary Incentive Delay GoNogo Task; a task to induce anticipation of reward and 
punishment within the inhibition and control framework of a go/nogo task. 

The implemented procedure is based on:

Behan, B., Stone, A., and Garavan, H. (2015). Right Prefrontal and Ventral Striatum Interactions
Underlying Impulsive Choice and Impulsive Responding. Human Brain Mapping, 36, 187–198.

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________	
Participants work through a cued gongo task with certain (= always followed by a go target) and uncertain 
(= half followed by a go and half are followed by a nogo target) go cues.
Half the go cues (e.g. all green go cues) result in the possibility of a monetary reward,
half the nogo cues (e.g. all green nogo cues) result in the possibility of a monetary loss.
In a typical trial, participants see a fixation cross followed by a cue (either a square or a circle in 
either blue or green) for a variable time. The target (either a star = go or a stop sign = nogo) follows the cue.
When participants see the star, they have to press the Spacebar as fast as possible. If the color of the cue
was green, they will earn money for a hit response.
When participants see the stop sign, they have to withold the response. If the color of the cue was green,
they will lose money for a false alarm response but gain money for a correct rejection.

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

Intro+ Practice: ~ 5min
1 Testblock: ~ 7min (x5)
___________________________
Total: ~40min

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

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

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.
									
										
certainGoShape:					the shape of the certain Go shape
uncertainGoShape:				the shape of the uncertain Go shape
rewardColor:					the color of the shapes that get reinforced
neutralColor:					the color of the reinforcement neutral shapes

trialType:						"CCGo" (certain cue), "UCGo" (uncertain cue->go), "UCNogo" (uncertain cue-> nogo)
fixationDuration:				the duration (in ms) of the fixation cross

cue:							1 = green square; 
								2 = blue square; 
								3 = green circle; 
								4 = blue circle
									
cueShape:						stores the shape of the cue
cueColor:						stores the color of the cue
cueDuration:					the duration (in ms) of the cue
reinforcement:					"reward" vs. "neutral"

target:							0 = star (go); 
								1 = stop (nogo)
									
targetStim:						stores the target image presented
goResponseWindow:				the current response window (in ms) for go trials
response:						the participant's response
correct:						the correctness of the response (1 = correct; 0 = incorrect)
latency: 						the response latency (in ms)

feedback:						0 = gain; 
								1 = loss; 
								2 = happy; 
								3 = sad
									
feedbackDuration:				the current duration (in ms) of feedback stimulus
total:							the total earned


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

certainGoShape:					the shape of the certain Go shape
uncertainGoShape:				the shape of the uncertain Go shape
rewardColor:					the color of the shapes that get reinforced
neutralColor:					the color of the reinforcement neutral shapes

propCorrect:					proportion correct response across all go and nogo trials
meanRT:							mean hit latency (in ms) across all go trials
sd:								standard deviation of all hit latencies (across all go trials)

cc: certain cue (for a go-trial),
uc: uncertain cue (could be followed by a go or nogo trial)

omissionsCCGo:				number of omission errors in certain cue go-trials
rOmmissionCCGo:				omission error rate in certain cue go-trials
rHitCCGo:					hit rate in certain cue go-trials

omissionsUCGo:				number of omission errors in UCGo trials
rOmissionUCGo:				omission error rate in UCGo trials
rHitUCGo:					hit rate in UCGo trials
commissionsUCNoGo:			number of commission errors in UCNogo trials
rCommissionUCNoGo:			commission error rate in UCNogo trials
rCorrRejectUCNoGo:			correct rejection rate in UCNogo trials

//Signal detection measures
zHitRateUC: 				z-score of the rHitUCGo
zFaRateUC:					z-score of the commissionsUCNogo
					
Note: *Adjustments to z-scores as recommended by:
Gregg, A. & Sedikides, C. (2010). Narcissistic Fragility:
Rethinking Its Links to Explicit and Implicit Self-esteem, Self and Identity, 9:2, 142-161 (p.148)										
=> Adjustments are made if the  FArate (hitRate) = 0 (increased to 0.005) or 1 (decreased to 0.995)*

dPrimeUC:	Computes d' (parametric measure of discriminability btw. signals and noise) for UC (uncertain cue) Trials
			=> Range (in this script): 
			-5.1516586840152740479 <= dprime <= 5.1516586840152740479 (=perfect performance)
			=> The higher the value, the better signals (go stims) were  distinguished from noise (nogo stims)
			(d' = 0: chance performance; negative d-primes: participant treated nontargets as targets and targets as nontargets)
													
cUC: 		c-criterion in signal detection:The absolute value of c provides an indication of the strength of
			the response bias/response style for UC (uncertain cue) Trials
			negative: participant more likely to report that signal (go stims) is present (liberal response style);
			may favor faster responding in speed-accuracy trade-off response paradigms
			positive: favoring caution (conservative response style)

//Response Time Data:
meanRTCCGo:					mean hit latency (in ms) in CCGo trials
sdCCGo:						standard deviation of all CCGo hit latencies
meanRTUCGo:					mean hit latency (in ms) in UCGo trials
sdUCGo:						standard deviation of all UCGo hit latencies

* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions

___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________

2 cue shapes (square vs. circle):
- certain cue (here: square)
- uncertain cue (here: circle)

2 cue reward colors (green vs. blue)
- monetary reinforced (reward, here: green)
- no monetary reinforcement (neutral, here: blue)

6 trial types:
CCGo_reward: certain go cue, can result in a monetary gain but no monetary loss
CCGo_neutral: certain go cue, cannot result in a monetary gain nor in a monetary loss
UCGo_reward: uncertain go cue with go target, can result in a monetary gain but no monetary loss
UCGo_neutral: uncertain go cue with go target, cannot result in a monetary gain nor in a monetary loss
UCNogo_reward: uncertain go cue with nogo target, can result in a monetary loss OR a monetary gain
UCNogo_neutral: uncertain go cue with nogo target, cannot result in a monetary loss nor in a monetary gain

1. Practice Block: 12 trials (2 of each trialtype)
2. 5 Test Blocks of 30 trials (5 of each trialtype) = 150 test trials total 
(number of testblocks/number of trials per block are editable under section Editable Parameters)
- the order of the 6 trial types is randomized 

!!!Note: the script is set up in such a way that the following constraints can be imposed on the sampling process:
	- no repeats of the same trials
	- A UCGo_reward and UCNogo_reward trials are not presented one after another
	- A UCGo_neutral and UCNogo_neutral trials are not presented one after another
Since sampling is done on the fly - in some circumstances not all constraints might be fulfilled.
To add those constraints, go to list.midRunTrialOrder under section 'BLOCKS' and follow instructions.


- 6 different fixation cross durations/cue durations are used an equal number of times within each block (see section Editable Lists)
- go target duration (= variable response window): starts at 400ms and decreases by 50ms with each hit and increases by 50ms with each miss
- nogo target duration (= constant response window): stays at 600ms
- go feedback: duration + last responsewindow = 2000ms
- nogo feedback: duration + last responsewindow = 2000 (because responsewindow stays constant, feedback duration stays constant)

Trial Sequence:
fixation cross (btw. 2.2s-7.5s) -> cue (btw. 2.5s-7.5s) -> target (go target: dynamically adapted response window; nogo target: 600ms response window)-> feedback (go feedback: dynamically adapted duration ; nogo feedback; 1400ms)

___________________________________________________________________________________________________________________
STIMULI
___________________________________________________________________________________________________________________
provided by Millisecond Software, see section Editable Stimuli

___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________
provided by Millisecond Software in the form of htm-files, 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:

//responsekey
/goKey:							the go-response key (default: " " -> Spacebar)

//sizing parameters
/fixationSize:					proportional sizing of fixation cross (default: 5% of canvas height)
/cueSize:						proportional sizing of cue size (default: 20% of canvas height)
/targetSize:					proportional sizing of target size (default: 20% of canvas height)
/feedbackSize:					proportional sizing of feedback image size (default: 20% of canvas height)

//timing parameters
/startGOResponseWindow:			start duration (in ms) of go response window (default: 400ms)
/noGoResponseWindow:			constant duration (in ms) of nogo response window (default: 600ms)
/goRWAdjustment:				duration adjustment (in ms) of the go response window (default: 50ms)

/defaultFeedbackDuration:		default feedback duration (in ms) (default: 1400ms)
									Note: the feedback duration will get increased by the current response window

/ getReadyDurationMS:			the duration (in ms) of the get-ready trial (default: 2000ms)								

//design parameters:									
/monetaryGain:					the monetary gain for a go hit/nogo correction rejection in the reward condition (default: 0.2)
/monetaryLoss:					the monetary loss for a nogo false alarm in the reward condition (default: 0.4)


/numberOfTestBlocks:			sets the number of test blocks run (default: 5)

/numberOfTestTrials:			sets the number of test trials run per test block (default: 30)
									Note: needs to be a multiple of 6