Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com), Millisecond
Created: January 04, 2017
Last Modified: January 02, 2025 by K. Borchert (katjab@millisecond.com), Millisecond
Script Copyright © Millisecond Software, LLC
This script implements a Category Switch Task, an executive function test, similarly to the one outlined by Friedman et al (2008). The task switching implemented in this script is random and thus, not predictable.
Friedman, N.P., Miyake, A., Young, S.E., DeFries, J.C., Corley, R.P., & Hewitt, J.K. (2008). Individual Differences in Executive Functions Are Almost Entirely Genetic in Origin. Journal of Experimental Psychology: General, 137, 201-225.
Mayr, U., & Kliegl, R. (2000). Task-set switching and long-term memory retrieval. Journal of Experimental Psychology: Learning, Memory, and Cognition, 26, 1124–1140.
7 minutes
Participants are given a word and have to perform one of two simple categorization tasks depending on the cue that appears with the word: 1. 'Living' Task: If the cue is a heart -> Participants are asked to categorize the word via key press based on whether it represents a LIVING vs. a NON-LIVING object. 2. 'Size' Task: If the cue is an arrowcross -> Participants are asked to categorize the word via key press based on whether it represents an object that is BIGGER or SMALLER than a basketball.
The cue selection for each new trial is randomized. Half the test trials in this script are switch trials, half of the test trials are non-switch trials. Half the switch (non-switch) trials are congruent in the key presses for either task, half are incongruent.
(Congruent: the 'living' and the 'size' task require the same key press for a correct response Incongruent: the 'living' and the 'size' task require opposite key presses for a correct response)
Key Assignments are counterbalanced by groupnumbers (1-4) in this script.
KeyAssignment group1: runs "living/big (left) vs. non-living/small (right)"
KeyAssignment group2: runs "living/small (left) vs. non-living/big (right)"
KeyAssignment group3: runs "living/big (right) vs. non-living/small (left)"
KeyAssignment group4: runs "living/small (right) vs. non-living/big (left)"
• 16 target words provided by Friedman et al (2008)/Mayr & Kliegl (2000);
font: Arial, Size: can be edited under section Editable Parameters
• cues provided by Millisecond, Size: can be edited under section Editable Parameters
provided by Millisecond - can be edited under section Editable Instructions
File Name: categoryswitchtask_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 |
| keyAssignmentGroup | KeyAssignment group 1: runs "living/big (left) vs. non-living/small (right)" KeyAssignment group 2: runs "living/small (left) vs. non-living/big (right)" KeyAssignment group 3: runs "living/big (right) vs. non-living/small (left)" KeyAssignment group 4: runs "living/small (right) vs. non-living/big (left)" |
| congruentKeys | Stores the congruent keys 'living-big vs. nonliving-small' VS 'living-small vs. nonliving-big' |
| practiceFail | 1 = last combined practice performance was too low and script aborted prematurely (fail) 0 = last combined practice performance >= parameters.minCombinedPracticeACC (pass) |
| countCombinedPracticeBlocks | Number of combined practice blocks of 16 trials run until performace >= parameters.minCombinedPracticeACC OR max number of practice blocks was run |
| accCombinedPractice | Proportion correct during last combined practice blocks run |
| countSwitch | Number of switch trial responses qualified for summary variables |
| propCorrectSwitch | Proportion of correct switch trials |
| countNonSwitch | Number of nonswitch trial responses qualified for summary variables |
| propCorrectNonSwitch | Proportion of correct nonswitch trials |
| accSwitchCost | Accuracy switchcosts (difference btw. proportion correct of switch trials and nonswitch trials) => negative value: participants were less accurate on switch trials (there was an accuracy cost to switching ) |
| meanRTSwitch | Mean latency of correctly responding to a switch trial |
| meanRTNonSwitch | Mean latency of correctly responding to a nonswitch trial |
| rtSwitchCost | Latency switchcosts (difference btw. mean correct latency of switch trials and nonswitch trials) => positive value: participants were slower on switch trials (there was a latency cost to switching) |
| propExcluded | Proportion excluded (from summary variables) trials across all combined trials (excluded because of no responses or because latency < 100ms) |
File Name: categoryswitchtask_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 |
| keyAssignmentGroup | KeyAssignment group 1: runs "living/big (left) vs. non-living/small (right)" KeyAssignment group 2: runs "living/small (left) vs. non-living/big (right)" KeyAssignment group 3: runs "living/big (right) vs. non-living/small (left)" KeyAssignment group 4: runs "living/small (right) vs. non-living/big (left)" |
| blockcode | The name the current block (built-in Inquisit variable) |
| blocknum | The number of the current block (built-in Inquisit variable) |
| countCombinedPracticeBlocks | Practice Block Counter |
| 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. |
| congruentKeys | Stores the congruent keys 'living-big vs. nonliving-small' VS 'living-small vs. nonliving-big' |
| switch | 1 = current trial requires a task switch; 0 = current trial presents the same task as the previous one |
| cueCondition | 1 = heart -> living Task; 2 = arrowcross -> size Task |
| congruence | Congruence: the 'living' and the 'size' task require the same key press for a correct response 1 = congruent; 0 = incongruent |
| target | Stores the current target word |
| targetIndex | Stores the current target ItemIndex ( 0-based indices) |
| stimulusItem | The presented stimuli in order of trial presentation |
| correctResponseCat | Living task: 1 = living; 0 = non-living size task: 1 = bigger; 0 = smaller |
| response | The participant's response: scancode of last response button pressed for corrected responses (here: all practice trials), 'correct' stores the accuracy of the FIRST response but 'response' will store the LAST response |
| responseKeyInterpret | The interpretation of the response key press depending on task required for corrected responses (here: all practice trials), 'responseKeyInterpret' stores the LAST (and corrected) response made |
| correct | Accuracy of (initial) response: 1 = correct response; 0 = otherwise |
| latency | The response latency (in ms); measured from: onset of target word |
| list.accBlock.mean | Stores the proportion correct of the current block trials |
The procedure can be adjusted by setting the following parameters.
| Name | Description | Default |
|---|---|---|
Design Parameters |
||
| numberOfTestBlocks | The number of test blocks run | 2 |
| minCombinedPracticeAcc | Minimum performance (proportion correct) during last combined practice block to move on to actual test. If performance during last combined practice block is lower than parameters.minCombinedPracticeACC, combined practice block gets repeated (default: 0.8 => max. number of errors = 3 => 13correct trials/16 practice trials = 0.8125) | 0.8 |
| maxCombinedPracticeBlocks | Maximum number of combined practice blocks run. If practice performance is still < minCombinedPracticeACC after the last block, then script aborts prematurely | 10 |
Sizing Parameters |
||
| cueSize | Proportional (to canvas height) sizing of the cue | 10% |
| targetWordSize | Proportional (to canvas height) sizing of the target words | 10% |
Timing Parameters |
||
| readyDuration | Duration (in ms) of the 'get ready' trials | 2000 |
| cueTargetSOA | The stimulus onset asynchrony (SOA) btw. onset of cue and onset of target | 0 |
| errorITI | The duration (in ms) of the intertrial pause after an error | 1500 |
| correctITI | The duration (in ms) of the intertrial pause after a correct response | 500 |
| minRT | Trials in which participant respond with latency < minRT are excluded from summary variables | 100 |
Response Keys |
||
| leftKey | The left response key ( key 'E' is positioned on the left side of a QWERTY keyboard) | "E" |
| rightKey | The right response key ( key 'I' is positioned on the right side of a QWERTY keyboard) | "I" |