User Manual: Inquisit Dual Task N-Back Task


___________________________________________________________________________________________________________________	

									DUAL N-BACK TASK (nonadaptive)
									(Dutch Instructions)
___________________________________________________________________________________________________________________

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software LLC
Date: March, 2012
last updated:  09-20-2023 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Deze versie is aangepast door Yannick Vander Zwalmen, laatst aangepast op 13/12/2021.
Millisecond Software thanks Yannick Vander Zwalmen for sharing this Dutch translation!

Script Copyright © 09-20-2023 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________
											
This script implements a basic dual n-back procedure. The n-back task is a go/nogo working-memory performance task
with increasing levels of difficulty.

The implemented procedure is based on:	
								
Jaeggi, Susanne M.; Studer-Luethi, Barbara; Buschkuehl, Martin; Su, Yi-Fen; Jonides, John; Perrig, Walter J. (2010). 
The  relationship between n-back performance and matrix reasoning - implications for training and transfer. 
Intelligence, 38, 625–635.

Millisecond Software thanks Dr. Susanne Jaeggi for kindly providing original instruction materials, stimuli, 
as well as assistance!

Adjustments to z-scores as recommended by:
Gregg, A. & Sedikides, C. (2010). Narcissistic Fragility:
Rethinking Its Links to Explicit and Implicit Self-esteem, Self and Identity, 9:2, 142-161 (p.148)
											
___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________
In Dual n-back tasks, participants are presented with two sequences of stimuli in two modalities at the same time
Here:
a) VISUAL: a random sequence of blue squares that can be presented in 8 different locations on the screen  and 
b) AUDITORY: a random sequence of 8 spoken Roman letters 
In each trial one visual and one auditory stimulus are presented and participants are asked to indicate whether 
the currently presented stimuli fulfill the following criteria:

for N=0 trials:
- is the location of the square the same as the target location? If so (it's a target), and press "V". If not, don't press "V".
- is the letter the same as the target letter? If so (it's a target), and press "L". If not, don't press "L".

for N=1 trials:
- is the location of the square the same as the one  in the previous trial? If so (it's a target), and press "V".  If not, don't press "V".
- is the letter the same as the one in the previous trial? If so (it's a target), and press "L". If not, don't press "L".

for N=2 trials:
- is the location of the square the same as the one  two trials before? If so (it's a target), and press "V". If not, don't press "V".
- is the letter the same as the one two trials before? If so (it's a target), and press "L". If not, don't press "L".

for N=3 trials:
- is the location of the square the same as the one  three trials before? If so (it's a target), and press "V".  If not, don't press "V".
- is the letter the same as the one three trials before? If so (it's a target), and press "L". If not, don't press "L".

for N=4 trials:
- is the location of the square the same as the one four trials before? If so (it's a target), and press "V".  If not, don't press "V".
- is the letter the same as the one four trials before? If so (it's a target), and press "L". If not, don't press "L".

etc. for increasing levels of N

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

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

(1) Raw data file: 'dualnbacktask_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
session:						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. 
									
TotalBlocks:					the total number of experimental blocks run
N:								the current level N tested
starttrialcounter:				keeps track of how many start trials have been run

stimulusitem.1:					the shape presented

v_position:						contains the position of the current square
									1 = (25%, 25%), 2 = (50%, 25%), 3 = (75%, 25%), 4 = (25%, 50%), 
									5 = (75%, 50%), 6 = (25%, 75%), 7 = (50%, 75%), 8 = (75%, 75%)
									
v_currenttarget:				the position number of the current visual target

stimulusitem.2:					the letter presented
a_stimnumber:					the itemnumber of the current letter audio file									
a_currenttarget:				the itemnumber of the current visual target

1response:						stores the scancode of the first response made in a trial
										30 = A (response key for a visual target)
										38 = L (response key for an auditory target)
										0 = no response made
										
1latencyy:						the latency (in ms) of the first response										
																				
2response:						stores the scancode of the second response made in a trial
										30 = A (response key for a visual target)
										38 = L (response key for an auditory target)
										0 = no response made	
	
2latency:						the latency (in ms) of the second response		
											
v_responseCategory:	"vHit" vs. "vOmission Error" vs. "vCorrReject" vs. "vCommission Error"
a_responseCategory:	"aHit" vs. "aOmission Error" vs. "aCorrReject" vs. "aCommission Error"

correct:						the correctness of the response (1 = completely correct; 0 = otherwise)
latency:						the latency (in ms) of the last response made (if any),
								no response => latency will be equal to SOA
									
list.blockACC.mean:				proportion correct during the current block (start trials are excluded in block ACC assessment by default, editable)	
								correct = visual AND audio response are correct; error = any other response pattern
									
list.blockACC_visual.mean:		proportion correct visual responses during the current block (start trials are excluded in block ACC assessment by default, editable)	
list.blockACC_audio.mean:		proportion correct audio responses during the current block (start trials are excluded in block ACC assessment by default, editable)									
									
									
(2) Summary data file: 'dualnbacktask_summary*.iqdat' (a separate file for each participant)

inquisit.version:				Inquisit version run
computer.platform:				the platform the script was run on (win/mac/ios/android)
startDate:						date script was run
startTime:						time script was started
subjectid:						assigned subject id number
groupid:						assigned group id number
sessionid:						assigned session id number
elapsedTime:					time it took to run script (in ms); measured from onset to offset of script
completed:						0 = script was not completed (prematurely aborted); 
								1 = script was completed (all conditions run)
																		
TotalBlocks:					the total number of experimental blocks run

the following summary variables are only based on performance on trial.target/trial.nontarget 
(excludes trial.start even if parameters- excludeStartTrialfromPerformanceMeasure = false)

propCorrect_overall:			overall proportion correct (across all test blocks)
	
Note: z-score calculations: adjustments (see Gregg & Sedikides, 2010, p.148)
If the hit rate  FA rate is 0 => 0.005 is used instead (aka 0.005 is added to the hitFA rate)
IF the hit rate  FA rate is 1.0 => 0.995 is used instead (aka 0.005 is subtracted from the hitFA rate)

list.vHits.itemCount:			the number of visual target trials across all test blocks
vHitRate_overall:				the hitrate for visual targets across all test blocks (hit: pressing A for a visual target)
list.vFAs.itemCount:			the number of visual nontarget trials across all test blocks
vFArate_overall:				the false alarm rate for visual nontargets across all test blocks (False Alarm: pressing A for a visual nontarget)

z_vHitrate_overall:				computed z-score of the visual hitrate
z_vFArate_overall:				computed z-score of the visual false alarm rate

dprime_visual_overall:			visual d' (parametric measure of sensitivity):
								The higher the value, the better visual targets were overall correctly distinguished 
								from visual nontargets (d' = 0: chance performance; negative values: nontargets were treated as targets
								and targets were treated as nontargets)

list.aHits.itemCount:			the number of Audio target trials across all test blocks
aHitRate_overall:				the hitrate for Audio targets across all test blocks (hit: pressing A for a Audio target)
list.aFAs.itemCount:			the number of Audio nontarget trials across all test blocks
aFArate_overall:				the false alarm rate for Audio nontargets across all test blocks (False Alarm: pressing A for a Audio nontarget)

z_aHitrate_overall:				computed z-score of the Audio hitrate
z_aFArate_overall:				computed z-score of the Audio false alarm rate

dprime_audio_overall:			Audio d' (parametric measure of sensitivity):
								The higher the value, the better Audio targets were overall correctly distinguished 
								from Audio nontargets (d' = 0: chance performance; negative values: nontargets were treated as targets
								and targets were treated as nontargets)
										
DV:								((v_TotalHits - v_TotalFA) + (a_TotalHits - a_TotalFA))/2) /number of total experimental blocks
								Dependent Variable suggested by Jaeggi et al (2010)	

___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	

(1) Dual n-back Experiment (non-adaptive) information:
- After instructions, participants receive 10 trials of practice per level N tested (here: N = 1, N = 2, N = 3) - with possibility of repeat (editable).
- After practice, participants receive 3 blocks per level N tested (here: N = 1, N = 2, N = 3) (see list.nextN for possible edits)

Note: N-levels run
The levels and repetitions of N run by this script are controlled by list.nextN_practice and list.nextN under section Editable Lists.
By default, the list runs the selection items in sequence.
The levels of N can be easily altered (if altered for practice, the instruction slides might have to be edited as well)


(2) Dual n-back BLOCK information:
- Each dual n-task block consists of 20 + trials. 
=> + trials are the N trials that cannot display target shapes yet (=start trials). Their numbers vary depending on N. The data collected during these 
		start trials are NOT included in performance counts for Correct Rejections/False Alarms.
=> Of the actual  20 experimental trials, 4 present a visual target only, 4 present an auditory target only, 2 present both targets
and 10 present no targets at all
- The computer selects randomly 
a) which kind of trial 
b) what letter/ square location to use if it is not a target

(3) Dual n-back TRIAL informations:
- Each trial presents the square/letter for 500ms and waits another 2500ms before presenting the next square/letter in the sequence.
- Participants have the entire 3000ms to respond by pressing "V", "L", or both if they detect a target or two.

___________________________________________________________________________________________________________________
STIMULI
___________________________________________________________________________________________________________________
8 letter sound files, see section Editable Stimuli
a blue square

___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________	
provided by Millisecond Software - can be edited under section Editable Instructions

Instructions are provided by Millisecond Software
as htm pages and simple page elements and can be edited either by changing
the provided html files or directly under Editable Instructions.

Note: in order for the instructions to reflect alternative parameter settings,
some of the conditionalized code used in the htm files can be found in the script itself.

TASK DURATION
the default set-up of the script takes appr. XXX minutes to complete

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

/allowPracticeRepeat:						true: practice can be repeated as often as indicated (default)
											false: practice cannot be repeated
										
/excludeStartTrialfromPerformanceMeasure:	true (1): performance during start trials that cannot be targets yet is not considered 
											for BLOCK level performance analyses (aka feedback purposes) (default)									
											false (0): performance during start trials that cannot be targets yet IS considered
											for BLOCK level performance (aka feedback purposes) analyses (default)									

										
/SOA:										Stimulus Onset Asynchrony (default: 3000ms) 																						
/stimulusPresentationtime:					the presentation time (in ms) of the stimuli (default: 500ms)										
										
																			
debugmode = 0								debugmode = 1: targetalerts are shown on screen, 
											debugmode = 0, no targetalerts are shown (default)


(in general: if levels of N are changed, adjustments need to be made to instructions and list.Nlevel)