Return to the Letter Memory Task page
___________________________________________________________________________________________________________________	

										LETTER MEMORY TASK (written input)
___________________________________________________________________________________________________________________	

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
(reusing some interface code by David Nitz)
Date: 10-26-2016
last updated: 12-16-2019 by K.Borchert (katjab@millisecond.com) for Millisecond Software LLC

Script Copyright © 12-16-2019 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	
This script implements the Letter Memory Task, a test of executive functioning focusing on
continuously updating working memory representations.

The implemented procedure is similar to the one outlined by: 

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: this script collects written input at the end of each trial

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________	
Participants view series of letters (5, 7, 9), one at a time in the middle of the computer screen. 
Whenever a new letter comes on screen, they have to rehearse out loud the last 3 letters in the series. 
After the last letter disappears, they have to enter the last 3 letters by selecting the correct letters
from a provided letter matrix.

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

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

(1) Raw data file: 'lettermemorytask_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. 
										
values.currentsetsize:				the current set Size used (default: 5, 7, or 9)
values.presentedLetters:			stores the presented letters (in the order they were presented)
values.recallDuration:				stores the duration (ms) of the recall (= difference in Start and End Time of recall screen)
response:						the participant's response in the recorded trial
values.last3:						stores the last 3 letters (in the order they were presented)
values.recalledletters:				stores a string of 3 recalled characters (if more than 3 are selected, they get ignored by computer)

values.ACC:					the correctness of the response 
									1 = correct (here: all letters were correctly recalled; order not important); 
									0 = otherwise
										
values.countCorrectLetters:		stores the number of letters correctly recalled for the current trial (min: 0 - max: 3)


(2) Summary data file: 'lettermemorytask_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)

only test trials considered:

expressions.propCorrect:			proportion correct test trials (proportion of trials where all 3 letters were correctly recalled -in any order)
expressions.mean_correctLetters:	mean number of letters correctly recalled per test trial (across set sizes)

* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions

___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	
3 set sizes tested: 5, 7, 9 (controlled by list.setSize under Editable Lists)

1. Practice: 3 practice trials (one per set size), order of set sizes randomly determined 
(change number of trials under section BLOCKS)
2. Test: 12 trials (4 per set size), order of set sizes randomly determined with the 
constraint that every set size appears once every 3 trials (change number of trials under section BLOCKS)

Trial Sequence:
Fixation (1000ms) -> 
5-9 letters (2500ms per letter, letters randomly selected without repeat) -> 
recall screen (until response) -> feedback (until response) -> ITI (0ms)

___________________________________________________________________________________________________________________
STIMULI
___________________________________________________________________________________________________________________
- 21 English consonants
- size can be controlled via editable parameters

___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________
Instructions are not original to the task. They are provided by Millisecond Software
as htm/html pages and can be edited by changing the provided htm/html files.
To edit htm/html-files: open the respective documents in simple Text Editors such as TextEdit (Mac)
or Notepad (Windows).

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

/fixationDuration:					the duration (in ms) of the fixation cross (default: 1000ms)
/letterDuration:					the duration (in ms) of each letter (default: 2500ms)
/stimSize:						the size of each letter in proportion of the canvas height (default: 8%)
/ITI:								the duration of the intertrial interval (in ms) presented after feedback (default: 0)