Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com), Millisecond
Created: March 01, 2012
Last Modified: January 07, 2025 by K. Borchert (katjab@millisecond.com), Millisecond
Script Copyright © Millisecond Software, LLC
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 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)
20 minutes
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, don't respond.
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, don't respond.
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, don't respond.
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, don't respond.
Etc. for increasing levels of N
- After instructions, participants receive 10 trials of practice per level N tested (here: N = 2 to N = 4),
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.
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
Adjustment of Level N:
(a) based on performance of participants either a higher, lower or the same level N is chosen for the following block
(after 15 blocks the session is over):
down: block acc performance < 75%correct
same level: 75%correct <= block acc performance < 90%
up: block acc performance >= 90%correct
(b) adaptive testing starts at level N = 1 in this script and can go up indefinitely
(c) participants receive performance feedback (% correct) after each block
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.
8 shapes, see section Editable Stimuli
provided by Millisecond - can be edited under section Editable Instructions
Instructions are not original to the task. They are provided by Millisecond
as htm pages and simple page elements and can be edited either by changing
the provided html files or directly under Editable Instructions.
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.
File Name: singlenbacktaskadaptive_shapes_summary*.iqdat
| Name | Description |
|---|---|
| inquisit.version | Inquisit version number |
| computer.platform | Device platform: win | mac |ios | android |
| startDate | Date the session was run |
| startTime | Time the session was run |
| subjectId | Participant ID |
| groupId | Group number |
| sessionId | Session number |
| elapsedTime | Session duration in ms |
| completed | 0 = Test was not completed 1 = Test was completed |
| totalBlocks | The total number of experimental blocks run |
| parameters.startN | The first level of N tested |
| parameters.minN | The lowest possible level of N that can be tested |
| meanLevelN | The mean level N run |
| medianLevelN | The median level N run |
| maxLevelN | The maximum level N run |
| minLevelN | The minimum level N 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 proportion correct (across all test blocks) |
| meanHitRT | Overall mean correct response time (in ms); is equal to the overall mean hit response time 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.hitsOverall.itemCount | The absolute number of target trials (across all test blocks) |
| hitRateOverall | Overall hit rate (across all test blocks) = hitting 'A' for targets |
| missRateOverall | Overall miss rate |
| hitRTOverall | Overall mean hit response time (in ms; across all test blocks) |
| list.commissionsOverall.itemCount | The absolute number of nontarget trials (across all test blocks) |
| faRateOverall | Overall False Alarm/Commission Error Rate (across all test blocks) = hitting 'A' for nontargets |
| crRateOverall | Overall correct rejection rate |
| faRT | Overall mean False Alarm response time (in ms; across all test blocks) |
| zHitRateOverall | The z-score of the overall hit rate |
| zFaRateOverall | The z-score of the overall False Alarm rate |
| dPrimeOverall | 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) |
| cOverall | C-criterion in signal detection:The absolute value of c provides an indication of the strength of the response bias/response style negative: participant more likely to report that signal (go stims) is present (liberal response style) may favor faster responding in speed-accuracy trade-off response paradigms positive: favoring caution (conservative response style) |
File Name: singlenbacktaskadaptive_shapes_raw.iqdat
| Name | Description |
|---|---|
| build | Inquisit version number |
| computer.platform | Device platform: win | mac |ios | android |
| date | Date the session was run |
| time | Time the session was run |
| subject, group, | With the current subject/groupnumber |
| session | Session number |
| blockCode | Name of the current block |
| blockNum | Number of the current block |
| trialCode | Name of the current trial |
| trialNum | Number of the current trial |
| 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 (positive response) |
| responseCategory | "Hit" vs. "Omission Error" vs. "CorrReject" vs. "Commission Error" |
| 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) |
The procedure can be adjusted by setting the following parameters.
| Name | Description | Default |
|---|---|---|
| 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 and N-level adjustments (default) false (0): performance during start trials that cannot be targets yet IS considered for block performance analyses (default) | |
| numberNBackTasks | The number of n-back tasks to perform for adaptive testing | 15 |
| moveUpCriterium | Sets the minimum proportion correct in a block to move up to the next level N excludes start trials by default | 0.9 |
| moveDownCriterium | Sets the minimum proportion correct in a block to stay on the same level N (anything lower and participant moves down a level) (default: 0.75); excludes start trials by default | |
| startN | Sets the starting N | 1 |
| lowestN | Sets the lowest possible N to run | 1 |
| soa | Stimulus Onset Asynchrony | 3000ms |
| stimulusPresentationTime | The presentation time (in ms) of the stimuli | 500ms |
| debugmode | Debugmode = 1: targetalerts are shown on screen, debugmode = 0, no targetalerts are shown (default) | 0 |