___________________________________________________________________________________________________________________ COLOR SHAPE TASK (blocked and mixed) ___________________________________________________________________________________________________________________ Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC Date: 12-30-2013 last updated: 01-18-2023 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC Script Copyright © 01-18-2023 Millisecond Software ___________________________________________________________________________________________________________________ BACKGROUND INFO ___________________________________________________________________________________________________________________ This script implements the Color Shape Task to assess shifting attention as described in: Miyake, A., Emerson, M.J., Padilla, F., & Ahn, J.C. (2004). Inner speech as a retrieval aid for task goals: the effects of cue type and articulatory suppression in the random task cuing paradigm. Acta Psychologica, 115, 123–142. The script simplifies the Miyake et al (2004) procedure by not implementing the secondary task conditions. Furthermore, this script allows researchers to set the amount of shift/repeat trials in the mixed condition. Millisecond Software thanks Dr. Bruce Ellis and colleagues for consulting on this project! NOTE: to run a simple Color Shape Task that only runs the mixed design (shifting paradigm), check out Inquisit's colorshapetask_shifttask.iqx. ___________________________________________________________________________________________________________________ TASK DESCRIPTION ___________________________________________________________________________________________________________________ Participants are presented bivalent stimuli (circle or triangle on red or green color patches) and have to either sort the stimuli by shape or by color. In a blocked condition, participants get informed before each block which characteristic to focus on. In a mixed condition, participants are given word or letter cues before each stimulus appears that inform them which characteristic (color vs shape) to focus on. Shift and repeat trials are only possible in the Mixed Condition. ___________________________________________________________________________________________________________________ DURATION ___________________________________________________________________________________________________________________ the default set-up of the script takes appr. 90 minutes to complete ___________________________________________________________________________________________________________________ DATA FILE INFORMATION ___________________________________________________________________________________________________________________ The default data stored in the data files are: (1) Raw data file: 'colorshapetask_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. group: Response Key assignment group 1 = red and circle on one response key (default: A) 2 = red and triangle on one respone key (default: A) 3 = red and circle on one response key (default: L) 4 = red and triangle on one respone key (default: L) shape: stores the shape of the current stimulus (circle/triangle) color: stores the color of the current stimulus (green/red) categorizationtask: the type of primary task: "Color" vs. "Shape" mixed_cuetask: the type of cue in the Mixed condition: "Word" vs. "Letter" mixed_shifttask: the type of shift task in the Mixed condition: "Shift" vs. "Repeat" csi: stores the current CSI in ms responsekeymapping: stores whether the mapping of responsekeys for the current shape and color are consistent in mixed task (e.g. consistent = shape AND color are mapped onto same response key) stimulusitem: stores the cue stimulus stimulus: stores the last presented red/green/circle/triangle stimulus response: the participant's response (scancode of response: default 30 -> A; 38 -> L) correct: the correctness of the response latency: the response latency (in ms); measured from onset of stim list.ACC_block.mean: proportion correct across the current block (Note: trial 1 in mixed trial is excluded) Summary variables: updated for each test block trial by trial Note: for Mixed Trials, the performance data of the first tasks in each block (trial.mixed_firsttask) are NOT included in the summary variables ACC_color.itemcount: counts the number of color trials percentcorrect_color: percent correct of color responses meanrt_color: mean rt of correct color responses ACC_shape.itemcount: counts the number of shape trials percentcorrect_shape: percent correct of shape responses meanrt_shape: mean rt of correct shape responses ACC_repeat.itemcount: counts the number of repeat trials percentcorrect_repeat: percent correct of repeat responses meanrt_repeat: mean rt of correct repeat responses ACC_shift.itemcount: counts the number of shift trials percentcorrect_shift: percent correct of shift responses meanrt_shift: mean rt of correct shift responses switchcost: calculates the switch costs as the mean reaction-time difference between (correct) switch and (correct) repeat trials. positive => it took on average longer to respond to shift trials + assigned response keys (2) Summary data file: 'colorshapetask_summary*.iqdat' (a separate file for each participant) inquisit.version: the version/build of Inquisit 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) group: Response Key assignment group 1 = red and circle on one response key (default: A) 2 = red and triangle on one respone key (default: A) 3 = red and circle on one response key (default: L) 4 = red and triangle on one respone key (default: L) switchcost_word_longcsi- switchcost_letter_shortcsi: stores the switch costs (the mean reaction-time difference between correct switch and correct repeat trials) for the 4 mixed test blocks => positive: longer (average) switch latencies => negative: shorter (average) switch latencies ___________________________________________________________________________________________________________________ EXPERIMENTAL SET-UP ___________________________________________________________________________________________________________________ !!! GENERAL NOTE: the Experimental Flow is controlled by the expt-elements under EXPERIMENTS. If the default flow needs to be changed (e.g. no Blocked Condition should be run) go to EXPERIMENT (at the end of the script) and follow instructions. Blocked condition vs. Mixed Condition: -> blocked condition: categorization task (color vs. shape) is known upfront at the beginning of each block; no additional cue before each trial is necessary. -> mixed condition: categorization task (color vs. shape) is NOT known upfront; a cue is presented before each trial to inform participant which task needs to be performed => 2 types of cues: word (SHAPE, COLOR) vs letter (S, C) => repeat vs. shift condition: shift cost = reaction time difference between repeat and shift trials In this script the Blocked Condition is run before the Mixed Condition (see Miyake et al, 2004) (A) Blocked Condition: (a) Training: 5 Training Blocks of 32 trials !!! The default number of trials in this script differs from the 30 trials used in Miyake et al (2004). This was done to allow the 4 conditions (2 shapes x 2 colors) to be presented equally often => number of blocked practice trials is controlled via parameters.blocked_numberpracticetrials - The sampling of stimuli in each block is done randomly without replacement - The intertrial interval (ITI) between response and presentation of next stimulus is parameters.iti (default: 600ms) - Errorfeedback for 1000ms (default) after an incorrect response and before ITI - the order of the training blocks is fixed for all participants: (1) only shapes: block.blockedtask_shapetraining (2) only color patches: block.blockedtask_colortraining (3) shapes and color patches intermixed: block.blockedtask_colorshapetraining (4) shapes superimposed on color patches (task: categorize shapes): block.blockedtask_bivalentshapetraining (5) shapes superimposed on color patches (task: categorize colors): block.blockedtask_bivalentcolortraining (b) Test Blocks: - 2 primary tasks (color vs shape): order is randomly determined for each participant (-> controlled by expt elements under EXPERIMENT) - in this script the number of test trials was decreased from 65 trials (Miyake et al, 2004) to 64 trials to allow all 4 conditions (2 shapes x 2 colors) to be sampled equally often - by default, participants are given performance feedback after each block (-> page.blockfeedback) (B) MIXED CONDITION (a) Training Blocks: with error feedback for 1000ms (default) after an incorrect response and before ITI - 2 Training Blocks (Word cue vs. Letter cue) - order randomly determined for each participant - default: 48 trials (+ plus starttrial); can be set under EDITABLE CODE -> Editable Values -> parameters.mixed_numberpracticetrials (b) Test Blocks: no error feedback - 4 test blocks: 2 cues (word vs letter) x 2 CSI (long CSI, short CSI) - order of test blocks randomly determined for each participant NOTE: the selection/order of the test blocks can be customized under EXPERIMENT - default: 100 trials (+ plus starttrial); can be set under EDITABLE CODE -> Editable Values -> parameters.mixed_numberoftrials Trial Sequence: - The sampling of stimuli in each block is done randomly without replacement - The intertrial interval (ITI) between response and presentation of next stimulus is parameters.iti - in each mixed test block a rest trial is presented after parameters.mixed_trialstoRest (-> editable value), default: halfway through the block - number of switch and repeat trials in each block is controlled via EDITABLE CODE -> Editable Lists -> list.mixed_shiftrepeat_frequency (default: 50% switch; 50% repeat trials) => number of color and number of shape tasks will vary between participants - number of trials was chosen to ensure that all four possible stimuli are presented equally often - by default, participants are given performance feedback after each block (-> page.blockfeedback) Additional notes: *Response key assignment: counterbalanced by groupnumber (4 different groupnumbers) -> set in EXPERIMENT ___________________________________________________________________________________________________________________ STIMULI ___________________________________________________________________________________________________________________ Stimuli and cues provided by Millisecond Software. The stimuli can be edited under EDITABLE CODE -> Editable Stimuli (item.stimuli, item.cues) ___________________________________________________________________________________________________________________ INSTRUCTIONS ___________________________________________________________________________________________________________________ Instructions are provided by Millisecond Software in the form of htm pages. To edit the instructions edit the relevant *.htm files or replace them with your own under EDITABLE CODE -> 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_left = "A" /responsekey_right = "L" !!!NOTE: if scancodes are changed -> change instruction slides accordingly Size of the stimuli: /stimheight: sets the size of the stimulus as a percentage of monitor height (default: 25%) Note: Miyake et al (2004. p.128): - the size of the color patch was roughly 36mm /cueheight: sets the height (size) fo the cues as a percentage of monitor height (default: 8%) Duration Settings: /iti: Intertrial Interval (default: 600ms) /CSI_long: Cue-Stimulus-Interval (CSI) long (default: 1200ms) /CSI_short: Cue-Stimulus-Interval (CSI) short (default: 200ms) /RestDuration: in Mixed Condition: duration of rest trial Number of Trials: /blocked_numberpracticetrials: number of practice trials in Blocked condition (default: 32) Note: number increased from original 30 Miyake et al (2004) to allow equal distribution of 2(color) x 2 (shapes) /blocked_numbertrials: number of test trials in Blocked condition (default: 64) Note: in this script the number of test trials was decreased from 65 trials (Miyake et al, 2004) to 64 trials to allow all 4 conditions (2 shapes x 2 colors) to be sampled equally often /mixed_numberpracticetrials: number of practice trials in Mixed condition (default: 50 repeat/shift trials plus starttrial) /mixed_numberoftrials: number of test trials in Mixed condition (default: 100 repeat/shift trials plus starttrial) /mixed_trialstoRest: number of trials in mixed conditions until a rest trial (default: parameters.mixed_numberoftrials/2) Note: to remove resttrial set values.mixedtrialtorest = parameters.mixed_numberoftrials + 1 (e.g.)