User Manual: Inquisit Affective Go/No Go Task


___________________________________________________________________________________________________________________	

									Affective Go/Nogo Task
___________________________________________________________________________________________________________________	

script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 08-15-2018
last updated:  03-08-2024 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 03-08-2024 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________
Go/Nogo Tasks are used as behavioral measures of inhibition and cognitive control. 
This script implements a Go/Nogo Task procedure to study inhibition in the context of valenced stimuli.

The implemented procedure is based on:

Chuang, Jie-Yu et al (2017). Adolescent Major Depressive Disorder: Neuroimaging Evidence of Sex Difference during an 
Affective Go/No-Go Task. Frontiers in Psychiatry, 8, 1-12.   

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________	
Participants view positive, negative or neutral words and are asked to: 
Condition 1: press the space bar when they see a positive word ("go") and only then (nogo words: neutral words)
Condition 2: press the space bar when they see a neutral word ("go") and only then (nogo words: positive words)
Condition 3: press the space bar when they see a positive word ("go") and only then (nogo words: negative words)
Condition 4: press the space bar when they see a negative word ("go") and only then (nogo words: positive words)
Condition 5: press the space bar when they see a negative word ("go") and only then (nogo words: neutral words)
Condition 6: press the space bar when they see a neutral word ("go") and only then (nogo words: negative words)

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

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

(1) Raw data file: 'affectivegonogo_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 (winmaciosandroid)
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. 
									
condition:						HN: go = positivehappy; nogo = neutral (by default: positive words are repeated twice after reset; neutral words are repeated once)
								NH: go = neutral; nogo = positive (by default: neutral words are repeated twice after reset; positive words are repeated once)
								HS: go = positivehappy; nogo = negative (by default: positive words are repeated twice after reset; negative words are repeated once)
								SH: go = negativesad; nogo = positive (by default: negative words are repeated twice after reset; positive words are repeated once)
								SN: go = negativesad; nogo = neutral (by default: negative words are repeated twice after reset; neutral words are repeated once)
								NS: go = neutral; nogo = negative (by default: neutral words are repeated twice after reset; negative words are repeated once)										
									
									
GoStim:							"NEUTRAL" vs. "HAPPY" vs. "SAD" (current go words)
NoGoStim:						"NEUTRAL" vs. "HAPPY" vs. "SAD" (current nogo words)
iti:							current intertrial interval in ms (default: 0)
word:							the currently presented word
response:						Scancode of the pressed response key (Example:)
									57 = space bar
									0 = no response
									(21 = Y; 49 = N)
									
correct:						accuracy of response: 1 = correct response; 0 = otherwise

responseCategory:				go trials: HIT (correctly pressing response key), MISS (response key was not pressed); 
								nogo trials: FA (false alarm = incorrectly pressing response key), CR (correct rejection: response key was not pressed)
								
latency: 						the latency (in ms) of the current trial (does not have to be a go, nogo trial)

respRT:							response time (in ms) of current practice and test gonogo trials, 
								measured from onset of word until response (Note: if no response, 'response RT' is empty)
								

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


Note: this script does not remove outliers
Note: the following expressions calculate z-scores based on hit and FA rate.(see Gregg & Sedikides, 2010, p.148)
If the hitrate or FA rate is 0 => 0.005 is used instead
IF the hitrate or FA rate is 1.0 => 0.995 is used instead

Reference:
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)


hitrate:			the overall hitrate across all blocks (hit = pressing space bar for go stimuli)
z_hitrate:			the z-score of the overall hitrate
FArate:				the overall False Alarm rate across all blocks (FA = pressing space bar for nogo stimuli)
z_FA:				the z-score of the overall FA rate
dprime:				difference btw. (zscore of hitrate - zscore of FArate): measure of Sensitivity
									=> Range (in this script): 
									-5.1516586840152740479 <= dprime <= 5.1516586840152740479 (=perfect performance)
									=> The higher the value, the better signals  were overall distinguished from noise 
									(d' = 0: chance performance; negative d-primes: participant treated nontargets as targets and targets as nontargets)									
									

mean_hitRT:			the overall mean hit response time (in ms) 
SD_hitRT:			standard deviation of the hit response times across blocks (in ms)

hitrate_HN:			the hitrate in HN block  (go: positivehappy words, nogo: neutral words)
								Omission rate = 1- hitrate
									
z_hitrate_HN:		the z-score of the HN hitrate
FArate_HN:			the false alarm rate (commission rate) in HN block
z_FA_HN:			the z-score of the HN FA-rate

dprime_HN:			difference btw. (z_hitrate - z_FA) in HN block: measure of Sensitivity
									=> Range (in this script): 
									-5.1516586840152740479 <= dprime <= 5.1516586840152740479 (=perfect performance)
									=> The higher the value, the better signals  (happy words) were overall distinguished from noise (neutral words)
									(d' = 0: chance performance; negative d-primes: participant treated nontargets as targets and targets as nontargets)
									
hitRT_HN:			mean hit response time (in ms) in HN block
(same for all other conditions)

HN: positive/happy GO, neutral NOGO
NH: neutral GO, positivehappy NOGO
HS: positive/happy GO, negativesad NOGO
SH: negative/sad GO, positivehappy NOGO
SN: negative/sad GO, neutral NOGO
NS: neutral GO, negativesad NOGO

* 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 
___________________________________________________________________________________________________________________	

Practice: optional (see parameters.runPractice)
* 10 trials (5 go, 5 nogo)
* script uses 'living things' as GO stimuli and 'non-living things' as NOGO stimuli
* provides feedback

Test: 
* 3 rounds of testing 
* each round consists of 6 Conditions (Note: this script does not run the 7th condition run by Chuang et al): 
order of conditions is randomly determined
HN: go = positive/happy; nogo = neutral (by default: positive words are repeated twice after reset; neutral words are repeated once)
NH: go = neutral; nogo = positive (by default: neutral words are repeated twice after reset; positive words are repeated once)
HS: go = positive/happy; nogo = negative (by default: positive words are repeated twice after reset; negative words are repeated once)
SH: go = negative/sad; nogo = positive (by default: negative words are repeated twice after reset; positive words are repeated once)
SN: go = negative/sad; nogo = neutral (by default: negative words are repeated twice after reset; neutral words are repeated once)
NS: go = neutral; nogo = negative (by default: neutral words are repeated twice after reset; negative words are repeated once)

* Each condition runs 20 trials (10 go trials, 10 nogo trial); trial order of go-nogo trials is generated at random
(go: nogo ratio can be changed under section BLOCKS)
* each condition runs all 10 stimuli of the GO and NOGO category once


Default Trial Sequence:
word (450ms) -> clearScreen (750ms): response timeout after 1200ms
-> iti = 0 (see list.iti) (iti presents clearScreen)

___________________________________________________________________________________________________________________	
STIMULI
___________________________________________________________________________________________________________________
provided by Millisecond Software - can be edited/exchanged under section Editable Stimuli

words selected from: 
Bradley, M.M., & Lang, P.J. (1999). Affective norms for English words (ANEW): Instruction
manual and affective ratings. Technical Report C-1, The Center for Research in
Psychophysiology, University of Florida.

The words are roughly matched in mean valence and mean length
10 negative words (scale: 1-9): mean valence: 1.47 (range: 1.25-1.61), mean length: 6.8
10 neutral words (scale: 1-9): mean valence: 5 (range: 4.95-5.05), mean length: 6.1
10 positive words (scale: 1-9): mean valence: 8.57 (range: 8.39-8.82), mean length: 7

___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________
provided by Millisecond Software - can be edited under 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:

/fixationSize:				proportional sizing of fixation cross (relative to canvas height) (default: 10%)
/wordSize:					proportional sizing of words (relative to canvas height) (default: 8%)

/runPractice:				true: script runs a short practice session with item.practice as the go items
							false: script does not run a practice session

/practiceFeedbackDuration:	the duration (in ms) of the correct practice Feedback (default: 1000ms)
								Note: error feedback terminates by space bar press
								
/getReadyDuration:			the  duration (in ms) of the 'ready' trial (default: 5000ms)
/startFixation:				the duration (in ms) of the first fixation cross in a block (default: 2500ms)
/endFixation:				the duration (in ms) of the last (red) fixation cross in a block (default: 2000ms)
/stimDuration:				the duration (in ms) of the words (default: 450ms)
/responseDuration:			the response timeout (in ms), measured from onset of word (default: 1200ms)
								Note: for a stim duration of 500ms, a blank screen is presented for the remaining 1000ms

/goKey:						go-key (default: " " = space bar)