___________________________________________________________________________________________________________________ Shift GoNogo (Shift GNG) with X and Y Stimuli ___________________________________________________________________________________________________________________ Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC Date: 08-14-2024 last updated: 09-24-2024 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC Script Copyright © 09-24-2024 Millisecond Software ___________________________________________________________________________________________________________________ BACKGROUND INFO ___________________________________________________________________________________________________________________ This script implements a basic shift go/nogo paradigm with X and Y stimuli, in which the go trials are shift trials (shifting from one type of stimuli to another) and the nogo trials are the 'stay' trials (repeated stimuli). In general, Go/Nogo Tasks are used as behavioral measures of inhibition and cognitive control. The shifting component adds further complexity. ///Reference: Claus, E. D., & Hendershot, C. S. (2015). Moderating effect of working memory capacity on acute alcohol effects on BOLD response during inhibition and error monitoring in male heavy drinkers. Psychopharmacology, 232(4), 765–776. https://doi.org/10.1007/s00213-014-3711-2 ___________________________________________________________________________________________________________________ TASK DESCRIPTION ___________________________________________________________________________________________________________________ Participants see a string of X and Y, presented one-by-one, in the center of the screen. They are asked to press the spacebar whenever the stimulus they see is different than the previous one (Example: X->Y, go trials). If the stimulus remains the same, they should refrain from responding (Example: X->X, nogo trials). The default task runs 100 fixed test trials with 10% nogo trials (trial order as well as frequency of go/nogo trials can be edited) ___________________________________________________________________________________________________________________ DURATION ___________________________________________________________________________________________________________________ the default set-up of the script takes appr. 4 minutes to complete ___________________________________________________________________________________________________________________ DATA OUTPUT DICTIONARY ___________________________________________________________________________________________________________________ The fields in the data files are: (1) Raw data file: 'shiftgng_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: with the current subject id group: with the current group id 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. goTrialDef: the preset definition of a go trial: either 'different' trials (shift trials) or 'same' trials (remain trials) blockCounter: tracks the number of test blocks run trialCounterPerBlock: tracks the number of test trials run per block trialType: 1 = go trial 0 = nogo trial 999 = other trial run during a test block (e.g. rest and start trials) currentStim: the currently presented stimulus response: the response of participant (scancode of response button) 57 = spacebar 0 = no response respCategory: go trials: "hit", "omission", nogo trials: "commission", "corr reject" correct: correctness of response (1 = correct, 0 = error) latency: response latency (in ms); measured from: onset of stim (2) Summary data file: 'shiftgng_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) //the following summary variables are based on test trial performance only: propCorrect: overall proportion correct responses across go and nogo trials numberGoTrials: the number of go trials run hitRate: proportion correct go trials missRate: proportion errors on go trials (omissions) hitRT: mean correct go trial response time numberNoGoTrials: the number of nogo trials run faRate: proportion errors in nogo trials (commission errors/false alarms) corrRejectRate: proportion correct responses in nogo trials (correct suppression of response) faRT: mean incorrect nogo trial response time (commission response time) 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) zHitRate: the z-score of the hitRate zFARate: the z-score of the faRate (commission rate/false alarms) dPrime: difference btw. (zHitRate - zFARate): 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) c: c-criterion in signal detection:The absolute value of c provides an indication of the strength of the response bias/response style 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) ___________________________________________________________________________________________________________________ EXPERIMENTAL SET-UP ___________________________________________________________________________________________________________________ (1) Demo Block (optional, see section Editable Parameters) - 10 trials (+ start); 5 shift and 5 stay trials (order is randomized, see list.demoTrials) - demo trials provide response instructions - stimuli are presented longer than for test trials - demo can be repeated if needed (2) Test Block(s) - each test blocks start with a START trial that randomly selects the first stim - each test blocks then runs as many TEST trials as listed in list.trialOrder - list.trialOrder further controls whether the trialtypes (go and nogo trials) are presented in a fixed (default) or random order => The default script runs: a fixed order with 90 go-trials and 10-nogo trials (=> 10% nogo trials) - A REST trial is run after 50 test trials (basically breaking up the one block into 2, see editable parameters). The trial immediately following a rest trial is another START trial (not a test trial). Trial Sequence: Stim for 700ms (editable parameter) -> fixation (editable parameter) -> .... - The response window is as long as the stimulus presentation duration - a response does NOT cut down on stimulus presentation duration (so each stimulus is presented the same amount of time regardless of response. Note: script provides a quick visual response feedback if a spacebar press is detected in time.) ___________________________________________________________________________________________________________________ STIMULI ___________________________________________________________________________________________________________________ provided by Millisecond Software - can be edited under section 'Editable Stimuli' ___________________________________________________________________________________________________________________ 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: //design elements: / goTrialDef = "different" //choose from "same" (go trials are the repeat trials) or "different" (go trials are the shift trials) / runDemo = true / numberTestBlocks = 1 //number of test blocks to run. //Currently all test blocks use list.trialOrder //See below to fine-tune number of trials, number of go/nogo trials //and trial order in list.trialOrder / restTrials = 50 //number of test trials before a rest trial is run //Note: the first trial after a rest trial is NOT considered one of //the test trials //stims / stim1 = "X" / stim2 = "Y" / stimHeightPct = 15% //proportional height (relative to canvas) of the stims / fixationStim = "+" //the fixation stimulus presented (can be left blank) / fixationHeightPct = 5% //proportional height (relative to canvas) of the fixation stimulus //timing parameters / getreadyDurationMS = 2000 //the duration (ms) of the get-ready trial at the start of each test block / stimPresentationDemoMS = 3000 //the duration (ms) that the stims are presented during the demo session (also the response window) / stimPresentationMS = 700 //the duration (ms) that the stims are presented during the test session (also the response window) / stimIsiMS = 300 //the duration (ms) of the interstimulus interval (presents the fixationStim) / //responseKeys: / responseKey = " " //" " => space bar / responseKeyLabel = "[space]" Note: trialOrder (of go/nogo trials can also be edited under section Editable Lists)