Return to the Color Shape Shifting Task page
___________________________________________________________________________________________________________________	

										COLOR SHAPE TASK
										mixed design (Shifting Task)
___________________________________________________________________________________________________________________

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 12-11-2018
last updated:  12-09-2019 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 12-09-2019 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________
This default script implements a simple mixed-design Color Shape Task, a measure of Executive Functioning, based on

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.

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.

Note: 
The (almost) full design described by Miyake et al (2004) can be run by Millisecond Software's "colorshapetask.iqx"

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________
Participants are presented red or green circles or triangles and have to  either sort the stimuli by shape or by color
as fast as they can.  Participants are given letter cues (S vs. C) before each stimulus appears that inform them which 
characteristic (color vs shape) to focus on.

___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. XXX minutes to complete
(if no task duration is provided, please contact Millisecond Software
(katjab@millisecond.com)

___________________________________________________________________________________________________________________	
DATA FILE INFORMATION 
___________________________________________________________________________________________________________________
The default data stored in the data files are:

(1) Raw data file: 'colorshapetask_shifttask_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
script.sessionid:					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)														
																													
countPracticeBlocks:				a running count of the practice blocks run									
countTestBlocks:					a running count of the test blocks run	

countTrials:						a running count of the trials run in a block (resets after each block)	
								Note: does not count the first trial
									
shape:							stores the shape of the current stimulus (circle/triangle)
color:							stores the color of the current stimulus (green/red)
categorization Task:				the type of primary task: "Color" vs. "Shape"
shifttask:							"Shift" vs. "Repeat"
SOA:							stores the current SOA in ms (stimulus onset asynchrony btw. onset of cue and onset of shape)

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

(2) Summary data file: 'colorshapetask_shifttask_summary*.iqdat' (a separate file for each participant)

computer.platform:				the platform the script was run on (win/mac/ios/android)
script.startdate:					date script was run
script.starttime:					time script was started
script.subjectid:					assigned subject id number
script.groupid:					assigned group id number
script.sessionid:					assigned session id number
script.elapsedtime:				time it took to run script (in ms); measured from onset to offset of script
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)
									
countPracticeBlocks:				number of practice blocks run
practiceACC: 					proportion correct during the last practice run

practicePass:						1 (yes)= participant passed practice (proportion correct >= minPracticeACC = 0.85 by default)
								0 (no) = participant did not pass practice (proportion correct < minPracticeACC = 0.85 by default)
							
abortPractice:					1 (yes)= practice is aborted if participant fails practice after max. 5 (default) practice blocks
								0 (no)= participant moves on to practice even if practice performance does not reach criterium
										
countTestBlocks:					number of test blocks run	
							
															
Summary variables: updated for each test block trial by trial
Note: the performance data of the first tasks in each block (trial.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

									
___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________

DEFAULT SET-UP:
(a) Training Block: with error feedback for 1000ms (default) after an incorrect response and before ITI
- default: 48 trials (+ plus starttrial) per block; can be set under EDITABLE CODE -> Editable Values -> parameters.numberpracticetrials

By default, participants have to reach "minPracticeACC" (default: 85% correct) before they can move on to the test blocks.
If participants do not reach the allotted practice performance within 5 (default) practice blocks, the script
automatically aborts (by default). Check settings for practice parameters under section EDITABLE PARAMETERS.


(b) Test Blocks: no error feedback
- 4 test blocks (default, change under section Editable Parameters):
- 48 trials (+ plus starttrial) per block; can be set under EDITABLE CODE -> Editable Values -> parameters.numberOfTestTrials
		Trial Sequence:
		- The sampling of stimuli is done randomly without replacement
		- The intertrial interval (ITI) between response and presentation of next stimulus is parameters.iti
		- a rest trial is presented after parameters.trialstoRest (-> editable value), default: halfway through the block

- number of switch and repeat trials in each test block is controlled via EDITABLE CODE -> Editable Lists -> list.shiftrepeat_frequency
		=> default: 50% switch; 50% repeat trials => 24 shift; 24 repeat trials
		=> number of color and number of shape tasks will vary between participants

- by default, participants are given performance feedback after each block (-> page.blockfeedback)
	
Trial Sequence:
-> Letter Cue (C or S) for SOA (default: 500ms -> see editable list.SOAs)
-> Letter Cue + Shape until response
-> blank iti (default: 600ms)

Additional notes:
*Response key assignment: counterbalanced by groupnumber (4 different groupnumbers) -> set in section EXPERIMENT

1 = red and circle on one response key (default: A)
2 = red and triangle on one respone key (default: L)
3 = red and triangle on one response key (default: A)
4 = red and circle on one respone key (default: L)

___________________________________________________________________________________________________________________	
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:

Response key mappings:
Note: Miyake et al (2004) use 2 response keys (e.g. circle/green on one response key; triangle/red on the other). 
This script offers the possibility to use 4 response keys (circle/triangle/red/green all get their own).
By default, shape1 and color1 (shape2 and color2) are assigned the same response keys.
Counterbalancing of response keys is achieved by the expt-element under EXPERIMENT.				



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) of the cues as a percentage of monitor height (default: 8%)
												
Duration Settings:
/iti:									Intertrial Interval (default: 600ms)

Practice Settings:
/numberpracticetrials:					number of practice trials per practice block (default: 48 plus starttrial)
/minPracticeACC:						minimum practice proportion correct to advance to test  (default: 0.85)
									
/maxNumberPracticeBlocks:			max. number of practice blocks run if performance is below minPracticeACC (default: 10%)
/abortPractice:						true (1): if participant's practice performance is still under minPracticeACC (here: 0.85 correct)
									after the last practice block, then the script quits prematurely (default)
									false (0): all participants start test regardless of practice ACC at the end of the last 
									practice block

Test Settings:												
/numberOfTestTrials:					number of test trials per test block (default: 48 plus starttrial)
/numberOfTestBlocks:					number of test blocks to run (default: 4)
Copyright © Millisecond Software. All rights reserved.
Contact | Terms of Service | Privacy Statement | Security Statement | GDPR
Website Security Test