Return to the Modified Card Sort Test page
___________________________________________________________________________________________________________________	

									MODIFIED  CARDSORT TEST (MCST)
									(German Version)
___________________________________________________________________________________________________________________	

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 04-26-2012
last updated:  08-17-2021 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 08-17-2021 Millisecond Software

translation provided by K. Borchert for Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________
This script implements a computerized version of the Modified Cardsort Test (MCST);
a test of cognitive flexibility upon rule changes. In contrast to the similar Wisconsin Card Sorting Task (WCST),
the MCST only provides unambiguous cards. The test can either be run with announced or unannounced rule changes.
The implemented procedure is based on:

Nelson, H. (1976). A modified card sorting test sensitive to frontal lobe lesions. Cortex 12, 313–324

Additional scoring:
Cianchetti, C., Corona, S., Foscoliano, Scalas, M.F. & Sannio-Fancello, G. (2005).
Modified Wisconsin Card Sorting Test: proposal of a supplementary scoring method,
Archives of Clinical Neuropsychology, 20, 555-558.

Scoring of Perserverative Responses based on:
Heaton, R., Chelune, G., Talley, J., Kay, G., & Curtiss, G. Wisconsin Card Sorting Test Manual—Revised
and Expanded 1993. Lutz, FL: Psychological Assessment Resources Inc


****DISCLAIMER****
Response coding may differ from published definitions. Check the definition of the coded variables 
used in this script under the data glossary. If in doubt, manually score the raw responses.
This script bases the coding of perserverative responses on the guidelines
outlined by Heaton et al (1993) for the Wisconsin Card Sorting Task*. 
Coding may, however, still differ from published definitions or contain errors. 

*Note: previous Inquisit WCST scripts used a different definition of Perserverative Responses

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________	
Participants are asked to sort cards into four different "categories":
- one red triangle
- two green stars
- three yellow crosses
- four blue circles.
The cards to sort into these piles have similar designs and vary in color, shape, and number.

___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. 2 minutes to complete

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

(1) Raw data file: 'mcst_german_raw*.iqdat' (a separate file for each participant)

Important Note: the definitions of the summary variables in this script might differ from the originals. 

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

parameters.startCategory:			this script allows the user to choose the first category to be tested
									"U" for Undecided => based on first correct response (see Nelson, 1976) => either color, form OR number 
									"C" for color 
									"F" for form 
									"N" for number 
										
parameters.categoryOrder:   		the order in which categories should be run once the startCategory has been determined
									"CFN" ('classic', based on Wisconsin Card Sorting Task): color precedes form, form precedes number, number precedes color 
									"CNF": color preceds number, number precedes form, form precedes color
								
									"FLEX": the categories are decided upon first selection after rule change
									block1: depends on first correct selection
									block2: depends on first correct selection of categories that haven't run yet
									block3: last unselected category 
									block4 = block1 (but block3 category cannot be run); block5 = block2, block6 = block3										
										
								
parameters.cstotaltrials			Maximum Number of trials (default = 48 => 2 decks x 24 cards)		

parameters.cstotalblocks:  			Maximum Number each category is tested (default = 2)
parameters.correctstreakthreshold:  Number of consecutive correct responses before a rule change (default = 10)

parameters.setmaintainthreshold: 	Number of consecutive correct responses after which an incorrect
										response is scored as a "Failure to maintain Set" (default = 5)
								
parameters.showdeckinfo:  			if set to " true" information about the deck (e.g. 1 of 2) and card number
											(e.g. 7 of 64) are displayed on the screen for the participant to see (default: false (0))
								
parameters.showRuleChangeAlert:		if set to "true" participants are alerted when the categorization rules change (default: true (1))

values.categoriesRun:				stores the order of the categories that were run


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.
																									
count_ColorBlocks:					the number of color blocks started
count_FormBlocks:					the number of number blocks started
count_NumberBlocks:					the number of form blocks started				
											
colortrialcount/numbertrialcount/formtrialcount:	sum up the trials run by category

totaltrials:						counts the total trials run
countTrials_perBlock:				counts the trials run in the current category block

category:							1 = color; 2 = form; 3 = number

stimulusitem.1:						the presented target card									
stimulusitem.2-
stimulusitem.5						the selection of cards to choose from (stay the same throughout the task)


expressions.lastCategory:			presents the last last category tested (C,N,F or N/A) 
expressions.currentCategory:		presents the current category tested (C,N,F or still 'Undecided')

response:							the participant's response (card selection)
latency: 							the response latency in ms; measured from onset of target card

ResponseCategory:					=> records features that the selected card (response) and the test card have in common
									C (color); F (form); N (number); O (other)
									
correct:							the correctness of the response (1 = correct; 0 = otherwise)
correctstreak:						counts consecutive correct responses (if an error is made, it's reset back to 0)
				 
values.errorsum_block:				counts the errors made in the current block


Additional data columns used to code perseverative responses (the algorithm to code perseverative responses
runs AFTER all raw data have been collected as some responses will be coded as perseverative responses
only in retrospect). All the following columns are filled under block.rawdatascoring/trial.scoring

//duplicates raw data for scoring purposes
/scoring_deckCount:					tracks the number of decks run
/scoring_trialCount:				tracks the number of total trials run
/scoring_trialCountPerCategory:		tracks the number of trials run per category
/scoring_categoryCount:				tracks the number of categories run
/scoring_category:					tracks the category run: 1 = C; 2 = F; 3 = N
/scoring_card:						tracks the specific card presented during the trial
/scoring_response:					tracks the selected response card
/scoring_respCategories:			tracks the response category; e.g. CN => the response falls into the color/number categories
/scoring_ACC:						tracks the accuracy of the response: 1 = correct (aka respCategories contained the current category); 0 = error
/scoring_correctstreak:				tracks the number of consecutive correct responses

/scoring_perseverativeResponse:		tracks perseverative responses: 
									1 = perseverative response (pResponse); 
									0 = not scored as a pResponse* (see below for how pResponses are scored in this script)
									
/scoring_pResponsePrinciple:		tracks the pResponse-principle that were (likely) currently in effect for scoring pResponses


(2) Summary data file: 'mcst_german_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)
								
Important Note: the definitions of the summary variables in this script might differ from the originals.								


parameters.startCategory:			this script allows the user to choose the first category to be tested
									"U" for Undecided => based on first correct response (see Nelson, 1976) => either color, form OR number 
									"C" for color 
									"F" for form 
									"N" for number 
										
parameters.categoryOrder:   		the order in which categories should be run once the startCategory has been determined
									"CFN" ('classic'): color precedes form, form precedes number, number precedes color 
									"CNF": color preceds number, number precedes form, form precedes color
								
									"FLEX": the categories are decided upon first selection after rule change
									block1: depends on first correct selection
									block2: depends on first correct selection of categories that haven't run yet
									block3: last unselected category 
									block4 = block1 (but block3 category3 cannot be run); block5 = block2, block6 = block3										
										
								
parameters.cstotaltrials			Maximum Number of trials (default = 48 => 2 decks x 24 cards)		

parameters.cstotalblocks:  			Maximum Number each category is tested (default = 2)
parameters.correctstreakthreshold:  Number of consecutive correct responses before a rule change (default = 10)

parameters.setmaintainthreshold: 	Number of consecutive correct responses after which an incorrect
										response is scored as a "Failure to maintain Set" (default = 5)
								
parameters.showdeckinfo:  			if set to " true" information about the deck (e.g. 1 of 2) and card number
											(e.g. 7 of 64) are displayed on the screen for the participant to see (default: false (0))
								
parameters.showRuleChangeAlert:		if set to "true" participants are alerted when the categorization rules change (default: true (1))

values.categoriesRun:				stores the order of the categories that were run

count_ColorBlocks:					the number of color blocks started
count_FormBlocks:					the number of number blocks started
count_NumberBlocks:					the number of form blocks started
															
colortrialcount/formtrialcount/numbertrialcount:	sum up the trials run by category

totaltrials:						counts the total trials run
totalcorrect:						sums up all the correct responses across the task

expressions.number_Errors:			number of total errors (all incorrect responses) made
expressions.Percent_Errors:			percentage of incorrect responses (relative to all responses) 

Note: See Definition of 'PerserverativeResponse' below under explanation of implemented algorithm
expressions.number_pResponses:		number of perseverative responses made
expressions.Percent_pResponses:		percentage of Perserverative Responses (relative to all responses)

values.number_OtherErrors:			number of 'Other' error responses
expressions.Percent_OtherErrors:	percentage of Other error responses (relative to all responses)

completedcategories					number of categories (color, form, number) successfully completed (min = 0, max = 6)
Sum_FailureMaintainSet				keeps a total of the number of times a participants selects an incorrect card

trialscompletefirstcategory			keeps track of how many trials a participant needed to complete the first category
									after having maintained a correct streak of 5 or higher (default)
								
values.percentErrors_block1 - 
values.percentErrors_block6:		percent ERROR responses in block1 to block6 (relative to all responses in that block)

Diff_block1block2 etc.:				Difference scores of percent ERRORS in adjacent categories
									(e.g. Diff_block1block2 = percenterrors in first category - percenterrors in second category)
								
LearningToLearn:					the mean of the obtained difference scores

categorizing_efficiency:			suggested by Cianchetti et al (2005)
									= completedcategories * 6 + [IF all 6 categories compled: (48 - totaltrials)]
___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	
(1)  Cards:
- Participants receive the equivalent of 2 decks of cards. Each deck contains 24 different cards.
- Each of the 24 cards has max. only 1 feature in common with any of the 4 response cards. (there are no ambiguities)
- Researchers can set whether to display the deck/card info for the participants 
on the screen under section EDITABLE PARAMETERS  (e.g. "Deck: 1 of 2; Card: 5 of 24")
- the cards of each deck are randomized without replacement (see list.selectcard for more detail)

(2) Order of Categorization Rules: Color -> Form -> Number -> Color etc.
- the start category can be selected OR left to be decided by first correct response (see parameters.startCategory)
- Maximal 2 of each category
- Rules change after 6 consecutive correct responses for a category (default, can be changed under 
section EDITABLE PARAMETERS)
=> the order of the categories can be set under section Editable Parameters (see parameters.categoryOrder)

(3) End of Task:
(a) reached the maximum number of cards:
- Maximum Number of Trials/Cards: 2 (decks) x 24 (cards) => 48 cards 
(b) successfully completed 2 blocks of each category
- Minimum number of trials/Cards = 6 (correct trials per block) * 6 (max number of blocks)=> 36 cards

(4) Instructions
- By default, participants are alerted to a rule change in the MCST (as opposed to the WCST).
This "Rule Change Alert" CAN be turned OFF under section EDITABLE PARAMETERS
- Instructions can easily be changed under section EDITABLE INSTRUCTIONS
- Text Stimuli can be easily changed under EDITABLE STIMULI -> Feedback

(5) Dependent Variables/Scores:
- latency of response
- accuracy of response
- total number of correct responses/total number of errors
- Total Number/Percentage of Perseverative Errors (see below for explanation of scoring of Perserverative Responses in this script)
- total number of trials
- number of trials needed to complete first category
- categories completed (Max = 6)
- Number of "Failures to Maintain Set" across Experiment
- "Learning to Learn" measures: error difference scores (of percentages) from adjacent blocks
- Categorizing Efficiency:	suggested by Cianchetti et al (2005) => completedcategories * 6 + [IF all 6 categories compled: (48 - totaltrials)]

___________________________________________________________________________________________________________________	
ALGORITHM TO SCORE PERSERVERATIVE RESPONSES
___________________________________________________________________________________________________________________	

This Inquisit MCST script bases the coding of Perserverative Responses on the guidelines proposed by 
Heaton et al (1993) for the similar Wisconsin Card Sorting Task.
Note that all Perserverative Responses in the MCST are -by definition- Perserverative Errors
as the MCST only runs unambiguous response cards.

Perserverative Responses: persistence to respond according to a stimulus characteristic that is 
currently incorrect.

First Block:
- the first error sets the pResponse-Principle BUT is not scored as a pResponse in itself
(Note: only C/F/N responses considered; Other responses excluded)
- the next time an error of the pResponse-Principle is made, it's scored as a pResponse

Subsequent Blocks:
- the previous correct category becomes automatically the pResponse-Principle and all subsequent
errors of the pResponse-Principle are scored as a pResponse.

!IMPORTANT: pResponse-Principle changes
According to Heaton et al (1993) the pResponse-Principle of a block can change.
This can happen if a participant makes three errors of the NON-pResponse-Principle (in this script: 
these error responses have to be made UNinterrupted by errors of the pResponse Principle but can be interrupted
by correct responses or error responses of the OTHER category).
In these cases the pResponse-principle changes and the SECOND and THIRD error responses are scored as a pResponses.

Example: 1. Block, C has been selected as the correct category

1) N (first error response)
=> sets the pResponse-principle (N) (but not a pResponse!)

2) C 
=> 'correct'

3) N 
=> first pResponse

4) F 
=> first error of the F-category

5) N
=> second pResponse

6) F 
=> second error of the F-category (after trial7 will turn into the first error of the F-category)

7) F 
=> third error of the F-category 
=> HOWEVER, not all error responses btw the third (trial7) and first F-error (trial4) are F-errors (they were interrupted by an N-error)
=> therefore trial7 F-error will be re-classified as the second F-error
=> after trial9 this error will be retrospectively scored as the first pResponse of the F category

8) O
=> first Other error (does not change coding of Perserverative Responses)

9) F => scored as the NEW third F-error 
=> all error responses up to trial 6 are F-errors (excluding O-errors)
=> F is made the new pResponse-principle 
=> all F errors up to trial7 are retrospectively scored as pResponses

10) N
=> 'simple' error (not a pResponse as the pResponse-Principle has changed)

...

___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________	
provided by Millisecond Software - can be edited under section 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.