Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com), Millisecond
Credits:
Millisecond thanks Dr. Bruce Ellis and colleagues for consulting on this project!
Created: January 30, 2013
Last Modified: January 21, 2025 by K. Borchert (katjab@millisecond.com), Millisecond
Script Copyright © Millisecond Software, LLC
This script implements the Color Shape Task to assess shifting attention as described in Miyake et al (2004).
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.
NOTE: to run a simple Color Shape Task that only runs the mixed design (shifting paradigm), check out Inquisit's colorshapetask_shifttask.iqjs.
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.
90 minutes
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.
!!! GENERAL 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
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 and cues provided by Millisecond. The stimuli can be edited under
EDITABLE CODE -> Editable Stimuli (item.stimuli, item.cues)
Instructions are provided by Millisecond 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
File Name: colorshapetask_summary*.iqdat
| Name | Description |
|---|---|
| inquisit.version | Inquisit version number |
| computer.platform | Device platform: win | mac |ios | android |
| computer.touch | 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities |
| computer.hasKeyboard | 0 = no external keyboard detected; 1 = external keyboard detected |
| startDate | Date the session was run |
| startTime | Time the session was run |
| subjectId | Participant ID |
| groupId | Group number |
| sessionId | Session number |
| elapsedTime | Session duration in ms |
| completed | 0 = Test was not completed 1 = Test was completed |
| group | Group number |
Switch Costs For The 4 Mixed Blocks |
|
| switchCostWordLongCSI | The switch costs (the mean reaction-time difference between correct switch and correct repeat trials) for long CSIs and word cues => positive: longer (average) switch latencies => negative: shorter (average) switch latencies |
| switchCostWordShortCSI, | The switch costs (the mean reaction-time difference between correct switch and correct repeat trials) for short CSIs and word cues |
| switchCostLetterLongCSI | The switch costs (the mean reaction-time difference between correct switch and correct repeat trials) for long CSIs and letter cues |
| switchCostLetterShortCSI | The switch costs (the mean reaction-time difference between correct switch and correct repeat trials) for short CSIs and letter cues |
File Name: colorshapetask_raw*.iqdat
| Name | Description |
|---|---|
| build | Inquisit version number |
| computer.platform | Device platform: win | mac |ios | android |
| computer.touch | 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities |
| computer.hasKeyboard | 0 = no external keyboard detected; 1 = external keyboard detected |
| date | Date the session was run |
| time | Time the session was run |
| subject | Participant ID |
| group | Group number |
| session | Session number |
| blockcode | The name the current block (built-in Inquisit variable) |
| blocknum | The number of the current block (built-in Inquisit variable) |
| trialcode | The name of the currently recorded trial (built-in Inquisit variable) |
| trialnum | The number of the currently recorded trial (built-in Inquisit variable) trialnum is a built-in Inquisit variable; it counts all trials run even those that do not store data to the data file. |
| group | Group number |
| 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" |
| mixedCueTask | The type of cue in the Mixed condition: "Word" vs. "Letter" |
| mixedShiftTask | 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.accBlock.mean | Proportion correct across the current block trial 1 in mixed trial is excluded |
Summary Variables: Updated For Each Test Block Trial By Trial (Trial.Mixed_Firsttask Excluded From Analyses) |
|
| accColor.itemCount | Counts the number of color trials |
| percentCorrectColor | Percent correct of color responses |
| meanrtColor | Mean rt of correct color responses |
| accShape.itemCount | Counts the number of shape trials |
| percentCorrectShape | Percent correct of shape responses |
| meanrtShape | Mean rt of correct shape responses |
| accRepeat.itemCount | Counts the number of repeat trials |
| percentCorrectRepeat | Percent correct of repeat responses |
| meanrtRepeat | Mean rt of correct repeat responses |
| accShift.itemCount | Counts the number of shift trials |
| percentCorrectShift | Percent correct of shift responses |
| meanrtShift | 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 |
| responseKeyCircle | Assigned Circle response key |
| responseKeyTriangle | Assigned Triangle response key |
| responseKeyRed | Assigned Red response key |
| responseKeyGreen | Assigned Green response key |
The procedure can be adjusted by setting the following parameters.
| Name | Description | Default |
|---|---|---|
Design |
||
| blockedNumberPracticeTrials | Number of practice trials in Blocked condition number increased from original 30 Miyake et al (2004) to allow equal distribution of 2(color) x 2 (shapes) | 32 |
| blockedNumberTrials | Number of test trials in Blocked condition 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 | 64 |
| mixedNumberPracticeTrials | Number of practice trials in Mixed condition (default: 50 repeat/shift trials plus starttrial) | 48 |
| mixedNumberofTrials | Number of test trials in Mixed condition (default: 100 repeat/shift trials plus starttrial) | 100 |
| mixedTrialsToRest | Number of trials in mixed conditions until a rest trial (default: parameters.mixed_numberoftrials/2) to remove resttrial set values.mixedtrialtorest = parameters.mixed_numberoftrials + 1 | 50 |
Stimuli Sizing |
||
| stimHeight | Sets the size of the stimulus as a percentage of monitor height Miyake et al (2004. p.128) - the size of the color patch was roughly 36mm | 25% |
| cueHeight | Sets the height (size) fo the cues as a percentage of monitor height | 8% |
Timing Parameters |
||
| iti | Intertrial Interval in ms | 600 |
| csiLong | Cue-Stimulus-Interval (CSI) long (in ms) | 1200 |
| csiShort | Cue-Stimulus-Interval (CSI) short (in ms) | 200 |
| restDuration | In Mixed Condition: duration of rest trial (in ms) | 60000 |
| errorFeedback | Duration of error feedback (in ms) | 1000 |
Response Keys |
||
| responseKeyLeft | Left response key (left on QWERTY keyboard) | "A" |
| responseKeyRight | Right response key (right on QWERTY keyboard) !!! if scancodes are changed -> change instruction slides accordingly | "L" |