Category Switch Task

Technical Manual

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

Background

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.

References

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.

Duration

7 minutes

Description

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)

Procedure

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)"

Practice:
(A) only living test: 32 trials (first 8 trials with key reminders)
- errorfeedback
- need to correct response to move along

(B) size test: 32 trials (first 8 trials with key reminders)
- errorfeedback
- need to correct response to move along
=> The order of living practice vs. size practice is randomized in this script

(C) Combined tasks:
- 16 trials (change block.combinedPractice to increase number of trials)
- if proportion correct during the practice block < parameters.minCombinedPractice acc (default = 0.8),
then the practice blocks gets repeated. Once paramaters.maxCombinedPracticeBlocks (default: 10) have run
with proportion correct during the practice block < parameters.minCombinedPractice acc, the script aborts prematurely.
- trial set up is similar to combined test trials with the following differences:
- if a mistake is made during the combined practice trials, a task and key reminder is presented and
participants have to correct their incorrect response to move along

Test:
(A) Prefatory Block: 1 trial (data excluded from summary variables)
- randomly selects the cuecondition and the stimulus
- the prefatory trial turns into test trials without further notice

(B) Test Block: 32 trials (default number of test blocks run: 2 => Total of 64 trials)
- order of switch and non-switch tasks is randomly determined (see list.switchOrder)
- 16 switch tasks, 16 non-switch tasks
- the 16 switch trials run all 16 items (8 are key congruent, 8 are key incongruent)
- the 16 nonswitch trials run all 16 items (8 are key congruent, 8 are key incongruent)
Error Feedback: presented for 500ms after an incorrect response

this script focuses on the shifting btw. tasks and therefore keeps the number of switch
and non-switch trials balanced while allowing the order of switch and non-switch trials to be random (see list.switchOrder).
This can result in an inbalance of the number of Living vs. Size Tasks run.
If switch tasks are alternated (instead of randomized), then the number of Living vs. Size Tasks run will be the same.

Stimuli

• 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

Instructions

provided by Millisecond - can be edited under section Editable Instructions

Scoring

Summary Variables
trials with latencies < minRT (default = 100ms) are excluded from summary variable calculations

Summary Data

File Name: categoryswitchtask_summary*.iqdat

Data Fields

NameDescription
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)

Raw Data

File Name: categoryswitchtask_raw*.iqdat

Data Fields

NameDescription
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

Parameters

The procedure can be adjusted by setting the following parameters.

NameDescriptionDefault
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 cue10%
targetWordSize Proportional (to canvas height) sizing of the target words10%
Timing Parameters
readyDuration Duration (in ms) of the 'get ready' trials2000
cueTargetSOA The stimulus onset asynchrony (SOA) btw. onset of cue and onset of target0
errorITI The duration (in ms) of the intertrial pause after an error1500
correctITI The duration (in ms) of the intertrial pause after a correct response500
minRT Trials in which participant respond with latency < minRT are excluded from summary variables100
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"