Return to the The Go/No-go Association Task page
___________________________________________________________________________________________________________________	

									GNAT Demonstration Program
___________________________________________________________________________________________________________________

original Script Author: Brian Nosek (nosek@virginia.edu)
Date: 10/29/2000
last updated:  03-09-2020 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 03-09-2020 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________
This script implements a demo for the Go-Nogo Association Task (GNAT) using categories 'fruit' and 'insects'
as two target categories.

The GNAT uses the Go-Nogo framework of responding to signal and noise stimuli to investigate implicit bias 
towards a target category. In contrast to reaction time based tests of implicit bias (e.g. Implicit Association Test), 
the GNAT framework mainly focuses on accuracy data and specifically d prime measures 
(measures of sensitivity to distinguish signals from noise in signal detection theory) to infer implicit bias. 

For example, a positive association of 'fruit' (the target signal) is suggested if the dprime measure in the condition
'Fruit-Good' (aka both Fruit and good attributes are signals) is greater than the dprime measure in the 
condition 'Fruit-Bad'  (aka both fruit and bad attributes are signals).


Literature Reference:
Nosek, B. A., & Banaji, M. R. (2001). The go/no-go association task.  Social Cognition, 19(6), 625-666. 

Adjustments to z-scores as described 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)


*Note (by B. Nosek - original script author): 
This task is for demonstration purposes only.  Using the GNAT for research 
requires intentional decisions about numerous design parameters.  Discussion of 
some of those parameters can be found in Nosek and Banaji (2001; Social Cognition).
This example is a minimalist example and is not designed to maximize reliability, it
only demonstrates the core properties of the task.


Additional Notes (K. Borchert, Millisecond Software):
GNATdemo.iqx was edited to allow for:
- easy changes in GNAT target categories (under Editable Stimuli)
- easy changes in response timeouts (under Editable Parameters)
	-> by default the task is set up to run 2 different response timeouts (750ms vs. 600ms) for critical testblocks
- easy setting of target vs. noise response timeouts (see Experiment 5 in Nosek & Banaji, 2001)
	-> by default, response timeouts for target and noise trials are the same
- easy changes in interstimulus intervals (time btw. offset of one stimulus and onset of the next) (under Editable Parameters)
- recorded correct responses reflect the actual accuracy of the participant's response while keeping feedback accurate
- includes summary variables (hits and false alarm counts/rates)

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________
Participants are asked to categorize attributes (e.g. "happy"; "unhappy") and target items (e.g fruits "apple"; insects "bug") 
into predetermined categories via keystroke presses. The basic task is to press the Spacebar if an item (e.g. "happy")
belongs to the category currently being tested (e.g. "Good") and to do nothing if it doesn't.
For practice, participants sort items into categories "Good", "Bad", "Fruit", and "Insect".
For the test, participants are asked to sort categories into the paired/combined categories (e.g. 
"Fruit OR Good"). When an item belongs to either one of these two categories,  participants should press the Spacebar.

___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. 20 minutes to complete
___________________________________________________________________________________________________________________	
DATA FILE INFORMATION 
___________________________________________________________________________________________________________________
The default data stored in the data files are:

(1) Raw data file: 'gnatdemo_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. 
										
phase:								"training" (one category) vs. "test" (two categories)										

responsetimeout_target:				time in ms that is allowed for response in a given target trial
responsetimeout_noise:				time in ms that is allowed for response in a given noise trial

signal:						  		1 = signal trial (spacebar response is correct); 
									0 = noise trial (no response is correct)
															
targettype:							"A" vs. "B" (here: A-insects; B-fruit)

pairing:							"AA" -> targetA-attributeA (here: insects and good)
									"AB" -> targetA-attributeB (here: insects and bad)
									"BA" -> targetB-attributeA (here: fruit-good)
									"BB" -> targetB-attributeB (here: fruit-bad)
									
trialtype:							training phase: "training"
									test phase: "practice" vs. "test"

stimulusitem:						the presented stimulusitems in order of presentation in stimulusframes (see trials)
response:							response made (either 57 = Spacebar or 0 for no response)
correct:							the accuracy of response (1 = correct; 0 = error)
latency:							the latency of the response in ms (or if no response: response timeout duration)


(2) Summary data file: 'gnatdemo_summary*.iqdat' (a separate file for each participant)

Computer Platform:					the platform the script was run on (win/mac/ios/android)
Date:								date script was run
Time:								time script was started
Subject ID:							assigned subject id number
Group ID:							assigned group id number
Session ID:							assigned session id number
Script Duration:					time it took to run script (in ms); measured from onset to offset of script
Script Completion:					0 = script was not completed (prematurely aborted); 
									1 = script was completed (all conditions run)

parameters.responsetimeout2_signal:		stores the response timeouts in ms used for signals in the first gnat round (2 blocks) in this script (default: 700ms)
parameters.responsetimeout2_noise:		stores the response timeouts in ms used for noise in the first gnat round (2 blocks) in this script (default: 700ms)
parameters.responsetimeout3_signal:		stores the response timeouts in ms used in this study for signals in the second gnat round (2 blocks) in this script (default: 550ms)

parameters.responsetimeout3_noise:	stores the response timeouts in ms used for noise in the second gnat round (2 blocks) in this script (default: 550ms)
										Notes: responsetimeouts1 (1000ms) are used for practice only and responsetimeouts4 are not run

propCorrect_AA:						overall proportion correct for pairing targetA-attributeA (here: insects-good); test trials only
propCorrect_AB:						overall proportion correct for pairing targetA-attributeB (here: insects-bad); test trials only
propCorrect_BA:						overall proportion correct for pairing targetB-attributeA (here: fruit-good); test trials only
propCorrect_BB:						overall proportion correct for pairing targetB-attributeB (here: fruit-bad); test trials only


Note: z-score calculations: adjustments (see Gregg & Sedikides, 2010, p.148)
If the hit rate / FA rate is 0 => 0.005 is used instead (aka 0.005 is added to the hit/FA rate)
IF the hit rate / FA rate is 1.0 => 0.995 is used instead (aka 0.005 is subtracted from the hit/FA rate)

rHit_AA:							hit rate for pairing targetA-attributeA (here: insects-good) across all responsetimeouts; test trials only
rFA_AA:								false alarm (FA) rate for pairing targetA-attributeA (here: insects-good) across all responsetimeouts; test trials only
zhit_AA:							z-score of hit rate for pairings targetA-attributeA (here: insects-good)
zFA_AA:								z-score of FA rate for pairings targetA-attributeA (here: insects-good)

AA_dprime:							Computes d' (parametric measure of discriminability) for Insect-Good Pairings
										=> Range (in this script): 
										-5.1516586840152740479 <= dprime <= 5.1516586840152740479 (=perfect performance)

rHit_AB:							hit rate for pairing targetA-attributeA (here: insects-bad) across all responsetimeouts; test trials only
rFA_AB:								false alarm (FA) rate for pairing targetA-attributeA (here: insects-bad) across all responsetimeouts; test trials only
zhit_AB:							z-score of hit rate for pairings targetA-attributeA (here: insects-bad)
zFA_AB:								z-score of FA rate for pairings targetA-attributeA (here: insects-bad)

AB_dprime:							Computes d' (parametric measure of discriminability) for Insect-bad Pairings
										=> Range (in this script): 
										-5.1516586840152740479 <= dprime <= 5.1516586840152740479 (=perfect performance)

dprime_Diff_TargetA:				the difference in dprime btw. AA (insects-good) and AB (insects-bad)
										=> if d prime for Insect-Good is larger than for Insect-Bad (positive difference):
										participant more closely associated Insect with Good than with Bad attributes
										=> if d prime for Insect-Good is smaller than for Insect-Bad (negative difference):
										participant more closely associated Insect with Bad than with Good attributes								

rHit_BA:							hit rate for pairing targetB-attributeA (here: Fruits-good) across all responsetimeouts; test trials only
rFA_BA:								false alarm (FA) rate for pairing targetB-attributeA (here: Fruits-good) across all responsetimeouts; test trials only
zhit_BA:							z-score of hit rate for pairings targetB-attributeA (here: Fruits-good)
zFA_BA:								z-score of FA rate for pairings targetB-attributeA (here: Fruits-good)

BA_dprime:							Computes d' (parametric measure of discriminability) for Fruit-good Pairings
										=> Range (in this script): 
										-5.1516586840152740479 <= dprime <= 5.1516586840152740479 (=perfect performance)

rHit_BB:							hit rate for pairing targetB-attributeB (here: Fruits-bad) across all responsetimeouts; test trials only
rFA_BB:								false alarm (FA) rate for pairing targetB-attributeB (here: Fruits-bad) across all responsetimeouts; test trials only
zhit_BB:							z-score of hit rate for pairings targetB-attributeB (here: Fruits-bad)
zFA_BB:								z-score of FA rate for pairings targetB-attributeB (here: Fruits-bad)

BB_dprime:							Computes d' (parametric measure of discriminability) for Fruit-bad Pairings
										=> Range (in this script): 
										-5.1516586840152740479 <= dprime <= 5.1516586840152740479 (=perfect performance)

dprime_Diff_TargetB:				the difference in dprime btw. BA (fruit-good) and BB (fruit-bad)
										=> if d prime for Fruit-Good is larger than for Fruit-Bad (positive difference):
										participant more closely associated Fruit with Good than with Bad attributes
										=> if d prime for Fruit-Good is smaller than for Fruit-Bad (negative difference):
										participant more closely associated Fruit with Bad than with Good attributes


Note: by default, this script runs testblocks for responsetimeouts2 and responsetimeouts3

___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	


Default GNAT Set-Up in this script:
(1) 4 training blocks: one training block each for targetA (here: insects), targetB (here: fruits), attributeA (here: good), attributeB (here: bad)
with response timeout of 1000ms (editable under section Editable Values)
-> block order is determined randomly
-> run 20 trials each (10 target:10 noise)

(2) 4 test blocks that combine targets and attributes with a faster response timeout (default: 750ms)
-> block order is determined randomly
-> each block runs 16 'practice trials' followed by 60 test trials (summary variables based on test trial performance only)
-> signal : noise = 1 : 1

(3) 4 test blocks that combine targets and attributes with an even faster response timeout (default: 600ms)
-> block order is determined randomly
-> each block runs 16 'practice trials' followed by 60 test trials (summary variables based on test trial performance only)
-> signal : noise = 1 : 1

Notes: 
* Number of trials run as well as 'signal : noise' ratios can only be edited on block level (see section BLOCKS)

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

!!!NOTE: "The most effective response deadlines for measuring automatic cognition are those fast enough
to eliminate perfect responding but not so fast as to lower accuracy substantially, with an 
approporiate range of response deadlines falling between 500 and 850ms." (Nosek & Banaji, 2001, p.636)

/responsetimeout1_signal:						stores the longest response timeouts in ms used in this study for targets
													Note: by default, the longest response timeout in this script is used for blocks
													that test attributes and targets separately (default: 1000ms)
/responsetimeout2_signal:						stores the next response timeouts in ms used in this study for targets
													Note: by default, in this script this is the first response time used for blocks
													that test attributes and targets simultaneously (default 750ms)
/responsetimeout3_signal:						stores the next response timeouts in ms used in this study for targets
													Note: by default, this is the second response time used for blocks
													that test attributes and targets simultaneously (default 600ms)
/responsetimeout4_signal:						stores a potential next response timeouts in ms that could be used for targets
												-> code provided under section BLOCKS
													Note: by default, this responsetimeout4_signal is not used in this script

(same for noise trials: by default they are the same in this script)

/isi:											stores the interstimulus interval (time between offset of one stimulus and onset of next)