User Manual: Inquisit NBack Task (2 choice responding)


___________________________________________________________________________________________________________________	

						SINGLE N-BACK TASK - shapes (nonadaptive, 2-key version)
						(German version)
___________________________________________________________________________________________________________________	

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

Script Copyright © 09-23-2022 Millisecond Software

German Translation provided by K. Borchert for Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	
											
This script implements a basic shape 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 the 1-key single n-back task, participants are shown a sequence of stimuli (here: a sequence of yellow shapes
on a black background) and are asked to indicate whether the currently presented stimulus fulfills the following criteria:

for N=0 trials:
- is the shape the same as the shape '1.gif'? If so (it's a target), and press "A". If not, press the "L" key.

for N=1 trials:
- is the shape the same as the one that preceded it? If so (it's a target), and press "A". If not, press the "L" key.

for N=2 trials:
- is the shape the same as the one presented two trials before? If so (it's a target), and press "A". If not, press the "L" key.

for N=3 trials:
- is the shape the same as the one presented three trials before? If so (it's a target), and press "A". If not, press the "L" key.

etc. for increasing levels of N

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

___________________________________________________________________________________________________________________	
DATA FILE INFORMATION 
___________________________________________________________________________________________________________________	

(1) Raw data file: 'singlenbacktask_shapes_2keys_german_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
stimulusnumber.1: 				the item number of the presented shape
currenttarget:					the item number of the current target

response:						the Response of the participant (scancode of response button):
								0 = no response
								31 = 'A' key (target key)
								38 = 'L' key (non-target key)
								(57 = spacebar)
											
responseCategory:				"Correct", "Incorrect", "No Response"
correct:						the correctness of the response (1 = correct; 0 = otherwise)

latency:						how fast a participant responded within the given timeframe, if at all (in ms)
								no responses = the entire trialduration
									
list.blockACC.mean:				proportion correct during the current block (start trials are excluded from block ACC assessment by default, editable)
				
									
									
(2) Summary data file: 'singlenbacktask_shapes_2_keys_german_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)

TargetTrialCount_overall:			the overall count of target trials runs (across all test blocks)
propCorrect_targets_overall:		the overall proportion correctly responding to target trials (across all test blocks)
mean_corrRT_targets_overall:		mean response time (in ms) of correctly responding to target trials (across all test blocks) 
mean_incorrRT_targets_overall:		mean response time (in ms) of pressing incorrect response key for target trials (across all test blocks)  
propNR_targets_overall:				the overall proportion of No Response target trials (across all test blocks)

NonTargetTrialCount_overall:		the overall count of nontarget trials runs (across all test blocks)
propCorrect_nontargets_overall:		the overall proportion correctly responding to nontarget trials (across all test blocks)
mean_corrRT_nontargets_overall:		mean response time (in ms) of pressing correct response key for nontarget trials (across all test blocks) 
mean_incorrRT_nontargets_overall:	mean response time (in ms) of pressing incorrect response key for nontarget trials (across all test blocks)  
propNR_nontargets_overall:			the overall proportion of No Response nontarget trials (across all test blocks)

hitRate_overall:					overall hit rate (across all test blocks); 
									HIT = hitting 'A' for targets (no responses and incorrect responses are both treated as 'misses' for this analysis)

FArate_overall:						overall False Alarm/Commission Error Rate (across all test blocks); 
									FALSE ALARM = hitting 'A' for nontargets (correct rejections and no responses are treated as 'correct' for this analysis)
											
zhitrate_overall:					the z-score of the overall hit rate
zFArate_overall:					the z-score of the overall False Alarm rate

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

The following variables look at the different levels of N. If a level of N was not run,
the variables will store "not run"	
									
//Example Level N = 0										
TargetTrialCount_N0:				the overall count of target trials runs (in 0-back blocks)
propCorrect_targets_N0:				the overall proportion correctly responding to target trials (in 0-back blocks)
mean_corrRT_targets_N0:				mean response time (in ms) of correctly responding to target trials (in 0-back blocks) 
mean_incorrRT_targets_N0:			mean response time (in ms) of pressing incorrect response key for target trials (in 0-back blocks)  
propNR_targets_N0:					the overall proportion of No Response target trials (in 0-back blocks)

NonTargetTrialCount_N0:				the overall count of nontarget trials runs (in 0-back blocks)
propCorrect_nontargets_N0:			the overall proportion correctly responding to nontarget trials (in 0-back blocks)
mean_corrRT_nontargets_N0:			mean response time (in ms) of pressing correct response key for nontarget trials (in 0-back blocks) 
mean_incorrRT_nontargets_N0:		mean response time (in ms) of pressing incorrect response key for nontarget trials (in 0-back blocks)  
propNR_nontargets_N0:				the overall proportion of No Response nontarget trials (in 0-back blocks)

hitRate_N0:							overall hit rate (in 0-back blocks); 
									HIT = hitting 'A' for targets (no responses and incorrect responses are both treated as 'misses' for this analysis)

FArate_N0:							overall False Alarm/Commission Error Rate (in 0-back blocks); 
									FALSE ALARM = hitting 'A' for nontargets (correct rejections and no responses are treated as 'correct' for this analysis)
											
zhitrate_N0:						the z-score of the overall hit rate
zFArate_N0:							the z-score of the overall False Alarm rate

dprime_N0:							Computes d' (parametric measure of sensitivity):
									The higher the value, the better targets were overall correctly distinguished 
									from nontargets (d' = 0: chance performance; negative values: nontargets were treated as targets
									and targets were treated as nontargets)									
									
(same for Level N=1-6)
Note: if additional levels of N are run, go to section DATA and follow further instructions

___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________
- After instructions, participants receive 10 trials of practice per level N tested (here: N = 2 to N = 4), 
Note: edit list.nextN_practice to change levels of N practiced

- once practice is done, participants get the option to repeat practice (see parameters.allowPracticeRepeat)

- After practice, participants receive 3 blocks per level of N tested. By default, the level of N increases from
1 to 3.
Note: edit list.Nlevel to change a) N levels tested b) number of testblocks c)selection of N-levels

Block Information:
- Each single n-task block consists of 20+ trials using 8 different shapes. 
=> + 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, 6 present a target and 14 do not (3:7 ratio). 
To change the ratio, you need to change the relevant code under block.Test
- The computer selects randomly 
a) whether it is a target trial or not and 
b) what shape to show if it is not a target trial

Trial Information:
- Each trial presents the shape for 500ms and waits another 2500ms before presenting the next shape in the sequence
The trialduration can be edited by experimenter.
- Participants have the entire 3000ms to respond by pressing "A" if they detect a target or "L".

___________________________________________________________________________________________________________________
STIMULI
___________________________________________________________________________________________________________________
8 shapes, see section Editable Stimuli

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

Instructions are not original to the task. They 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.

___________________________________________________________________________________________________________________	
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, e.g. for feedback purposes (default)									
											false (0): performance during start trials that cannot be targets yet IS considered for block performance 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)