+x+x+x+x+x+xHi there!
I am looking to have my nback (2 response keys) show the 1back instructions, run the 1back, run a perceptual slider, and then repeat this sequence for the 2back and 3back. I have the perceptual slider working but cannot get the order working. Anyone have any advice? I'd appreciate it!
For starters, you could provide what you already have and explain clearly what exactly you're struggling with, i.e. what about implementing said block order is unclear to you?
I am doing a 1back, 2back, and then a 3back. I would like it so that there is a presentation of the 1back instructions, then they do the 1back task, and then they do a slider trial. I want this repeated for the 2back and 3back. Right now it's showing all of the instructions at once and then running through the 1back, 1back slider trial, 2back, 2back slider trial, 3back, and the 3back slider trial. I don't know how to make it like how I explained, I'd appreciate any help!
> I am doing a 1back, 2back, and then a 3back.
This is imprecise. How many 1back blocks? How many 2back blocks? How many 3back blocks? In the original script, there are three consecutive blocks at each N-level in the test phase. What about the practice phase?
And, again, please: Provide your actual code. I don't have your "perceptual slider" trial and I don't want to have to guess what it may or may not look like.
Right now, I'm not 100% sure what I have so the following are things I assume. I will send code to verify. For the practice blocks, there will be one block of 10 trials for the 1back, 2back, and 3back. For the experiment trials I have 1 block for the 1back, 2back, and 3back. There are going to be 98 trials for each of these. Following these will be the slider trials. The following are codes I have so far.
************************************************************************
Practice Trial
]
/ trials = [
1 = start;
2 - 10 = noreplace(nontarget, nontarget, target);
]
*************************************************************************
Experimental Trial
]
/ trials = [
1 = start;
2 - 98 = noreplace(nontarget, nontarget,target);
99 = slidertrial.nbackperception;
]
**************************************************************************
Slider Trial
<slidertrial nbackperception>
/ stimulusframes = [1=clearscreen, perceptionquestion]
/ range = (0,100)
/ increment = 1
/ orientation = horizontal
/ labels = ("<font color=white>0</font>", "<font color=white>100</font>")
/ required = true
/ position = (50%, 60%)
/ size = (90%, 20%)
/ buttonlabel = "Submit"
</slidertrial>
<text perceptionquestion>
/ items = ("Please enter the percentage you believe you got correct on the N-back task")
/ txcolor = white
/ txbgcolor = black
/ position = (50%, 30%)
</text>
************************************************************************
Experiment Blocks
<expt>
/ blocks = [
1 = Introduction;
2 = Practice;
3 = PracticeEnd;
4 = StartTest;
5 = Test;
6 = Finish;
]
</expt>
Can you please just attach the full script, not an incomplete excerpt? Parts of the excerpt you posted are not particularly relevant to what needs to be done, and other parts of the code that are very relevant aren't there at all.
Also, please spell out whether you want "the 1back instructions, run the 1back, run a perceptual slider, and then repeat this sequence for the 2back and 3back" for the practice phase only or want to repeatthe full 1back, 2back, etc. instructions before each of the respective test blocks as well.
Sorry about that. The full breakdown is I want the 1back instructions, 1back practice, 1back experimental trial, the perceptual slider, and then the 2back instructions, 2back practice, 2back experimental trial, the perceptual slider. The last part will be the 3back instructions, 3back practice, 3back experimental trial, and then the perceptual slider. Below is the full script. Thank you for your help!
</usermanual>
**************************************************************************************************************
**************************************************************************************************************
EDITABLE PARAMETERS: change editable parameters here
**************************************************************************************************************
**************************************************************************************************************
<parameters>
/allowPracticeRepeat = false
/excludeStartTrialfromPerformanceMeasure = true
/SOA = 3000
/stimulusPresentationtime = 500
/debugmode = 0
</parameters>
**************************************************************************************************************
**************************************************************************************************************
EDITABLE STIMULI: change editable stimuli here
**************************************************************************************************************
**************************************************************************************************************
*yellow on black background
*original letterss, kindly provided by Jaeggi et al (2010)
<item letters>
/1 = "B"
/2 = "C"
/3 = "D"
/4 = "F"
/5 = "G"
/6 = "H"
/7 = "J"
/8 = "K"
/9 = "L"
/10 = "M"
/11 = "N"
/12 = "P"
/13 = "Q"
/14 = "R"
/15 = "S"
/16 = "T"
/17 = "V"
/18 = "W"
/19 = "X"
/20 = "Z"
</item>
**************************************************************************************************************
**************************************************************************************************************
EDITABLE INSTRUCTIONS: change instructions here
**************************************************************************************************************
**************************************************************************************************************
<instruct>
/ fontstyle = ("Arial", 2.67%, false, false, false, false, 5, 0)
</instruct>
*******************************************************************************
General Introduction pages:
see below for possible edits of General Instruction Block
*******************************************************************************
<htmlpage generalintro>
/ file = "nback_generalintro.htm"
</htmlpage>
<htmlpage intro1back>
/ file = "nback_intro1back.htm"
</htmlpage>
<htmlpage intro2back>
/ file = "nback_intro2back.htm"
</htmlpage>
<htmlpage intro3back>
/ file = "nback_intro3back.htm"
</htmlpage>
Note: if you changed the levels of N tested, you need to adapt this intro page
<htmlpage practicestart>
/ file = "nback_practicestart.htm"
</htmlpage>
Note: if you changed the levels of N tested, you need to adapt this intro page
<htmlpage practiceend>
/ file = "nbackintro_practiceend.htm"
</htmlpage>
**************************************
Change instructions:
if not all instruction pages should be
run, remove pages from
/preinstruction = ()
Alternatively, you can also add
as many pages as you want
**************************************
<block Introduction>
/ preinstructions = (generalintro, intro1back, intro2back, intro3back, practicestart)
/ recorddata = false
</block>
*******************************************************************************
Level N Instructions:
*******************************************************************************
<htmlpage nback_levelInstructions>
/ file = "nback_levelinstructions.htm"
</htmlpage>
<expressions>
/nback_levelInstructions = {
if (values.N == 0){
"is the following letters:<br>
<img src='1.gif' style='height: 20vh' />"
} else {
"is the same as the one <%values.N%> trial(s) before"
}
}
</expressions>
*******************************************************************************
Repeat and Start pages
*******************************************************************************
<html repeatpractice_page>
/items = ("nback_repeatpractice.htm")
/size = (100%, 100%)
</html>
<htmlpage nback_testStart>
/ file = "nback_expstart.htm"
</htmlpage>
*******************************************************************************
Finish Pages
*******************************************************************************
<text finish>
/ items = ("Thank you!")
/ fontstyle = ("Arial", 8%, true, false, false, false, 5, 1)
/ position = (50%, 50%)
/ size = (80%, 80%)
/ vjustify = center
/ valign = center
/ halign = center
/ txbgcolor = black
/ txcolor = white
</text>
<text exit>
/ items = ("<press spacebar to exit>")
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ position = (50%, 90%)
/ size = (80%, 5%)
/ vjustify = center
/ valign = center
/ halign = center
/ txbgcolor = black
/ txcolor = white
</text>
**************************************************************************************************************
**************************************************************************************************************
EDITABLE LISTS: change editable lists here
**************************************************************************************************************
**************************************************************************************************************
Note: list controls the level of N run during practice. By default, practice runs level 2, 3, 4 once and
in sequence
<list nextN_practice>
/items = (1, 2, 3)
/ selectionmode = sequence
/ selectionrate = block
/ resetinterval = 0
</list>
*list.Nlevel selects the next N level (the experiment runs as many blocks as there are
items in this list) in sequence
! if you do NOT run level N = 3, remove all 3s from the item list of this list
! if you want to run a level more or fewer times adjust the number of the digits in the item list accordingly
! if you want to run the levels in sequence, replace /replace=false with /selectionmode = sequence
! you can add levels other than 1-3 (e.g. you can add level 5); however, summary variables are
only collected for 0 <= N <= 6
IN GENERAL: if you run different levels of N or change the number of repetitions, you need to adjust the item list of
list.nlevel (no other changes are required)
<list Nlevel>
/items = (1, 2, 3)
/ selectionmode = sequence
/ resetinterval = 0
</list>
**************************************************************************************************************
!!!REMAINING CODE: Customize after careful consideration only!!!
**************************************************************************************************************
**************************************************************************************************************
**************************************************************************************************************
DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 6.5.2.0 or higher
<defaults>
/canvasaspectratio = (4,3)
/minimumversion = "6.5.2.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/txbgcolor = white
/ txcolor = (0, 0, 0)
/ screencolor = black
</defaults>
**************************************************************************************************************
**************************************************************************************************************
DATA
**************************************************************************************************************
**************************************************************************************************************
Note: data file explanations under User Manual Information at the top
*********************
raw data
*********************
<data>
/ columns = (build, computer.platform, date, time, subject, group, session, blockcode, blocknum,
trialcode, trialnum,
values.TotalBlocks, values.N, values.starttrialcounter, stimulusitem, stimulusnumber,
values.currenttarget, response, values.responseCategory, correct, latency, list.blockACC.mean)
</data>
*********************
summary data
*********************
<summarydata>
/ columns = (inquisit.version, computer.platform, script.startdate, script.starttime,
script.subjectid, script.groupid, script.sessionid, script.elapsedtime,
script.completed,
values.TotalBlocks, expressions.propCorrect_overall,
expressions.TargetTrialCount_overall, expressions.propCorrect_targets_overall,expressions.mean_corrRT_targets_overall,
expressions.mean_incorrRT_targets_overall,expressions.propNR_targets_overall,
expressions.NonTargetTrialCount_overall, expressions.propCorrect_nontargets_overall,expressions.mean_corrRT_nontargets_overall,
expressions.mean_incorrRT_nontargets_overall,expressions.propNR_nontargets_overall,
expressions.hitRate_overall, expressions.FArate_overall, expressions.zhitrate_overall, expressions.zFArate_overall,
expressions.dprime_overall,
expressions.TargetTrialCount_N0, expressions.propCorrect_targets_N0,expressions.mean_corrRT_targets_N0,
expressions.mean_incorrRT_targets_N0,expressions.propNR_targets_N0,
expressions.NonTargetTrialCount_N0, expressions.propCorrect_nontargets_N0,expressions.mean_corrRT_nontargets_N0,
expressions.mean_incorrRT_nontargets_N0,expressions.propNR_nontargets_N0,
expressions.hitRate_N0, expressions.FArate_N0, expressions.zhitrate_N0, expressions.zFArate_N0, expressions.dprime_N0,
expressions.TargetTrialCount_N1, expressions.propCorrect_targets_N1,expressions.mean_corrRT_targets_N1,
expressions.mean_incorrRT_targets_N1,expressions.propNR_targets_N1,
expressions.NonTargetTrialCount_N1, expressions.propCorrect_nontargets_N1,expressions.mean_corrRT_nontargets_N1,
expressions.mean_incorrRT_nontargets_N1,expressions.propNR_nontargets_N1,
expressions.hitRate_N1, expressions.FArate_N1, expressions.zhitrate_N1, expressions.zFArate_N1, expressions.dprime_N1,
expressions.TargetTrialCount_N2, expressions.propCorrect_targets_N2,expressions.mean_corrRT_targets_N2,
expressions.mean_incorrRT_targets_N2,expressions.propNR_targets_N2,
expressions.NonTargetTrialCount_N2, expressions.propCorrect_nontargets_N2,expressions.mean_corrRT_nontargets_N2,
expressions.mean_incorrRT_nontargets_N2,expressions.propNR_nontargets_N2,
expressions.hitRate_N2, expressions.FArate_N2, expressions.zhitrate_N2, expressions.zFArate_N2, expressions.dprime_N2,
expressions.TargetTrialCount_N3, expressions.propCorrect_targets_N3,expressions.mean_corrRT_targets_N3,
expressions.mean_incorrRT_targets_N3,expressions.propNR_targets_N3,
expressions.NonTargetTrialCount_N3, expressions.propCorrect_nontargets_N3,expressions.mean_corrRT_nontargets_N3,
expressions.mean_incorrRT_nontargets_N3,expressions.propNR_nontargets_N3,
expressions.hitRate_N3, expressions.FArate_N3, expressions.zhitrate_N3, expressions.zFArate_N3, expressions.dprime_N3,
expressions.TargetTrialCount_N4, expressions.propCorrect_targets_N4,expressions.mean_corrRT_targets_N4,
expressions.mean_incorrRT_targets_N4,expressions.propNR_targets_N4,
expressions.NonTargetTrialCount_N4, expressions.propCorrect_nontargets_N4,expressions.mean_corrRT_nontargets_N4,
expressions.mean_incorrRT_nontargets_N4,expressions.propNR_nontargets_N4,
expressions.hitRate_N4, expressions.FArate_N4, expressions.zhitrate_N4, expressions.zFArate_N4, expressions.dprime_N4,
expressions.TargetTrialCount_N5, expressions.propCorrect_targets_N5,expressions.mean_corrRT_targets_N5,
expressions.mean_incorrRT_targets_N5,expressions.propNR_targets_N5,
expressions.NonTargetTrialCount_N5, expressions.propCorrect_nontargets_N5,expressions.mean_corrRT_nontargets_N5,
expressions.mean_incorrRT_nontargets_N5,expressions.propNR_nontargets_N5,
expressions.hitRate_N5, expressions.FArate_N5, expressions.zhitrate_N5, expressions.zFArate_N5, expressions.dprime_N5,
expressions.TargetTrialCount_N6, expressions.propCorrect_targets_N6,expressions.mean_corrRT_targets_N6,
expressions.mean_incorrRT_targets_N6,expressions.propNR_targets_N6,
expressions.NonTargetTrialCount_N6, expressions.propCorrect_nontargets_N6,expressions.mean_corrRT_nontargets_N6,
expressions.mean_incorrRT_nontargets_N6,expressions.propNR_nontargets_N6,
expressions.hitRate_N6, expressions.FArate_N6, expressions.zhitrate_N6, expressions.zFArate_N6, expressions.dprime_N6
)
</summarydata>
Note: by default, this script only stores summary variables of N=0 to N=6 (though other level of N can be run).
To store, summary variables for levels of N higher than 6, you need to:
1. add the necessary lists under section "Lists"
2. add necessary code to trial.target/trial.nontarget
3. add necessary expressions to section "Expressions"
4. reset necessary lists under block.StartTest
5. add necessary expressions to the summary data file
**************************************************************************************************************
**************************************************************************************************************
VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************
/N: the lag between a target and the stimulus it repeats
/currenttarget: contains the stimulusnumber of the current target
(a target in N = 0 trials, is the letters 'M')
/TotalBlocks: the total number of experimental blocks run
/starttrialcounter: keeps track of how many start trials have been run
/lastIndex: helper variable to manage the last N presented letters list
/responseCategory: "Hit" vs. "Omission Error" vs. "CorrReject" vs. "Commission Error"
<values>
/N = 0
/currenttarget = 0
/TotalBlocks = 0
/starttrialcounter = 0
/lastIndex = 0
/responseCategory = ""
</values>
**************************************************************************************************************
**************************************************************************************************************
EXPRESSIONS
**************************************************************************************************************
**************************************************************************************************************
/fillitemlist: recursive function that fills list.items with N items at the beginning of each new block
<expressions>
/fillitemlist = {
if (values.lastIndex < values.N){
list.items.insertitem(0, 1);
values.lastIndex += 1;
expressions.fillitemlist;
} else {
list.items.insertitem(0, 1);
};
}
</expressions>
<expressions>
/propCorrect_overall = ((list.ACC_nontargets.mean * list.ACC_nontargets.itemcount) + (list.ACC_targets.mean * list.ACC_targets.itemcount))/
(list.ACC_nontargets.itemcount + list.ACC_targets.itemcount)
/TargetTrialCount_overall = list.ACC_targets.itemcount
/propCorrect_targets_overall = list.ACC_targets.mean
/mean_corrRT_targets_overall = list.corrRT_targets.mean
/mean_incorrRT_targets_overall = list.incorrRT_targets.mean
/propNR_targets_overall = list.NR_targets.mean
/NonTargetTrialCount_overall = list.ACC_nontargets.itemcount
/propCorrect_nontargets_overall = list.ACC_nontargets.mean
/mean_corrRT_nontargets_overall = list.corrRT_nontargets.mean
/mean_incorrRT_nontargets_overall = list.incorrRT_nontargets.mean
/propNR_nontargets_overall = list.NR_nontargets.mean
/hitRate_overall = list.ACC_targets.mean
//False Alarms = pressing target key for nontargets: calculated based on the difference of correct responses to nontargets minus the number of no responses
/FArate_overall = (list.ACC_nontargets.itemcount - (list.ACC_nontargets.mean*list.ACC_nontargets.itemcount)-(list.NR_nontargets.mean*list.NR_nontargets.itemcount))/(list.ACC_nontargets.itemcount)
/ zhitrate_overall = {
if (expressions.hitRate_overall == 0){
zofp(expressions.hitRate_overall + 0.005)
} else if (expressions.hitRate_overall == 1){
zofp(expressions.hitRate_overall - 0.005)
} else {
zofp(expressions.hitRate_overall)
};
}
/ zFArate_overall = {
if (expressions.FArate_overall == 0){
zofp(expressions.FArate_overall + 0.005)
} else if (expressions.FArate_overall == 1){
zofp(expressions.FArate_overall - 0.005)
} else {
zofp(expressions.FArate_overall)
};
}
/ dprime_overall = (expressions.zhitrate_overall-expressions.zFArate_overall)
//if there are no items in list.ACC_targets_N0 then level N = 0 was not run
/TargetTrialCount_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.ACC_targets_N0.itemcount;
} else {
"not run";
};
};
/propCorrect_targets_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.ACC_targets_N0.mean;
} else {
"not run";
};
};
/mean_corrRT_targets_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.corrRT_targets_N0.mean;
} else {
"not run";
};
};
/mean_incorrRT_targets_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.incorrRT_targets_N0.mean;
} else {
"not run";
};
};
/propNR_targets_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.NR_targets_N0.mean;
} else {
"not run";
};
};
/NonTargetTrialCount_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.ACC_nontargets_N0.itemcount;
} else {
"not run";
};
};
/propCorrect_nontargets_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.ACC_nontargets_N0.mean;
} else {
"not run";
};
};
/mean_corrRT_nontargets_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.corrRT_nontargets_N0.mean;
} else {
"not run";
};
};
/mean_incorrRT_nontargets_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.incorrRT_nontargets_N0.mean;
} else {
"not run";
};
};
/propNR_nontargets_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.NR_nontargets_N0.mean;
} else {
"not run";
};
};
/hitRate_N0 = if (list.ACC_targets_N0.itemcount > 0){
list.ACC_targets_N0.mean;
} else {
"not run";
}
/FArate_N0 = if (list.ACC_targets_N0.itemcount > 0){
(list.ACC_nontargets_N0.itemcount - (list.ACC_nontargets_N0.mean*list.ACC_nontargets_N0.itemcount)-(list.NR_nontargets_N0.mean*list.NR_nontargets_N0.itemcount))/
(list.ACC_nontargets_N0.itemcount);
} else {
"not run";
}
/ zhitrate_N0 =
if (list.ACC_targets_N0.itemcount > 0){
if (expressions.hitRate_N0 == 0){
zofp(expressions.hitRate_N0 + 0.005)
} else if (expressions.hitRate_N0 == 1){
zofp(expressions.hitRate_N0 - 0.005)
} else {
zofp(expressions.hitRate_N0);
};
} else {
"not run";
}
/ zFArate_N0 =
if (list.ACC_targets_N0.itemcount > 0){
if (expressions.FArate_N0 == 0){
zofp(expressions.FArate_N0 + 0.005)
} else if (expressions.FArate_N0 == 1){
zofp(expressions.FArate_N0 - 0.005)
} else {
zofp(expressions.FArate_N0)
};
} else {
"not run";
}
/ dprime_N0 = if (list.ACC_targets_N0.itemcount > 0){
(expressions.zhitrate_N0-expressions.zFArate_N0);
} else {
"not run";
}
//if there are no items in list.ACC_targets_N1 then level N = 0 was not run
/TargetTrialCount_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.ACC_targets_N1.itemcount;
} else {
"not run";
};
};
/propCorrect_targets_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.ACC_targets_N1.mean;
} else {
"not run";
};
};
/mean_corrRT_targets_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.corrRT_targets_N1.mean;
} else {
"not run";
};
};
/mean_incorrRT_targets_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.incorrRT_targets_N1.mean;
} else {
"not run";
};
};
/propNR_targets_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.NR_targets_N1.mean;
} else {
"not run";
};
};
/NonTargetTrialCount_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.ACC_nontargets_N1.itemcount;
} else {
"not run";
};
};
/propCorrect_nontargets_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.ACC_nontargets_N1.mean;
} else {
"not run";
};
};
/mean_corrRT_nontargets_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.corrRT_nontargets_N1.mean;
} else {
"not run";
};
};
/mean_incorrRT_nontargets_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.incorrRT_nontargets_N1.mean;
} else {
"not run";
};
};
/propNR_nontargets_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.NR_nontargets_N1.mean;
} else {
"not run";
};
};
/hitRate_N1 = if (list.ACC_targets_N1.itemcount > 0){
list.ACC_targets_N1.mean;
} else {
"not run";
}
/FArate_N1 = if (list.ACC_targets_N1.itemcount > 0){
(list.ACC_nontargets_N1.itemcount-(list.ACC_nontargets_N1.mean*list.ACC_nontargets_N1.itemcount)-(list.NR_nontargets_N1.mean*list.NR_nontargets_N1.itemcount))/
(list.ACC_nontargets_N1.itemcount);
} else {
"not run";
}
/ zhitrate_N1 =
if (list.ACC_targets_N1.itemcount > 0){
if (expressions.hitRate_N1 == 0){
zofp(expressions.hitRate_N1 + 0.005)
} else if (expressions.hitRate_N1 == 1){
zofp(expressions.hitRate_N1 - 0.005)
} else {
zofp(expressions.hitRate_N1);
};
} else {
"not run";
}
/ zFArate_N1 =
if (list.ACC_targets_N1.itemcount > 0){
if (expressions.FArate_N1 == 0){
zofp(expressions.FArate_N1 + 0.005)
} else if (expressions.FArate_N1 == 1){
zofp(expressions.FArate_N1 - 0.005)
} else {
zofp(expressions.FArate_N1)
};
} else {
"not run";
}
/ dprime_N1 = if (list.ACC_targets_N1.itemcount > 0){
(expressions.zhitrate_N1-expressions.zFArate_N1);
} else {
"not run";
}
//if there are no items in list.ACC_targets_N2 then level N = 0 was not run
/TargetTrialCount_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.ACC_targets_N2.itemcount;
} else {
"not run";
};
};
/propCorrect_targets_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.ACC_targets_N2.mean;
} else {
"not run";
};
};
/mean_corrRT_targets_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.corrRT_targets_N2.mean;
} else {
"not run";
};
};
/mean_incorrRT_targets_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.incorrRT_targets_N2.mean;
} else {
"not run";
};
};
/propNR_targets_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.NR_targets_N2.mean;
} else {
"not run";
};
};
/NonTargetTrialCount_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.ACC_nontargets_N2.itemcount;
} else {
"not run";
};
};
/propCorrect_nontargets_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.ACC_nontargets_N2.mean;
} else {
"not run";
};
};
/mean_corrRT_nontargets_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.corrRT_nontargets_N2.mean;
} else {
"not run";
};
};
/mean_incorrRT_nontargets_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.incorrRT_nontargets_N2.mean;
} else {
"not run";
};
};
/propNR_nontargets_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.NR_nontargets_N2.mean;
} else {
"not run";
};
};
/hitRate_N2 = if (list.ACC_targets_N2.itemcount > 0){
list.ACC_targets_N2.mean;
} else {
"not run";
}
/FArate_N2 = if (list.ACC_targets_N2.itemcount > 0){
(list.ACC_nontargets_N2.itemcount - (list.ACC_nontargets_N2.mean*list.ACC_nontargets_N2.itemcount)-(list.NR_nontargets_N2.mean*list.NR_nontargets_N2.itemcount))/
(list.ACC_nontargets_N2.itemcount);
} else {
"not run";
}
/ zhitrate_N2 =
if (list.ACC_targets_N2.itemcount > 0){
if (expressions.hitRate_N2 == 0){
zofp(expressions.hitRate_N2 + 0.005)
} else if (expressions.hitRate_N2 == 1){
zofp(expressions.hitRate_N2 - 0.005)
} else {
zofp(expressions.hitRate_N2);
};
} else {
"not run";
}
/ zFArate_N2 =
if (list.ACC_targets_N2.itemcount > 0){
if (expressions.FArate_N2 == 0){
zofp(expressions.FArate_N2 + 0.005)
} else if (expressions.FArate_N2 == 1){
zofp(expressions.FArate_N2 - 0.005)
} else {
zofp(expressions.FArate_N2)
};
} else {
"not run";
}
/ dprime_N2 = if (list.ACC_targets_N2.itemcount > 0){
(expressions.zhitrate_N2-expressions.zFArate_N2);
} else {
"not run";
}
//if there are no items in list.ACC_targets_N3 then level N = 0 was not run
/TargetTrialCount_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.ACC_targets_N3.itemcount;
} else {
"not run";
};
};
/propCorrect_targets_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.ACC_targets_N3.mean;
} else {
"not run";
};
};
/mean_corrRT_targets_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.corrRT_targets_N3.mean;
} else {
"not run";
};
};
/mean_incorrRT_targets_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.incorrRT_targets_N3.mean;
} else {
"not run";
};
};
/propNR_targets_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.NR_targets_N3.mean;
} else {
"not run";
};
};
/NonTargetTrialCount_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.ACC_nontargets_N3.itemcount;
} else {
"not run";
};
};
/propCorrect_nontargets_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.ACC_nontargets_N3.mean;
} else {
"not run";
};
};
/mean_corrRT_nontargets_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.corrRT_nontargets_N3.mean;
} else {
"not run";
};
};
/mean_incorrRT_nontargets_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.incorrRT_nontargets_N3.mean;
} else {
"not run";
};
};
/propNR_nontargets_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.NR_nontargets_N3.mean;
} else {
"not run";
};
};
/hitRate_N3 = if (list.ACC_targets_N3.itemcount > 0){
list.ACC_targets_N3.mean;
} else {
"not run";
}
/FArate_N3 = if (list.ACC_targets_N3.itemcount > 0){
(list.ACC_nontargets_N3.itemcount - (list.ACC_nontargets_N3.mean*list.ACC_nontargets_N3.itemcount)-(list.NR_nontargets_N3.mean*list.NR_nontargets_N3.itemcount))/
(list.ACC_nontargets_N3.itemcount);
} else {
"not run";
}
/ zhitrate_N3 =
if (list.ACC_targets_N3.itemcount > 0){
if (expressions.hitRate_N3 == 0){
zofp(expressions.hitRate_N3 + 0.005)
} else if (expressions.hitRate_N3 == 1){
zofp(expressions.hitRate_N3 - 0.005)
} else {
zofp(expressions.hitRate_N3);
};
} else {
"not run";
}
/ zFArate_N3 =
if (list.ACC_targets_N3.itemcount > 0){
if (expressions.FArate_N3 == 0){
zofp(expressions.FArate_N3 + 0.005)
} else if (expressions.FArate_N3 == 1){
zofp(expressions.FArate_N3 - 0.005)
} else {
zofp(expressions.FArate_N3)
};
} else {
"not run";
}
/ dprime_N3 = if (list.ACC_targets_N3.itemcount > 0){
(expressions.zhitrate_N3-expressions.zFArate_N3);
} else {
"not run";
}
//if there are no items in list.ACC_targets_N4 then level N = 0 was not run
/TargetTrialCount_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.ACC_targets_N4.itemcount;
} else {
"not run";
};
};
/propCorrect_targets_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.ACC_targets_N4.mean;
} else {
"not run";
};
};
/mean_corrRT_targets_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.corrRT_targets_N4.mean;
} else {
"not run";
};
};
/mean_incorrRT_targets_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.incorrRT_targets_N4.mean;
} else {
"not run";
};
};
/propNR_targets_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.NR_targets_N4.mean;
} else {
"not run";
};
};
/NonTargetTrialCount_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.ACC_nontargets_N4.itemcount;
} else {
"not run";
};
};
/propCorrect_nontargets_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.ACC_nontargets_N4.mean;
} else {
"not run";
};
};
/mean_corrRT_nontargets_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.corrRT_nontargets_N4.mean;
} else {
"not run";
};
};
/mean_incorrRT_nontargets_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.incorrRT_nontargets_N4.mean;
} else {
"not run";
};
};
/propNR_nontargets_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.NR_nontargets_N4.mean;
} else {
"not run";
};
};
/hitRate_N4 = if (list.ACC_targets_N4.itemcount > 0){
list.ACC_targets_N4.mean;
} else {
"not run";
}
/FArate_N4 = if (list.ACC_targets_N4.itemcount > 0){
(list.ACC_nontargets_N4.itemcount - (list.ACC_nontargets_N4.mean*list.ACC_nontargets_N4.itemcount)-(list.NR_nontargets_N4.mean*list.NR_nontargets_N4.itemcount))/
(list.ACC_nontargets_N4.itemcount);
} else {
"not run";
}
/ zhitrate_N4 =
if (list.ACC_targets_N4.itemcount > 0){
if (expressions.hitRate_N4 == 0){
zofp(expressions.hitRate_N4 + 0.005)
} else if (expressions.hitRate_N4 == 1){
zofp(expressions.hitRate_N4 - 0.005)
} else {
zofp(expressions.hitRate_N4);
};
} else {
"not run";
}
/ zFArate_N4 =
if (list.ACC_targets_N4.itemcount > 0){
if (expressions.FArate_N4 == 0){
zofp(expressions.FArate_N4 + 0.005)
} else if (expressions.FArate_N4 == 1){
zofp(expressions.FArate_N4 - 0.005)
} else {
zofp(expressions.FArate_N4)
};
} else {
"not run";
}
/ dprime_N4 = if (list.ACC_targets_N4.itemcount > 0){
(expressions.zhitrate_N4-expressions.zFArate_N4);
} else {
"not run";
}
//if there are no items in list.ACC_targets_N5 then level N = 0 was not run
/TargetTrialCount_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.ACC_targets_N5.itemcount;
} else {
"not run";
};
};
/propCorrect_targets_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.ACC_targets_N5.mean;
} else {
"not run";
};
};
/mean_corrRT_targets_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.corrRT_targets_N5.mean;
} else {
"not run";
};
};
/mean_incorrRT_targets_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.incorrRT_targets_N5.mean;
} else {
"not run";
};
};
/propNR_targets_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.NR_targets_N5.mean;
} else {
"not run";
};
};
/NonTargetTrialCount_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.ACC_nontargets_N5.itemcount;
} else {
"not run";
};
};
/propCorrect_nontargets_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.ACC_nontargets_N5.mean;
} else {
"not run";
};
};
/mean_corrRT_nontargets_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.corrRT_nontargets_N5.mean;
} else {
"not run";
};
};
/mean_incorrRT_nontargets_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.incorrRT_nontargets_N5.mean;
} else {
"not run";
};
};
/propNR_nontargets_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.NR_nontargets_N5.mean;
} else {
"not run";
};
};
/hitRate_N5 = if (list.ACC_targets_N5.itemcount > 0){
list.ACC_targets_N5.mean;
} else {
"not run";
}
/FArate_N5 = if (list.ACC_targets_N5.itemcount > 0){
(list.ACC_nontargets_N5.itemcount - (list.ACC_nontargets_N5.mean*list.ACC_nontargets_N5.itemcount)-(list.NR_nontargets_N5.mean*list.NR_nontargets_N5.itemcount))/
(list.ACC_nontargets_N5.itemcount);
} else {
"not run";
}
/ zhitrate_N5 =
if (list.ACC_targets_N5.itemcount > 0){
if (expressions.hitRate_N5 == 0){
zofp(expressions.hitRate_N5 + 0.005)
} else if (expressions.hitRate_N5 == 1){
zofp(expressions.hitRate_N5 - 0.005)
} else {
zofp(expressions.hitRate_N5);
};
} else {
"not run";
}
/ zFArate_N5 =
if (list.ACC_targets_N5.itemcount > 0){
if (expressions.FArate_N5 == 0){
zofp(expressions.FArate_N5 + 0.005)
} else if (expressions.FArate_N5 == 1){
zofp(expressions.FArate_N5 - 0.005)
} else {
zofp(expressions.FArate_N5)
};
} else {
"not run";
}
/ dprime_N5 = if (list.ACC_targets_N5.itemcount > 0){
(expressions.zhitrate_N5-expressions.zFArate_N5);
} else {
"not run";
}
//if there are no items in list.ACC_targets_N6 then level N = 0 was not run
/TargetTrialCount_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.ACC_targets_N6.itemcount;
} else {
"not run";
};
};
/propCorrect_targets_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.ACC_targets_N6.mean;
} else {
"not run";
};
};
/mean_corrRT_targets_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.corrRT_targets_N6.mean;
} else {
"not run";
};
};
/mean_incorrRT_targets_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.incorrRT_targets_N6.mean;
} else {
"not run";
};
};
/propNR_targets_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.NR_targets_N6.mean;
} else {
"not run";
};
};
/NonTargetTrialCount_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.ACC_nontargets_N6.itemcount;
} else {
"not run";
};
};
/propCorrect_nontargets_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.ACC_nontargets_N6.mean;
} else {
"not run";
};
};
/mean_corrRT_nontargets_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.corrRT_nontargets_N6.mean;
} else {
"not run";
};
};
/mean_incorrRT_nontargets_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.incorrRT_nontargets_N6.mean;
} else {
"not run";
};
};
/propNR_nontargets_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.NR_nontargets_N6.mean;
} else {
"not run";
};
};
/hitRate_N6 = if (list.ACC_targets_N6.itemcount > 0){
list.ACC_targets_N6.mean;
} else {
"not run";
}
/FArate_N6 = if (list.ACC_targets_N6.itemcount > 0){
(list.ACC_nontargets_N6.itemcount - (list.ACC_nontargets_N6.mean*list.ACC_nontargets_N6.itemcount)-(list.NR_nontargets_N6.mean*list.NR_nontargets_N6.itemcount))/
(list.ACC_nontargets_N6.itemcount);
} else {
"not run";
}
/ zhitrate_N6 =
if (list.ACC_targets_N6.itemcount > 0){
if (expressions.hitRate_N6 == 0){
zofp(expressions.hitRate_N6 + 0.005)
} else if (expressions.hitRate_N6 == 1){
zofp(expressions.hitRate_N6 - 0.005)
} else {
zofp(expressions.hitRate_N6);
};
} else {
"not run";
}
/ zFArate_N6 =
if (list.ACC_targets_N6.itemcount > 0){
if (expressions.FArate_N6 == 0){
zofp(expressions.FArate_N6 + 0.005)
} else if (expressions.FArate_N6 == 1){
zofp(expressions.FArate_N6 - 0.005)
} else {
zofp(expressions.FArate_N6)
};
} else {
"not run";
}
/ dprime_N6 = if (list.ACC_targets_N6.itemcount > 0){
(expressions.zhitrate_N6-expressions.zFArate_N6);
} else {
"not run";
}
</expressions>
**************************************************************************************************************
**************************************************************************************************************
INSTRUCTIONS
**************************************************************************************************************
**************************************************************************************************************
<trial repeatpractice>
/ stimulusframes = [1 = repeatpractice_page]
/ validresponse = ("Y", "N")
/ recorddata = false
</trial>
<trial finish>
/ inputdevice = keyboard
/ stimulusframes = [1 = finish, exit]
/ validresponse = (" ")
/ recorddata = false
</trial>
**************************************************************************************************************
**************************************************************************************************************
STIMULI
**************************************************************************************************************
**************************************************************************************************************
***randomly selects one of the
<text startletters>
/ items = letters
/select = replace
/ position = (50%, 50%)
/ txcolor = white
/ txbgcolor = black
/ fontstyle = ("Arial", 20%, false, false, false, false, 5, 0)
</text>
***selects any number that cannot be a target
<text nontargetletters>
/ items = letters
/select = list.notargetvalue.nextvalue
/ position = (50%, 50%)
/ txcolor = white
/ txbgcolor = black
/ fontstyle = ("Arial", 20%, false, false, false, false, 5, 0)
</text>
***selects the item with the same item number as the established target
<text targetletters>
/ items = letters
/select = values.currenttarget
/ position = (50%, 50%)
/ txcolor = white
/ txbgcolor = black
/ fontstyle = ("Arial", 20%, false, false, false, false, 5, 0)
</text>
FEEDBACK MESSAGES FOR PRACTICE TRIALS ONLY (default: they are NOT used)
<text ErrorFeedback>
/ items = ("ERROR")
/ fontstyle = ("Arial", 5.00%, true, false, false, false, 5, 0)
/ txcolor = red
/ txbgcolor = black
/ position = (50%, 70%)
</text>
ASSISTANT STIMULI:
*****reminder that the number participants see during the first trial in N = 0 nback trials is the target
<text targetreminder>
/ items = ("this is the target")
/ position = (50%, 25%)
/ txbgcolor = black
/ txcolor = black
/ fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 0)
</text>
*****For timed instructions, this shape covers up the original instructions (on slides)
that instruct participants to use the Spacebar to continue
<shape eraserrec>
/shape = rectangle
/color = black
/ position = (50%, 95%)
/ size = (100%, 8%)
</shape>
*****Debug Code:
<text targetalert>
/ onprepare = [text.targetalert.skip = !parameters.debugmode;]
/items = ("target")
/position = (50%, 80%)
/txcolor = red
/txbgcolor = black
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 1)
</text>
**************************************************************************************************************
**************************************************************************************************************
LISTS
**************************************************************************************************************
**************************************************************************************************************
****list Variables to select notargetvalue
*list.notargetvalue selects any of the 8 letters but the one selected for targetvalue
<list notargetvalue>
/items = (1, 2, 3, 4, 5, 6, 7, 8, 9)
/ not = (values.currenttarget)
/ replace = true
</list>
Note: list contains the itemletters of the presented letterss in reversed order (dynamic list)
(item 1 is always the last one presented)
<list items>
</list>
*************************************************
Data Lists: used for descriptive statistics
store correct latencies/accuracy data
fill up during runtime
*************************************************
<list blockACC>
</list>
1 = correct response to targets; 0 = otherwise
<list ACC_targets>
</list>
1 = a no response to a target; 0 = any other response
<list NR_targets>
</list>
stores the latencies of correct target trials
<list corrRT_targets>
</list>
stores the latencies of incorrect responses (no responses excluded) to targets
<list incorrRT_targets>
</list>
<list ACC_nontargets>
</list>
<list NR_nontargets>
</list>
<list corrRT_nontargets>
</list>
<list incorrRT_nontargets>
</list>
****************************************
per level of N
****************************************
<list ACC_targets_N0>
</list>
<list NR_targets_N0>
</list>
<list corrRT_targets_N0>
</list>
<list incorrRT_targets_N0>
</list>
<list ACC_nontargets_N0>
</list>
<list NR_nontargets_N0>
</list>
<list corrRT_nontargets_N0>
</list>
<list incorrRT_nontargets_N0>
</list>
<list ACC_targets_N1>
</list>
<list NR_targets_N1>
</list>
<list corrRT_targets_N1>
</list>
<list incorrRT_targets_N1>
</list>
<list ACC_nontargets_N1>
</list>
<list NR_nontargets_N1>
</list>
<list corrRT_nontargets_N1>
</list>
<list incorrRT_nontargets_N1>
</list>
<list ACC_targets_N2>
</list>
<list NR_targets_N2>
</list>
<list corrRT_targets_N2>
</list>
<list incorrRT_targets_N2>
</list>
<list ACC_nontargets_N2>
</list>
<list NR_nontargets_N2>
</list>
<list corrRT_nontargets_N2>
</list>
<list incorrRT_nontargets_N2>
</list>
<list ACC_targets_N3>
</list>
<list NR_targets_N3>
</list>
<list corrRT_targets_N3>
</list>
<list incorrRT_targets_N3>
</list>
<list ACC_nontargets_N3>
</list>
<list NR_nontargets_N3>
</list>
<list corrRT_nontargets_N3>
</list>
<list incorrRT_nontargets_N3>
</list>
<list ACC_targets_N4>
</list>
<list NR_targets_N4>
</list>
<list corrRT_targets_N4>
</list>
<list incorrRT_targets_N4>
</list>
<list ACC_nontargets_N4>
</list>
<list NR_nontargets_N4>
</list>
<list corrRT_nontargets_N4>
</list>
<list incorrRT_nontargets_N4>
</list>
<list ACC_targets_N5>
</list>
<list NR_targets_N5>
</list>
<list corrRT_targets_N5>
</list>
<list incorrRT_targets_N5>
</list>
<list ACC_nontargets_N5>
</list>
<list NR_nontargets_N5>
</list>
<list corrRT_nontargets_N5>
</list>
<list incorrRT_nontargets_N5>
</list>
<list ACC_targets_N6>
</list>
<list NR_targets_N6>
</list>
<list corrRT_targets_N6>
</list>
<list incorrRT_targets_N6>
</list>
<list ACC_nontargets_N6>
</list>
<list NR_nontargets_N6>
</list>
<list corrRT_nontargets_N6>
</list>
<list incorrRT_nontargets_N6>
</list>
**************************************************************************************************************
**************************************************************************************************************
TRIALS
**************************************************************************************************************
**************************************************************************************************************
*there are 3 types of trials
1. start: presented at beginning of block when number of trials too small for Target trials; they can present
any of the stimuli (N = 0, start trial is skipped)
2. nontarget: trials that present stimuli that do not repeat the stimulus of n-trials before
3. target: trials that present Target stimuli
**********************************
Starttrial
**********************************
NOTE:
* for N = 0 trials: the trial is skipped
* for any other N: start trial runs N-times
<trial start>
/skip =[
values.N == 0;
]
/ ontrialbegin = [
trial.start.insertstimulustime(clearscreen, parameters.stimulusPresentationtime);
values.starttrialcounter += 1;
]
/ stimulustimes = [0 = startletters, targetreminder]
/ beginresponsetime = 0
/ validresponse = (noresponse, "A", "L")
/ correctresponse = ("L")
/ ontrialend = [
trial.start.resetstimulusframes();
list.items.insertitem(text.startletters.currentitemnumber, 1);
text.targetreminder.textcolor = black;
if (trial.start.correct){
values.responseCategory = "Correct";
} else if (trial.start.responsetext == "A"){
values.responseCategory = "Incorrect ";
} else {
values.responseCategory = "No response";
};
if (parameters.excludeStartTrialfromPerformanceMeasure == false){
list.blockACC.appenditem(trial.start.correct);
};
]
/trialduration = parameters.SOA
/branch = [
if (values.starttrialcounter < values.N) {
return trial.start;
};
]
</trial>
**********************************
Nontarget Trials
**********************************
<trial nontarget>
/ ontrialbegin = [
trial.nontarget.insertstimulustime(clearscreen, parameters.stimulusPresentationtime);
if (values.N > 0){
values.currenttarget = list.items.item(values.N);
};
]
/ stimulustimes = [0 = nontargetletters]
/validresponse = (noresponse, "A", "L")
/ beginresponsetime = 0
/ correctresponse = ("L")
/ ontrialend = [
trial.nontarget.resetstimulusframes();
list.items.insertitem(text.nontargetletters.currentitemnumber, 1);
list.blockACC.appenditem(trial.nontarget.correct);
if (trial.nontarget.correct){
values.responseCategory = "Correct";
list.ACC_nontargets.appenditem(1);
list.corrRT_nontargets.appenditem(trial.nontarget.latency);
list.NR_nontargets.appenditem(0);
if (values.N == 0){
list.ACC_nontargets_N0.appenditem(1);
list.corrRT_nontargets_N0.appenditem(trial.nontarget.latency);
list.NR_nontargets_N0.appenditem(0);
} else if (values.N == 1){
list.ACC_nontargets_N1.appenditem(1);
list.corrRT_nontargets_N1.appenditem(trial.nontarget.latency);
list.NR_nontargets_N1.appenditem(0);
} else if (values.N == 2){
list.ACC_nontargets_N2.appenditem(1);
list.corrRT_nontargets_N2.appenditem(trial.nontarget.latency);
list.NR_nontargets_N2.appenditem(0);
} else if (values.N == 3){
list.ACC_nontargets_N3.appenditem(1);
list.corrRT_nontargets_N3.appenditem(trial.nontarget.latency);
list.NR_nontargets_N3.appenditem(0);
} else if (values.N == 4){
list.ACC_nontargets_N4.appenditem(1);
list.corrRT_nontargets_N4.appenditem(trial.nontarget.latency);
list.NR_nontargets_N4.appenditem(0);
} else if (values.N == 5){
list.ACC_nontargets_N5.appenditem(1);
list.corrRT_nontargets_N5.appenditem(trial.nontarget.latency);
list.NR_nontargets_N5.appenditem(0);
} else if (values.N == 6){
list.ACC_nontargets_N6.appenditem(1);
list.corrRT_nontargets_N6.appenditem(trial.nontarget.latency);
list.NR_nontargets_N6.appenditem(0);
}//if further values of N should be added, add the necessary code here
} else if (trial.nontarget.responsetext == "A"){
values.responseCategory = "Incorrect";
list.ACC_nontargets.appenditem(0);
list.incorrRT_nontargets.appenditem(trial.nontarget.latency);
list.NR_nontargets.appenditem(0);
if (values.N == 0){
list.ACC_nontargets_N0.appenditem(0);
list.incorrRT_nontargets_N0.appenditem(trial.nontarget.latency);
list.NR_nontargets_N0.appenditem(0);
} else if (values.N == 1){
list.ACC_nontargets_N1.appenditem(0);
list.incorrRT_nontargets_N1.appenditem(trial.nontarget.latency);
list.NR_nontargets_N1.appenditem(0);
} else if (values.N == 2){
list.ACC_nontargets_N2.appenditem(0);
list.incorrRT_nontargets_N2.appenditem(trial.nontarget.latency);
list.NR_nontargets_N2.appenditem(0);
} else if (values.N == 3){
list.ACC_nontargets_N3.appenditem(0);
list.incorrRT_nontargets_N3.appenditem(trial.nontarget.latency);
list.NR_nontargets_N3.appenditem(0);
} else if (values.N == 4){
list.ACC_nontargets_N4.appenditem(0);
list.incorrRT_nontargets_N4.appenditem(trial.nontarget.latency);
list.NR_nontargets_N4.appenditem(0);
} else if (values.N == 5){
list.ACC_nontargets_N5.appenditem(0);
list.incorrRT_nontargets_N5.appenditem(trial.nontarget.latency);
list.NR_nontargets_N5.appenditem(0);
} else if (values.N == 6){
list.ACC_nontargets_N6.appenditem(0);
list.incorrRT_nontargets_N6.appenditem(trial.nontarget.latency);
list.NR_nontargets_N6.appenditem(0);
}//if further values of N should be added, add the necessary code here
} else {
values.responseCategory = "No Response";
list.ACC_nontargets.appenditem(0);
list.NR_nontargets.appenditem(1);
if (values.N == 0){
list.ACC_nontargets_N0.appenditem(0);
list.NR_nontargets_N0.appenditem(1);
} else if (values.N == 1){
list.ACC_nontargets_N1.appenditem(0);
list.NR_nontargets_N1.appenditem(1);
} else if (values.N == 2){
list.ACC_nontargets_N2.appenditem(0);
list.NR_nontargets_N2.appenditem(1);
} else if (values.N == 3){
list.ACC_nontargets_N3.appenditem(0);
list.NR_nontargets_N3.appenditem(1);
} else if (values.N == 4){
list.ACC_nontargets_N4.appenditem(0);
list.NR_nontargets_N4.appenditem(1);
} else if (values.N == 5){
list.ACC_nontargets_N5.appenditem(0);
list.NR_nontargets_N5.appenditem(1);
} else if (values.N == 6){
list.ACC_nontargets_N6.appenditem(0);
list.NR_nontargets_N6.appenditem(1);
}//if further values of N should be added, add the necessary code here
};
]
/ trialduration = parameters.SOA
</trial>
**********************************
Target Trials
**********************************
**if target, press the letters "A" (code: "A")
<trial target>
/ ontrialbegin = [
trial.target.insertstimulustime(clearscreen, parameters.stimulusPresentationtime);
if (values.N > 0){
values.currenttarget = list.items.item(values.N);
};
]
/ stimulustimes = [0 = targetletters, targetalert]
/validresponse = (noresponse, "A", "L")
/ beginresponsetime = 0
/ correctresponse = ("A")
/ ontrialend = [
trial.target.resetstimulusframes();
list.items.insertitem(text.targetletters.currentitemnumber, 1);
list.blockACC.appenditem(trial.target.correct);
//summary variables:
if (trial.target.correct){
values.responseCategory = "Correct";
list.ACC_targets.appenditem(1);
list.corrRT_targets.appenditem(trial.target.latency);
list.NR_targets.appenditem(0);
if (values.N == 0){
list.ACC_targets_N0.appenditem(1);
list.corrRT_targets_N0.appenditem(trial.target.latency);
list.NR_targets_N0.appenditem(0);
} else if (values.N == 1){
list.ACC_targets_N1.appenditem(1);
list.corrRT_targets_N1.appenditem(trial.target.latency);
list.NR_targets_N1.appenditem(0);
} else if (values.N == 2){
list.ACC_targets_N2.appenditem(1);
list.corrRT_targets_N2.appenditem(trial.target.latency);
list.NR_targets_N2.appenditem(0);
} else if (values.N == 3){
list.ACC_targets_N3.appenditem(1);
list.corrRT_targets_N3.appenditem(trial.target.latency);
list.NR_targets_N3.appenditem(0);
} else if (values.N == 4){
list.ACC_targets_N4.appenditem(1);
list.corrRT_targets_N4.appenditem(trial.target.latency);
list.NR_targets_N4.appenditem(0);
} else if (values.N == 5){
list.ACC_targets_N5.appenditem(1);
list.corrRT_targets_N5.appenditem(trial.target.latency);
list.NR_targets_N5.appenditem(0);
} else if (values.N == 6){
list.ACC_targets_N6.appenditem(1);
list.corrRT_targets_N6.appenditem(trial.target.latency);
list.NR_targets_N6.appenditem(0);
}//if further values of N should be added, add the necessary code here
} else if (trial.target.responsetext == "L"){
values.responseCategory = "Incorrect";
list.ACC_targets.appenditem(0);
list.incorrRT_targets.appenditem(trial.target.latency);
list.NR_targets.appenditem(0);
if (values.N == 0){
list.ACC_targets_N0.appenditem(0);
list.incorrRT_targets_N0.appenditem(trial.target.latency);
list.NR_targets_N0.appenditem(0);
} else if (values.N == 1){
list.ACC_targets_N1.appenditem(0);
list.incorrRT_targets_N1.appenditem(trial.target.latency);
list.NR_targets_N1.appenditem(0);
} else if (values.N == 2){
list.ACC_targets_N2.appenditem(0);
list.incorrRT_targets_N2.appenditem(trial.target.latency);
list.NR_targets_N2.appenditem(0);
} else if (values.N == 3){
list.ACC_targets_N3.appenditem(0);
list.incorrRT_targets_N3.appenditem(trial.target.latency);
list.NR_targets_N3.appenditem(0);
} else if (values.N == 4){
list.ACC_targets_N4.appenditem(0);
list.incorrRT_targets_N4.appenditem(trial.target.latency);
list.NR_targets_N4.appenditem(0);
} else if (values.N == 5){
list.ACC_targets_N5.appenditem(0);
list.incorrRT_targets_N5.appenditem(trial.target.latency);
list.NR_targets_N5.appenditem(0);
} else if (values.N == 6){
list.ACC_targets_N6.appenditem(0);
list.incorrRT_targets_N6.appenditem(trial.target.latency);
list.NR_targets_N6.appenditem(0);
}//if further values of N should be added, add the necessary code here
} else {
values.responseCategory = "No Response";
list.ACC_targets.appenditem(0);
list.NR_targets.appenditem(1);
if (values.N == 0){
list.ACC_targets_N0.appenditem(0);
list.NR_targets_N0.appenditem(1);
} else if (values.N == 1){
list.ACC_targets_N1.appenditem(0);
list.NR_targets_N1.appenditem(1);
} else if (values.N == 2){
list.ACC_targets_N2.appenditem(0);
list.NR_targets_N2.appenditem(1);
} else if (values.N == 3){
list.ACC_targets_N3.appenditem(0);
list.NR_targets_N3.appenditem(1);
} else if (values.N == 4){
list.ACC_targets_N4.appenditem(0);
list.NR_targets_N4.appenditem(1);
} else if (values.N == 5){
list.ACC_targets_N5.appenditem(0);
list.NR_targets_N5.appenditem(1);
} else if (values.N == 6){
list.ACC_targets_N6.appenditem(0);
list.NR_targets_N6.appenditem(1);
}//if further values of N should be added, add the necessary code here
};
]
/ trialduration = parameters.SOA
</trial>
**********************************
Slider Trials
**********************************
<slidertrial nbackperception>
/ stimulusframes = [1=clearscreen, perceptionquestion]
/ range = (0,100)
/ increment = 1
/ orientation = horizontal
/ labels = ("<font color=white>0</font>", "<font color=white>100</font>")
/ required = true
/ position = (50%, 60%)
/ size = (90%, 20%)
/ buttonlabel = "Submit"
</slidertrial>
<text perceptionquestion>
/ items = ("Please enter the percentage you believe you got correct on the N-back task")
/ txcolor = white
/ txbgcolor = black
/ position = (50%, 30%)
</text>
**************************************************************************************************************
**************************************************************************************************************
BLOCKS
**************************************************************************************************************
**************************************************************************************************************
**********************************************
PRACTICE
**********************************************
* Practice Blocks give feedback
* Block starts with
(b) N start-trials that cannot present Targets yet (for N=0, trial.start is skipped)
(c) 10 practice trials: ratio targets : nontargets = 3 : 7
* stops after lever N = highestN (set by experimenter)
(d) runs level of N from list.nextN_practice in the order specified under list settings
<block Practice>
/ preinstructions = (nback_levelInstructions)
/ onblockbegin = [
values.N = list.nextN_practice.nextvalue;
values.currenttarget = 0;
if (values.N == 0){
values.currenttarget = 1;
};
list.items.reset();
values.TotalBlocks += 1;
values.starttrialcounter = 0;
list.blockACC.reset();
]
/ trials = [
1 = start;
2 - 10 = noreplace(nontarget, nontarget, target);
]
/ screencolor = (0, 0, 0)
/ recorddata = true
/ branch = [
if (values.TotalBlocks >= list.nextN_practice.itemcount) {
values.TotalBlocks = 0;
block.RepeatPractice;
} else {
block.Practice;
};
]
</block>
if trial feedback is desired:
/ errormessage = true(ErrorFeedback, 500)
/ correctmessage = true(CorrectFeedback, 500)
<block RepeatPractice>
/ skip = [
parameters.allowPracticeRepeat == false;
]
/ trials = [1 = repeatpractice]
/ recorddata = false
/ branch = [
if (trial.repeatpractice.responsetext == "Y") {
return block.Practice;
};
]
/ screencolor = black
</block>
<block PracticeEnd>
/ preinstructions = (practiceend)
/ recorddata = false
</block>
**********************************************
EXPERIMENTAL-BLOCKS NONADAPTIVE
**********************************************
<block StartTest>
/ preinstructions = (htmlpage.nback_testStart)
/ recorddata = false
/ onblockbegin = [
values.TotalBlocks = 0;
//reset all necessary lists
list.ACC_nontargets.reset();
list.incorrRT_nontargets.reset();
list.corrRT_nontargets.reset();
list.NR_nontargets.reset();
list.ACC_targets.reset();
list.incorrRT_targets.reset();
list.corrRT_targets.reset();
list.NR_targets.reset();
list.ACC_nontargets_N0.reset();
list.incorrRT_nontargets_N0.reset();
list.corrRT_nontargets_N0.reset();
list.NR_nontargets_N0.reset();
list.ACC_targets_N0.reset();
list.incorrRT_targets_N0.reset();
list.corrRT_targets_N0.reset();
list.NR_targets_N0.reset();
list.ACC_nontargets_N1.reset();
list.incorrRT_nontargets_N1.reset();
list.corrRT_nontargets_N1.reset();
list.NR_nontargets_N1.reset();
list.ACC_targets_N1.reset();
list.incorrRT_targets_N1.reset();
list.corrRT_targets_N1.reset();
list.NR_targets_N1.reset();
list.ACC_nontargets_N2.reset();
list.incorrRT_nontargets_N2.reset();
list.corrRT_nontargets_N2.reset();
list.NR_nontargets_N2.reset();
list.ACC_targets_N2.reset();
list.incorrRT_targets_N2.reset();
list.corrRT_targets_N2.reset();
list.NR_targets_N2.reset();
list.ACC_nontargets_N3.reset();
list.incorrRT_nontargets_N3.reset();
list.corrRT_nontargets_N3.reset();
list.NR_nontargets_N3.reset();
list.ACC_targets_N3.reset();
list.incorrRT_targets_N3.reset();
list.corrRT_targets_N3.reset();
list.NR_targets_N3.reset();
list.ACC_nontargets_N4.reset();
list.incorrRT_nontargets_N4.reset();
list.corrRT_nontargets_N4.reset();
list.NR_nontargets_N4.reset();
list.ACC_targets_N4.reset();
list.incorrRT_targets_N4.reset();
list.corrRT_targets_N4.reset();
list.NR_targets_N4.reset();
list.ACC_nontargets_N5.reset();
list.incorrRT_nontargets_N5.reset();
list.corrRT_nontargets_N5.reset();
list.NR_nontargets_N5.reset();
list.ACC_targets_N5.reset();
list.incorrRT_targets_N5.reset();
list.corrRT_targets_N5.reset();
list.NR_targets_N5.reset();
list.ACC_nontargets_N6.reset();
list.incorrRT_nontargets_N6.reset();
list.corrRT_nontargets_N6.reset();
list.NR_nontargets_N6.reset();
list.ACC_targets_N6.reset();
list.incorrRT_targets_N6.reset();
list.corrRT_targets_N6.reset();
list.NR_targets_N6.reset();
//if any further N-levels should be run, reset the necessary lists here
]
</block>
* Block starts with
(a) Instructions
(b) N start-trials that cannot present Targets yet
(c) 20 Experimental trials
* ratio targets : nontargets = 6 : 14 = 3 : 7
* Block runs as many times as there are items in list.Nlevel and in the sequence controlled by list.Nlevel
<block Test>
/ preinstructions = (nback_levelInstructions)
/ onblockbegin = [
list.blockACC.reset();
values.N = list.Nlevel.nextvalue;
values.currenttarget = 0;
if (values.N == 0){
values.currenttarget = 1;
};
list.items.reset();
values.lastIndex = 1;
expressions.fillitemlist;
values.TotalBlocks += 1;
values.starttrialcounter = 0;
]
/ trials = [
1 = start;
2 - 98 = noreplace(nontarget, nontarget,target);
99 = slidertrial.nbackperception;
]
/ screencolor = (0, 0, 0)
/ branch = [
//as long as the number of test blocks run is smaller than the items in list.Nlevel, another test block will start
if (values.TotalBlocks < list.Nlevel.itemcount){
return block.Test;
};
]
</block>
<block Finish>
/ trials = [
1 = finish;
]
</block>
**************************************************************************************************************
**************************************************************************************************************
EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************
*After running the initial instructions, participants work through practice blocks for N = lowestN to N = highestN
* After practice, participants work through 3 blocks for each of the level of N (levels are pseudorandomly determined)
<expt>
/ blocks = [
1 = Introduction;
2 = Practice;
3 = PracticeEnd;
4 = StartTest;
5 = Test;
6 = Finish;
]
</expt>
**************************************************************************************************************
End of File
**************************************************************************************************************
</usermanual>
**************************************************************************************************************
**************************************************************************************************************
EDITABLE PARAMETERS: change editable parameters here
**************************************************************************************************************
**************************************************************************************************************
<parameters>
/allowPracticeRepeat = false
/excludeStartTrialfromPerformanceMeasure = true
/SOA = 3000
/stimulusPresentationtime = 500
/debugmode = 0
</parameters>
**************************************************************************************************************
**************************************************************************************************************
EDITABLE STIMULI: change editable stimuli here
**************************************************************************************************************
**************************************************************************************************************
*yellow on black background
*original letterss, kindly provided by Jaeggi et al (2010)
<item letters>
/1 = "B"
/2 = "C"
/3 = "D"
/4 = "F"
/5 = "G"
/6 = "H"
/7 = "J"
/8 = "K"
/9 = "L"
/10 = "M"
/11 = "N"
/12 = "P"
/13 = "Q"
/14 = "R"
/15 = "S"
/16 = "T"
/17 = "V"
/18 = "W"
/19 = "X"
/20 = "Z"
</item>
**************************************************************************************************************
**************************************************************************************************************
EDITABLE INSTRUCTIONS: change instructions here
**************************************************************************************************************
**************************************************************************************************************
<instruct>
/ fontstyle = ("Arial", 2.67%, false, false, false, false, 5, 0)
</instruct>
*******************************************************************************
General Introduction pages:
see below for possible edits of General Instruction Block
*******************************************************************************
<htmlpage generalintro>
/ file = "nback_generalintro.htm"
</htmlpage>
<htmlpage intro1back>
/ file = "nback_intro1back.htm"
</htmlpage>
<htmlpage intro2back>
/ file = "nback_intro2back.htm"
</htmlpage>
<htmlpage intro3back>
/ file = "nback_intro3back.htm"
</htmlpage>
Note: if you changed the levels of N tested, you need to adapt this intro page
<htmlpage practicestart>
/ file = "nback_practicestart.htm"
</htmlpage>
Note: if you changed the levels of N tested, you need to adapt this intro page
<htmlpage practiceend>
/ file = "nbackintro_practiceend.htm"
</htmlpage>
**************************************
Change instructions:
if not all instruction pages should be
run, remove pages from
/preinstruction = ()
Alternatively, you can also add
as many pages as you want
**************************************
<block Introduction>
/ preinstructions = (generalintro, intro1back, intro2back, intro3back, practicestart)
/ recorddata = false
</block>
*******************************************************************************
Level N Instructions:
*******************************************************************************
<htmlpage nback_levelInstructions>
/ file = "nback_levelinstructions.htm"
</htmlpage>
<expressions>
/nback_levelInstructions = {
if (values.N == 0){
"is the following letters:<br>
<img src='1.gif' style='height: 20vh' />"
} else {
"is the same as the one <%values.N%> trial(s) before"
}
}
</expressions>
*******************************************************************************
Repeat and Start pages
*******************************************************************************
<html repeatpractice_page>
/items = ("nback_repeatpractice.htm")
/size = (100%, 100%)
</html>
<htmlpage nback_testStart>
/ file = "nback_expstart.htm"
</htmlpage>
*******************************************************************************
Finish Pages
*******************************************************************************
<text finish>
/ items = ("Thank you!")
/ fontstyle = ("Arial", 8%, true, false, false, false, 5, 1)
/ position = (50%, 50%)
/ size = (80%, 80%)
/ vjustify = center
/ valign = center
/ halign = center
/ txbgcolor = black
/ txcolor = white
</text>
<text exit>
/ items = ("<press spacebar to exit>")
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ position = (50%, 90%)
/ size = (80%, 5%)
/ vjustify = center
/ valign = center
/ halign = center
/ txbgcolor = black
/ txcolor = white
</text>
**************************************************************************************************************
**************************************************************************************************************
EDITABLE LISTS: change editable lists here
**************************************************************************************************************
**************************************************************************************************************
Note: list controls the level of N run during practice. By default, practice runs level 2, 3, 4 once and
in sequence
<list nextN_practice>
/items = (1, 2, 3)
/ selectionmode = sequence
/ selectionrate = block
/ resetinterval = 0
</list>
*list.Nlevel selects the next N level (the experiment runs as many blocks as there are
items in this list) in sequence
! if you do NOT run level N = 3, remove all 3s from the item list of this list
! if you want to run a level more or fewer times adjust the number of the digits in the item list accordingly
! if you want to run the levels in sequence, replace /replace=false with /selectionmode = sequence
! you can add levels other than 1-3 (e.g. you can add level 5); however, summary variables are
only collected for 0 <= N <= 6
IN GENERAL: if you run different levels of N or change the number of repetitions, you need to adjust the item list of
list.nlevel (no other changes are required)
<list Nlevel>
/items = (1, 2, 3)
/ selectionmode = sequence
/ resetinterval = 0
</list>
**************************************************************************************************************
!!!REMAINING CODE: Customize after careful consideration only!!!
**************************************************************************************************************
**************************************************************************************************************
**************************************************************************************************************
DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 6.5.2.0 or higher
<defaults>
/canvasaspectratio = (4,3)
/minimumversion = "6.5.2.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/txbgcolor = white
/ txcolor = (0, 0, 0)
/ screencolor = black
</defaults>
**************************************************************************************************************
**************************************************************************************************************
DATA
**************************************************************************************************************
**************************************************************************************************************
Note: data file explanations under User Manual Information at the top
*********************
raw data
*********************
<data>
/ columns = (build, computer.platform, date, time, subject, group, session, blockcode, blocknum,
trialcode, trialnum,
values.TotalBlocks, values.N, values.starttrialcounter, stimulusitem, stimulusnumber,
values.currenttarget, response, values.responseCategory, correct, latency, list.blockACC.mean)
</data>
*********************
summary data
*********************
<summarydata>
/ columns = (inquisit.version, computer.platform, script.startdate, script.starttime,
script.subjectid, script.groupid, script.sessionid, script.elapsedtime,
script.completed,
values.TotalBlocks, expressions.propCorrect_overall,
expressions.TargetTrialCount_overall, expressions.propCorrect_targets_overall,expressions.mean_corrRT_targets_overall,
expressions.mean_incorrRT_targets_overall,expressions.propNR_targets_overall,
expressions.NonTargetTrialCount_overall, expressions.propCorrect_nontargets_overall,expressions.mean_corrRT_nontargets_overall,
expressions.mean_incorrRT_nontargets_overall,expressions.propNR_nontargets_overall,
expressions.hitRate_overall, expressions.FArate_overall, expressions.zhitrate_overall, expressions.zFArate_overall,
expressions.dprime_overall,
expressions.TargetTrialCount_N0, expressions.propCorrect_targets_N0,expressions.mean_corrRT_targets_N0,
expressions.mean_incorrRT_targets_N0,expressions.propNR_targets_N0,
expressions.NonTargetTrialCount_N0, expressions.propCorrect_nontargets_N0,expressions.mean_corrRT_nontargets_N0,
expressions.mean_incorrRT_nontargets_N0,expressions.propNR_nontargets_N0,
expressions.hitRate_N0, expressions.FArate_N0, expressions.zhitrate_N0, expressions.zFArate_N0, expressions.dprime_N0,
expressions.TargetTrialCount_N1, expressions.propCorrect_targets_N1,expressions.mean_corrRT_targets_N1,
expressions.mean_incorrRT_targets_N1,expressions.propNR_targets_N1,
expressions.NonTargetTrialCount_N1, expressions.propCorrect_nontargets_N1,expressions.mean_corrRT_nontargets_N1,
expressions.mean_incorrRT_nontargets_N1,expressions.propNR_nontargets_N1,
expressions.hitRate_N1, expressions.FArate_N1, expressions.zhitrate_N1, expressions.zFArate_N1, expressions.dprime_N1,
expressions.TargetTrialCount_N2, expressions.propCorrect_targets_N2,expressions.mean_corrRT_targets_N2,
expressions.mean_incorrRT_targets_N2,expressions.propNR_targets_N2,
expressions.NonTargetTrialCount_N2, expressions.propCorrect_nontargets_N2,expressions.mean_corrRT_nontargets_N2,
expressions.mean_incorrRT_nontargets_N2,expressions.propNR_nontargets_N2,
expressions.hitRate_N2, expressions.FArate_N2, expressions.zhitrate_N2, expressions.zFArate_N2, expressions.dprime_N2,
expressions.TargetTrialCount_N3, expressions.propCorrect_targets_N3,expressions.mean_corrRT_targets_N3,
expressions.mean_incorrRT_targets_N3,expressions.propNR_targets_N3,
expressions.NonTargetTrialCount_N3, expressions.propCorrect_nontargets_N3,expressions.mean_corrRT_nontargets_N3,
expressions.mean_incorrRT_nontargets_N3,expressions.propNR_nontargets_N3,
expressions.hitRate_N3, expressions.FArate_N3, expressions.zhitrate_N3, expressions.zFArate_N3, expressions.dprime_N3,
expressions.TargetTrialCount_N4, expressions.propCorrect_targets_N4,expressions.mean_corrRT_targets_N4,
expressions.mean_incorrRT_targets_N4,expressions.propNR_targets_N4,
expressions.NonTargetTrialCount_N4, expressions.propCorrect_nontargets_N4,expressions.mean_corrRT_nontargets_N4,
expressions.mean_incorrRT_nontargets_N4,expressions.propNR_nontargets_N4,
expressions.hitRate_N4, expressions.FArate_N4, expressions.zhitrate_N4, expressions.zFArate_N4, expressions.dprime_N4,
expressions.TargetTrialCount_N5, expressions.propCorrect_targets_N5,expressions.mean_corrRT_targets_N5,
expressions.mean_incorrRT_targets_N5,expressions.propNR_targets_N5,
expressions.NonTargetTrialCount_N5, expressions.propCorrect_nontargets_N5,expressions.mean_corrRT_nontargets_N5,
expressions.mean_incorrRT_nontargets_N5,expressions.propNR_nontargets_N5,
expressions.hitRate_N5, expressions.FArate_N5, expressions.zhitrate_N5, expressions.zFArate_N5, expressions.dprime_N5,
expressions.TargetTrialCount_N6, expressions.propCorrect_targets_N6,expressions.mean_corrRT_targets_N6,
expressions.mean_incorrRT_targets_N6,expressions.propNR_targets_N6,
expressions.NonTargetTrialCount_N6, expressions.propCorrect_nontargets_N6,expressions.mean_corrRT_nontargets_N6,
expressions.mean_incorrRT_nontargets_N6,expressions.propNR_nontargets_N6,
expressions.hitRate_N6, expressions.FArate_N6, expressions.zhitrate_N6, expressions.zFArate_N6, expressions.dprime_N6
)
</summarydata>
Note: by default, this script only stores summary variables of N=0 to N=6 (though other level of N can be run).
To store, summary variables for levels of N higher than 6, you need to:
1. add the necessary lists under section "Lists"
2. add necessary code to trial.target/trial.nontarget
3. add necessary expressions to section "Expressions"
4. reset necessary lists under block.StartTest
5. add necessary expressions to the summary data file
**************************************************************************************************************
**************************************************************************************************************
VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************
/N: the lag between a target and the stimulus it repeats
/currenttarget: contains the stimulusnumber of the current target
(a target in N = 0 trials, is the letters 'M')
/TotalBlocks: the total number of experimental blocks run
/starttrialcounter: keeps track of how many start trials have been run
/lastIndex: helper variable to manage the last N presented letters list
/responseCategory: "Hit" vs. "Omission Error" vs. "CorrReject" vs. "Commission Error"
<values>
/N = 0
/currenttarget = 0
/TotalBlocks = 0
/starttrialcounter = 0
/lastIndex = 0
/responseCategory = ""
</values>
**************************************************************************************************************
**************************************************************************************************************
EXPRESSIONS
**************************************************************************************************************
**************************************************************************************************************
/fillitemlist: recursive function that fills list.items with N items at the beginning of each new block
<expressions>
/fillitemlist = {
if (values.lastIndex < values.N){
list.items.insertitem(0, 1);
values.lastIndex += 1;
expressions.fillitemlist;
} else {
list.items.insertitem(0, 1);
};
}
</expressions>
<expressions>
/propCorrect_overall = ((list.ACC_nontargets.mean * list.ACC_nontargets.itemcount) + (list.ACC_targets.mean * list.ACC_targets.itemcount))/
(list.ACC_nontargets.itemcount + list.ACC_targets.itemcount)
/TargetTrialCount_overall = list.ACC_targets.itemcount
/propCorrect_targets_overall = list.ACC_targets.mean
/mean_corrRT_targets_overall = list.corrRT_targets.mean
/mean_incorrRT_targets_overall = list.incorrRT_targets.mean
/propNR_targets_overall = list.NR_targets.mean
/NonTargetTrialCount_overall = list.ACC_nontargets.itemcount
/propCorrect_nontargets_overall = list.ACC_nontargets.mean
/mean_corrRT_nontargets_overall = list.corrRT_nontargets.mean
/mean_incorrRT_nontargets_overall = list.incorrRT_nontargets.mean
/propNR_nontargets_overall = list.NR_nontargets.mean
/hitRate_overall = list.ACC_targets.mean
//False Alarms = pressing target key for nontargets: calculated based on the difference of correct responses to nontargets minus the number of no responses
/FArate_overall = (list.ACC_nontargets.itemcount - (list.ACC_nontargets.mean*list.ACC_nontargets.itemcount)-(list.NR_nontargets.mean*list.NR_nontargets.itemcount))/(list.ACC_nontargets.itemcount)
/ zhitrate_overall = {
if (expressions.hitRate_overall == 0){
zofp(expressions.hitRate_overall + 0.005)
} else if (expressions.hitRate_overall == 1){
zofp(expressions.hitRate_overall - 0.005)
} else {
zofp(expressions.hitRate_overall)
};
}
/ zFArate_overall = {
if (expressions.FArate_overall == 0){
zofp(expressions.FArate_overall + 0.005)
} else if (expressions.FArate_overall == 1){
zofp(expressions.FArate_overall - 0.005)
} else {
zofp(expressions.FArate_overall)
};
}
/ dprime_overall = (expressions.zhitrate_overall-expressions.zFArate_overall)
//if there are no items in list.ACC_targets_N0 then level N = 0 was not run
/TargetTrialCount_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.ACC_targets_N0.itemcount;
} else {
"not run";
};
};
/propCorrect_targets_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.ACC_targets_N0.mean;
} else {
"not run";
};
};
/mean_corrRT_targets_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.corrRT_targets_N0.mean;
} else {
"not run";
};
};
/mean_incorrRT_targets_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.incorrRT_targets_N0.mean;
} else {
"not run";
};
};
/propNR_targets_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.NR_targets_N0.mean;
} else {
"not run";
};
};
/NonTargetTrialCount_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.ACC_nontargets_N0.itemcount;
} else {
"not run";
};
};
/propCorrect_nontargets_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.ACC_nontargets_N0.mean;
} else {
"not run";
};
};
/mean_corrRT_nontargets_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.corrRT_nontargets_N0.mean;
} else {
"not run";
};
};
/mean_incorrRT_nontargets_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.incorrRT_nontargets_N0.mean;
} else {
"not run";
};
};
/propNR_nontargets_N0 = {
if (list.ACC_targets_N0.itemcount > 0){
list.NR_nontargets_N0.mean;
} else {
"not run";
};
};
/hitRate_N0 = if (list.ACC_targets_N0.itemcount > 0){
list.ACC_targets_N0.mean;
} else {
"not run";
}
/FArate_N0 = if (list.ACC_targets_N0.itemcount > 0){
(list.ACC_nontargets_N0.itemcount - (list.ACC_nontargets_N0.mean*list.ACC_nontargets_N0.itemcount)-(list.NR_nontargets_N0.mean*list.NR_nontargets_N0.itemcount))/
(list.ACC_nontargets_N0.itemcount);
} else {
"not run";
}
/ zhitrate_N0 =
if (list.ACC_targets_N0.itemcount > 0){
if (expressions.hitRate_N0 == 0){
zofp(expressions.hitRate_N0 + 0.005)
} else if (expressions.hitRate_N0 == 1){
zofp(expressions.hitRate_N0 - 0.005)
} else {
zofp(expressions.hitRate_N0);
};
} else {
"not run";
}
/ zFArate_N0 =
if (list.ACC_targets_N0.itemcount > 0){
if (expressions.FArate_N0 == 0){
zofp(expressions.FArate_N0 + 0.005)
} else if (expressions.FArate_N0 == 1){
zofp(expressions.FArate_N0 - 0.005)
} else {
zofp(expressions.FArate_N0)
};
} else {
"not run";
}
/ dprime_N0 = if (list.ACC_targets_N0.itemcount > 0){
(expressions.zhitrate_N0-expressions.zFArate_N0);
} else {
"not run";
}
//if there are no items in list.ACC_targets_N1 then level N = 0 was not run
/TargetTrialCount_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.ACC_targets_N1.itemcount;
} else {
"not run";
};
};
/propCorrect_targets_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.ACC_targets_N1.mean;
} else {
"not run";
};
};
/mean_corrRT_targets_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.corrRT_targets_N1.mean;
} else {
"not run";
};
};
/mean_incorrRT_targets_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.incorrRT_targets_N1.mean;
} else {
"not run";
};
};
/propNR_targets_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.NR_targets_N1.mean;
} else {
"not run";
};
};
/NonTargetTrialCount_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.ACC_nontargets_N1.itemcount;
} else {
"not run";
};
};
/propCorrect_nontargets_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.ACC_nontargets_N1.mean;
} else {
"not run";
};
};
/mean_corrRT_nontargets_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.corrRT_nontargets_N1.mean;
} else {
"not run";
};
};
/mean_incorrRT_nontargets_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.incorrRT_nontargets_N1.mean;
} else {
"not run";
};
};
/propNR_nontargets_N1 = {
if (list.ACC_targets_N1.itemcount > 0){
list.NR_nontargets_N1.mean;
} else {
"not run";
};
};
/hitRate_N1 = if (list.ACC_targets_N1.itemcount > 0){
list.ACC_targets_N1.mean;
} else {
"not run";
}
/FArate_N1 = if (list.ACC_targets_N1.itemcount > 0){
(list.ACC_nontargets_N1.itemcount-(list.ACC_nontargets_N1.mean*list.ACC_nontargets_N1.itemcount)-(list.NR_nontargets_N1.mean*list.NR_nontargets_N1.itemcount))/
(list.ACC_nontargets_N1.itemcount);
} else {
"not run";
}
/ zhitrate_N1 =
if (list.ACC_targets_N1.itemcount > 0){
if (expressions.hitRate_N1 == 0){
zofp(expressions.hitRate_N1 + 0.005)
} else if (expressions.hitRate_N1 == 1){
zofp(expressions.hitRate_N1 - 0.005)
} else {
zofp(expressions.hitRate_N1);
};
} else {
"not run";
}
/ zFArate_N1 =
if (list.ACC_targets_N1.itemcount > 0){
if (expressions.FArate_N1 == 0){
zofp(expressions.FArate_N1 + 0.005)
} else if (expressions.FArate_N1 == 1){
zofp(expressions.FArate_N1 - 0.005)
} else {
zofp(expressions.FArate_N1)
};
} else {
"not run";
}
/ dprime_N1 = if (list.ACC_targets_N1.itemcount > 0){
(expressions.zhitrate_N1-expressions.zFArate_N1);
} else {
"not run";
}
//if there are no items in list.ACC_targets_N2 then level N = 0 was not run
/TargetTrialCount_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.ACC_targets_N2.itemcount;
} else {
"not run";
};
};
/propCorrect_targets_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.ACC_targets_N2.mean;
} else {
"not run";
};
};
/mean_corrRT_targets_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.corrRT_targets_N2.mean;
} else {
"not run";
};
};
/mean_incorrRT_targets_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.incorrRT_targets_N2.mean;
} else {
"not run";
};
};
/propNR_targets_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.NR_targets_N2.mean;
} else {
"not run";
};
};
/NonTargetTrialCount_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.ACC_nontargets_N2.itemcount;
} else {
"not run";
};
};
/propCorrect_nontargets_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.ACC_nontargets_N2.mean;
} else {
"not run";
};
};
/mean_corrRT_nontargets_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.corrRT_nontargets_N2.mean;
} else {
"not run";
};
};
/mean_incorrRT_nontargets_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.incorrRT_nontargets_N2.mean;
} else {
"not run";
};
};
/propNR_nontargets_N2 = {
if (list.ACC_targets_N2.itemcount > 0){
list.NR_nontargets_N2.mean;
} else {
"not run";
};
};
/hitRate_N2 = if (list.ACC_targets_N2.itemcount > 0){
list.ACC_targets_N2.mean;
} else {
"not run";
}
/FArate_N2 = if (list.ACC_targets_N2.itemcount > 0){
(list.ACC_nontargets_N2.itemcount - (list.ACC_nontargets_N2.mean*list.ACC_nontargets_N2.itemcount)-(list.NR_nontargets_N2.mean*list.NR_nontargets_N2.itemcount))/
(list.ACC_nontargets_N2.itemcount);
} else {
"not run";
}
/ zhitrate_N2 =
if (list.ACC_targets_N2.itemcount > 0){
if (expressions.hitRate_N2 == 0){
zofp(expressions.hitRate_N2 + 0.005)
} else if (expressions.hitRate_N2 == 1){
zofp(expressions.hitRate_N2 - 0.005)
} else {
zofp(expressions.hitRate_N2);
};
} else {
"not run";
}
/ zFArate_N2 =
if (list.ACC_targets_N2.itemcount > 0){
if (expressions.FArate_N2 == 0){
zofp(expressions.FArate_N2 + 0.005)
} else if (expressions.FArate_N2 == 1){
zofp(expressions.FArate_N2 - 0.005)
} else {
zofp(expressions.FArate_N2)
};
} else {
"not run";
}
/ dprime_N2 = if (list.ACC_targets_N2.itemcount > 0){
(expressions.zhitrate_N2-expressions.zFArate_N2);
} else {
"not run";
}
//if there are no items in list.ACC_targets_N3 then level N = 0 was not run
/TargetTrialCount_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.ACC_targets_N3.itemcount;
} else {
"not run";
};
};
/propCorrect_targets_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.ACC_targets_N3.mean;
} else {
"not run";
};
};
/mean_corrRT_targets_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.corrRT_targets_N3.mean;
} else {
"not run";
};
};
/mean_incorrRT_targets_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.incorrRT_targets_N3.mean;
} else {
"not run";
};
};
/propNR_targets_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.NR_targets_N3.mean;
} else {
"not run";
};
};
/NonTargetTrialCount_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.ACC_nontargets_N3.itemcount;
} else {
"not run";
};
};
/propCorrect_nontargets_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.ACC_nontargets_N3.mean;
} else {
"not run";
};
};
/mean_corrRT_nontargets_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.corrRT_nontargets_N3.mean;
} else {
"not run";
};
};
/mean_incorrRT_nontargets_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.incorrRT_nontargets_N3.mean;
} else {
"not run";
};
};
/propNR_nontargets_N3 = {
if (list.ACC_targets_N3.itemcount > 0){
list.NR_nontargets_N3.mean;
} else {
"not run";
};
};
/hitRate_N3 = if (list.ACC_targets_N3.itemcount > 0){
list.ACC_targets_N3.mean;
} else {
"not run";
}
/FArate_N3 = if (list.ACC_targets_N3.itemcount > 0){
(list.ACC_nontargets_N3.itemcount - (list.ACC_nontargets_N3.mean*list.ACC_nontargets_N3.itemcount)-(list.NR_nontargets_N3.mean*list.NR_nontargets_N3.itemcount))/
(list.ACC_nontargets_N3.itemcount);
} else {
"not run";
}
/ zhitrate_N3 =
if (list.ACC_targets_N3.itemcount > 0){
if (expressions.hitRate_N3 == 0){
zofp(expressions.hitRate_N3 + 0.005)
} else if (expressions.hitRate_N3 == 1){
zofp(expressions.hitRate_N3 - 0.005)
} else {
zofp(expressions.hitRate_N3);
};
} else {
"not run";
}
/ zFArate_N3 =
if (list.ACC_targets_N3.itemcount > 0){
if (expressions.FArate_N3 == 0){
zofp(expressions.FArate_N3 + 0.005)
} else if (expressions.FArate_N3 == 1){
zofp(expressions.FArate_N3 - 0.005)
} else {
zofp(expressions.FArate_N3)
};
} else {
"not run";
}
/ dprime_N3 = if (list.ACC_targets_N3.itemcount > 0){
(expressions.zhitrate_N3-expressions.zFArate_N3);
} else {
"not run";
}
//if there are no items in list.ACC_targets_N4 then level N = 0 was not run
/TargetTrialCount_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.ACC_targets_N4.itemcount;
} else {
"not run";
};
};
/propCorrect_targets_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.ACC_targets_N4.mean;
} else {
"not run";
};
};
/mean_corrRT_targets_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.corrRT_targets_N4.mean;
} else {
"not run";
};
};
/mean_incorrRT_targets_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.incorrRT_targets_N4.mean;
} else {
"not run";
};
};
/propNR_targets_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.NR_targets_N4.mean;
} else {
"not run";
};
};
/NonTargetTrialCount_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.ACC_nontargets_N4.itemcount;
} else {
"not run";
};
};
/propCorrect_nontargets_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.ACC_nontargets_N4.mean;
} else {
"not run";
};
};
/mean_corrRT_nontargets_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.corrRT_nontargets_N4.mean;
} else {
"not run";
};
};
/mean_incorrRT_nontargets_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.incorrRT_nontargets_N4.mean;
} else {
"not run";
};
};
/propNR_nontargets_N4 = {
if (list.ACC_targets_N4.itemcount > 0){
list.NR_nontargets_N4.mean;
} else {
"not run";
};
};
/hitRate_N4 = if (list.ACC_targets_N4.itemcount > 0){
list.ACC_targets_N4.mean;
} else {
"not run";
}
/FArate_N4 = if (list.ACC_targets_N4.itemcount > 0){
(list.ACC_nontargets_N4.itemcount - (list.ACC_nontargets_N4.mean*list.ACC_nontargets_N4.itemcount)-(list.NR_nontargets_N4.mean*list.NR_nontargets_N4.itemcount))/
(list.ACC_nontargets_N4.itemcount);
} else {
"not run";
}
/ zhitrate_N4 =
if (list.ACC_targets_N4.itemcount > 0){
if (expressions.hitRate_N4 == 0){
zofp(expressions.hitRate_N4 + 0.005)
} else if (expressions.hitRate_N4 == 1){
zofp(expressions.hitRate_N4 - 0.005)
} else {
zofp(expressions.hitRate_N4);
};
} else {
"not run";
}
/ zFArate_N4 =
if (list.ACC_targets_N4.itemcount > 0){
if (expressions.FArate_N4 == 0){
zofp(expressions.FArate_N4 + 0.005)
} else if (expressions.FArate_N4 == 1){
zofp(expressions.FArate_N4 - 0.005)
} else {
zofp(expressions.FArate_N4)
};
} else {
"not run";
}
/ dprime_N4 = if (list.ACC_targets_N4.itemcount > 0){
(expressions.zhitrate_N4-expressions.zFArate_N4);
} else {
"not run";
}
//if there are no items in list.ACC_targets_N5 then level N = 0 was not run
/TargetTrialCount_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.ACC_targets_N5.itemcount;
} else {
"not run";
};
};
/propCorrect_targets_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.ACC_targets_N5.mean;
} else {
"not run";
};
};
/mean_corrRT_targets_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.corrRT_targets_N5.mean;
} else {
"not run";
};
};
/mean_incorrRT_targets_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.incorrRT_targets_N5.mean;
} else {
"not run";
};
};
/propNR_targets_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.NR_targets_N5.mean;
} else {
"not run";
};
};
/NonTargetTrialCount_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.ACC_nontargets_N5.itemcount;
} else {
"not run";
};
};
/propCorrect_nontargets_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.ACC_nontargets_N5.mean;
} else {
"not run";
};
};
/mean_corrRT_nontargets_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.corrRT_nontargets_N5.mean;
} else {
"not run";
};
};
/mean_incorrRT_nontargets_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.incorrRT_nontargets_N5.mean;
} else {
"not run";
};
};
/propNR_nontargets_N5 = {
if (list.ACC_targets_N5.itemcount > 0){
list.NR_nontargets_N5.mean;
} else {
"not run";
};
};
/hitRate_N5 = if (list.ACC_targets_N5.itemcount > 0){
list.ACC_targets_N5.mean;
} else {
"not run";
}
/FArate_N5 = if (list.ACC_targets_N5.itemcount > 0){
(list.ACC_nontargets_N5.itemcount - (list.ACC_nontargets_N5.mean*list.ACC_nontargets_N5.itemcount)-(list.NR_nontargets_N5.mean*list.NR_nontargets_N5.itemcount))/
(list.ACC_nontargets_N5.itemcount);
} else {
"not run";
}
/ zhitrate_N5 =
if (list.ACC_targets_N5.itemcount > 0){
if (expressions.hitRate_N5 == 0){
zofp(expressions.hitRate_N5 + 0.005)
} else if (expressions.hitRate_N5 == 1){
zofp(expressions.hitRate_N5 - 0.005)
} else {
zofp(expressions.hitRate_N5);
};
} else {
"not run";
}
/ zFArate_N5 =
if (list.ACC_targets_N5.itemcount > 0){
if (expressions.FArate_N5 == 0){
zofp(expressions.FArate_N5 + 0.005)
} else if (expressions.FArate_N5 == 1){
zofp(expressions.FArate_N5 - 0.005)
} else {
zofp(expressions.FArate_N5)
};
} else {
"not run";
}
/ dprime_N5 = if (list.ACC_targets_N5.itemcount > 0){
(expressions.zhitrate_N5-expressions.zFArate_N5);
} else {
"not run";
}
//if there are no items in list.ACC_targets_N6 then level N = 0 was not run
/TargetTrialCount_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.ACC_targets_N6.itemcount;
} else {
"not run";
};
};
/propCorrect_targets_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.ACC_targets_N6.mean;
} else {
"not run";
};
};
/mean_corrRT_targets_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.corrRT_targets_N6.mean;
} else {
"not run";
};
};
/mean_incorrRT_targets_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.incorrRT_targets_N6.mean;
} else {
"not run";
};
};
/propNR_targets_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.NR_targets_N6.mean;
} else {
"not run";
};
};
/NonTargetTrialCount_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.ACC_nontargets_N6.itemcount;
} else {
"not run";
};
};
/propCorrect_nontargets_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.ACC_nontargets_N6.mean;
} else {
"not run";
};
};
/mean_corrRT_nontargets_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.corrRT_nontargets_N6.mean;
} else {
"not run";
};
};
/mean_incorrRT_nontargets_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.incorrRT_nontargets_N6.mean;
} else {
"not run";
};
};
/propNR_nontargets_N6 = {
if (list.ACC_targets_N6.itemcount > 0){
list.NR_nontargets_N6.mean;
} else {
"not run";
};
};
/hitRate_N6 = if (list.ACC_targets_N6.itemcount > 0){
list.ACC_targets_N6.mean;
} else {
"not run";
}
/FArate_N6 = if (list.ACC_targets_N6.itemcount > 0){
(list.ACC_nontargets_N6.itemcount - (list.ACC_nontargets_N6.mean*list.ACC_nontargets_N6.itemcount)-(list.NR_nontargets_N6.mean*list.NR_nontargets_N6.itemcount))/
(list.ACC_nontargets_N6.itemcount);
} else {
"not run";
}
/ zhitrate_N6 =
if (list.ACC_targets_N6.itemcount > 0){
if (expressions.hitRate_N6 == 0){
zofp(expressions.hitRate_N6 + 0.005)
} else if (expressions.hitRate_N6 == 1){
zofp(expressions.hitRate_N6 - 0.005)
} else {
zofp(expressions.hitRate_N6);
};
} else {
"not run";
}
/ zFArate_N6 =
if (list.ACC_targets_N6.itemcount > 0){
if (expressions.FArate_N6 == 0){
zofp(expressions.FArate_N6 + 0.005)
} else if (expressions.FArate_N6 == 1){
zofp(expressions.FArate_N6 - 0.005)
} else {
zofp(expressions.FArate_N6)
};
} else {
"not run";
}
/ dprime_N6 = if (list.ACC_targets_N6.itemcount > 0){
(expressions.zhitrate_N6-expressions.zFArate_N6);
} else {
"not run";
}
</expressions>
**************************************************************************************************************
**************************************************************************************************************
INSTRUCTIONS
**************************************************************************************************************
**************************************************************************************************************
<trial repeatpractice>
/ stimulusframes = [1 = repeatpractice_page]
/ validresponse = ("Y", "N")
/ recorddata = false
</trial>
<trial finish>
/ inputdevice = keyboard
/ stimulusframes = [1 = finish, exit]
/ validresponse = (" ")
/ recorddata = false
</trial>
**************************************************************************************************************
**************************************************************************************************************
STIMULI
**************************************************************************************************************
**************************************************************************************************************
***randomly selects one of the
<text startletters>
/ items = letters
/select = replace
/ position = (50%, 50%)
/ txcolor = white
/ txbgcolor = black
/ fontstyle = ("Arial", 20%, false, false, false, false, 5, 0)
</text>
***selects any number that cannot be a target
<text nontargetletters>
/ items = letters
/select = list.notargetvalue.nextvalue
/ position = (50%, 50%)
/ txcolor = white
/ txbgcolor = black
/ fontstyle = ("Arial", 20%, false, false, false, false, 5, 0)
</text>
***selects the item with the same item number as the established target
<text targetletters>
/ items = letters
/select = values.currenttarget
/ position = (50%, 50%)
/ txcolor = white
/ txbgcolor = black
/ fontstyle = ("Arial", 20%, false, false, false, false, 5, 0)
</text>
FEEDBACK MESSAGES FOR PRACTICE TRIALS ONLY (default: they are NOT used)
<text ErrorFeedback>
/ items = ("ERROR")
/ fontstyle = ("Arial", 5.00%, true, false, false, false, 5, 0)
/ txcolor = red
/ txbgcolor = black
/ position = (50%, 70%)
</text>
ASSISTANT STIMULI:
*****reminder that the number participants see during the first trial in N = 0 nback trials is the target
<text targetreminder>
/ items = ("this is the target")
/ position = (50%, 25%)
/ txbgcolor = black
/ txcolor = black
/ fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 0)
</text>
*****For timed instructions, this shape covers up the original instructions (on slides)
that instruct participants to use the Spacebar to continue
<shape eraserrec>
/shape = rectangle
/color = black
/ position = (50%, 95%)
/ size = (100%, 8%)
</shape>
*****Debug Code:
<text targetalert>
/ onprepare = [text.targetalert.skip = !parameters.debugmode;]
/items = ("target")
/position = (50%, 80%)
/txcolor = red
/txbgcolor = black
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 1)
</text>
**************************************************************************************************************
**************************************************************************************************************
LISTS
**************************************************************************************************************
**************************************************************************************************************
****list Variables to select notargetvalue
*list.notargetvalue selects any of the 8 letters but the one selected for targetvalue
<list notargetvalue>
/items = (1, 2, 3, 4, 5, 6, 7, 8, 9)
/ not = (values.currenttarget)
/ replace = true
</list>
Note: list contains the itemletters of the presented letterss in reversed order (dynamic list)
(item 1 is always the last one presented)
<list items>
</list>
*************************************************
Data Lists: used for descriptive statistics
store correct latencies/accuracy data
fill up during runtime
*************************************************
<list blockACC>
</list>
1 = correct response to targets; 0 = otherwise
<list ACC_targets>
</list>
1 = a no response to a target; 0 = any other response
<list NR_targets>
</list>
stores the latencies of correct target trials
<list corrRT_targets>
</list>
stores the latencies of incorrect responses (no responses excluded) to targets
<list incorrRT_targets>
</list>
<list ACC_nontargets>
</list>
<list NR_nontargets>
</list>
<list corrRT_nontargets>
</list>
<list incorrRT_nontargets>
</list>
****************************************
per level of N
****************************************
<list ACC_targets_N0>
</list>
<list NR_targets_N0>
</list>
<list corrRT_targets_N0>
</list>
<list incorrRT_targets_N0>
</list>
<list ACC_nontargets_N0>
</list>
<list NR_nontargets_N0>
</list>
<list corrRT_nontargets_N0>
</list>
<list incorrRT_nontargets_N0>
</list>
<list ACC_targets_N1>
</list>
<list NR_targets_N1>
</list>
<list corrRT_targets_N1>
</list>
<list incorrRT_targets_N1>
</list>
<list ACC_nontargets_N1>
</list>
<list NR_nontargets_N1>
</list>
<list corrRT_nontargets_N1>
</list>
<list incorrRT_nontargets_N1>
</list>
<list ACC_targets_N2>
</list>
<list NR_targets_N2>
</list>
<list corrRT_targets_N2>
</list>
<list incorrRT_targets_N2>
</list>
<list ACC_nontargets_N2>
</list>
<list NR_nontargets_N2>
</list>
<list corrRT_nontargets_N2>
</list>
<list incorrRT_nontargets_N2>
</list>
<list ACC_targets_N3>
</list>
<list NR_targets_N3>
</list>
<list corrRT_targets_N3>
</list>
<list incorrRT_targets_N3>
</list>
<list ACC_nontargets_N3>
</list>
<list NR_nontargets_N3>
</list>
<list corrRT_nontargets_N3>
</list>
<list incorrRT_nontargets_N3>
</list>
<list ACC_targets_N4>
</list>
<list NR_targets_N4>
</list>
<list corrRT_targets_N4>
</list>
<list incorrRT_targets_N4>
</list>
<list ACC_nontargets_N4>
</list>
<list NR_nontargets_N4>
</list>
<list corrRT_nontargets_N4>
</list>
<list incorrRT_nontargets_N4>
</list>
<list ACC_targets_N5>
</list>
<list NR_targets_N5>
</list>
<list corrRT_targets_N5>
</list>
<list incorrRT_targets_N5>
</list>
<list ACC_nontargets_N5>
</list>
<list NR_nontargets_N5>
</list>
<list corrRT_nontargets_N5>
</list>
<list incorrRT_nontargets_N5>
</list>
<list ACC_targets_N6>
</list>
<list NR_targets_N6>
</list>
<list corrRT_targets_N6>
</list>
<list incorrRT_targets_N6>
</list>
<list ACC_nontargets_N6>
</list>
<list NR_nontargets_N6>
</list>
<list corrRT_nontargets_N6>
</list>
<list incorrRT_nontargets_N6>
</list>
**************************************************************************************************************
**************************************************************************************************************
TRIALS
**************************************************************************************************************
**************************************************************************************************************
*there are 3 types of trials
1. start: presented at beginning of block when number of trials too small for Target trials; they can present
any of the stimuli (N = 0, start trial is skipped)
2. nontarget: trials that present stimuli that do not repeat the stimulus of n-trials before
3. target: trials that present Target stimuli
**********************************
Starttrial
**********************************
NOTE:
* for N = 0 trials: the trial is skipped
* for any other N: start trial runs N-times
<trial start>
/skip =[
values.N == 0;
]
/ ontrialbegin = [
trial.start.insertstimulustime(clearscreen, parameters.stimulusPresentationtime);
values.starttrialcounter += 1;
]
/ stimulustimes = [0 = startletters, targetreminder]
/ beginresponsetime = 0
/ validresponse = (noresponse, "A", "L")
/ correctresponse = ("L")
/ ontrialend = [
trial.start.resetstimulusframes();
list.items.insertitem(text.startletters.currentitemnumber, 1);
text.targetreminder.textcolor = black;
if (trial.start.correct){
values.responseCategory = "Correct";
} else if (trial.start.responsetext == "A"){
values.responseCategory = "Incorrect ";
} else {
values.responseCategory = "No response";
};
if (parameters.excludeStartTrialfromPerformanceMeasure == false){
list.blockACC.appenditem(trial.start.correct);
};
]
/trialduration = parameters.SOA
/branch = [
if (values.starttrialcounter < values.N) {
return trial.start;
};
]
</trial>
**********************************
Nontarget Trials
**********************************
<trial nontarget>
/ ontrialbegin = [
trial.nontarget.insertstimulustime(clearscreen, parameters.stimulusPresentationtime);
if (values.N > 0){
values.currenttarget = list.items.item(values.N);
};
]
/ stimulustimes = [0 = nontargetletters]
/validresponse = (noresponse, "A", "L")
/ beginresponsetime = 0
/ correctresponse = ("L")
/ ontrialend = [
trial.nontarget.resetstimulusframes();
list.items.insertitem(text.nontargetletters.currentitemnumber, 1);
list.blockACC.appenditem(trial.nontarget.correct);
if (trial.nontarget.correct){
values.responseCategory = "Correct";
list.ACC_nontargets.appenditem(1);
list.corrRT_nontargets.appenditem(trial.nontarget.latency);
list.NR_nontargets.appenditem(0);
if (values.N == 0){
list.ACC_nontargets_N0.appenditem(1);
list.corrRT_nontargets_N0.appenditem(trial.nontarget.latency);
list.NR_nontargets_N0.appenditem(0);
} else if (values.N == 1){
list.ACC_nontargets_N1.appenditem(1);
list.corrRT_nontargets_N1.appenditem(trial.nontarget.latency);
list.NR_nontargets_N1.appenditem(0);
} else if (values.N == 2){
list.ACC_nontargets_N2.appenditem(1);
list.corrRT_nontargets_N2.appenditem(trial.nontarget.latency);
list.NR_nontargets_N2.appenditem(0);
} else if (values.N == 3){
list.ACC_nontargets_N3.appenditem(1);
list.corrRT_nontargets_N3.appenditem(trial.nontarget.latency);
list.NR_nontargets_N3.appenditem(0);
} else if (values.N == 4){
list.ACC_nontargets_N4.appenditem(1);
list.corrRT_nontargets_N4.appenditem(trial.nontarget.latency);
list.NR_nontargets_N4.appenditem(0);
} else if (values.N == 5){
list.ACC_nontargets_N5.appenditem(1);
list.corrRT_nontargets_N5.appenditem(trial.nontarget.latency);
list.NR_nontargets_N5.appenditem(0);
} else if (values.N == 6){
list.ACC_nontargets_N6.appenditem(1);
list.corrRT_nontargets_N6.appenditem(trial.nontarget.latency);
list.NR_nontargets_N6.appenditem(0);
}//if further values of N should be added, add the necessary code here
} else if (trial.nontarget.responsetext == "A"){
values.responseCategory = "Incorrect";
list.ACC_nontargets.appenditem(0);
list.incorrRT_nontargets.appenditem(trial.nontarget.latency);
list.NR_nontargets.appenditem(0);
if (values.N == 0){
list.ACC_nontargets_N0.appenditem(0);
list.incorrRT_nontargets_N0.appenditem(trial.nontarget.latency);
list.NR_nontargets_N0.appenditem(0);
} else if (values.N == 1){
list.ACC_nontargets_N1.appenditem(0);
list.incorrRT_nontargets_N1.appenditem(trial.nontarget.latency);
list.NR_nontargets_N1.appenditem(0);
} else if (values.N == 2){
list.ACC_nontargets_N2.appenditem(0);
list.incorrRT_nontargets_N2.appenditem(trial.nontarget.latency);
list.NR_nontargets_N2.appenditem(0);
} else if (values.N == 3){
list.ACC_nontargets_N3.appenditem(0);
list.incorrRT_nontargets_N3.appenditem(trial.nontarget.latency);
list.NR_nontargets_N3.appenditem(0);
} else if (values.N == 4){
list.ACC_nontargets_N4.appenditem(0);
list.incorrRT_nontargets_N4.appenditem(trial.nontarget.latency);
list.NR_nontargets_N4.appenditem(0);
} else if (values.N == 5){
list.ACC_nontargets_N5.appenditem(0);
list.incorrRT_nontargets_N5.appenditem(trial.nontarget.latency);
list.NR_nontargets_N5.appenditem(0);
} else if (values.N == 6){
list.ACC_nontargets_N6.appenditem(0);
list.incorrRT_nontargets_N6.appenditem(trial.nontarget.latency);
list.NR_nontargets_N6.appenditem(0);
}//if further values of N should be added, add the necessary code here
} else {
values.responseCategory = "No Response";
list.ACC_nontargets.appenditem(0);
list.NR_nontargets.appenditem(1);
if (values.N == 0){
list.ACC_nontargets_N0.appenditem(0);
list.NR_nontargets_N0.appenditem(1);
} else if (values.N == 1){
list.ACC_nontargets_N1.appenditem(0);
list.NR_nontargets_N1.appenditem(1);
} else if (values.N == 2){
list.ACC_nontargets_N2.appenditem(0);
list.NR_nontargets_N2.appenditem(1);
} else if (values.N == 3){
list.ACC_nontargets_N3.appenditem(0);
list.NR_nontargets_N3.appenditem(1);
} else if (values.N == 4){
list.ACC_nontargets_N4.appenditem(0);
list.NR_nontargets_N4.appenditem(1);
} else if (values.N == 5){
list.ACC_nontargets_N5.appenditem(0);
list.NR_nontargets_N5.appenditem(1);
} else if (values.N == 6){
list.ACC_nontargets_N6.appenditem(0);
list.NR_nontargets_N6.appenditem(1);
}//if further values of N should be added, add the necessary code here
};
]
/ trialduration = parameters.SOA
</trial>
**********************************
Target Trials
**********************************
**if target, press the letters "A" (code: "A")
<trial target>
/ ontrialbegin = [
trial.target.insertstimulustime(clearscreen, parameters.stimulusPresentationtime);
if (values.N > 0){
values.currenttarget = list.items.item(values.N);
};
]
/ stimulustimes = [0 = targetletters, targetalert]
/validresponse = (noresponse, "A", "L")
/ beginresponsetime = 0
/ correctresponse = ("A")
/ ontrialend = [
trial.target.resetstimulusframes();
list.items.insertitem(text.targetletters.currentitemnumber, 1);
list.blockACC.appenditem(trial.target.correct);
//summary variables:
if (trial.target.correct){
values.responseCategory = "Correct";
list.ACC_targets.appenditem(1);
list.corrRT_targets.appenditem(trial.target.latency);
list.NR_targets.appenditem(0);
if (values.N == 0){
list.ACC_targets_N0.appenditem(1);
list.corrRT_targets_N0.appenditem(trial.target.latency);
list.NR_targets_N0.appenditem(0);
} else if (values.N == 1){
list.ACC_targets_N1.appenditem(1);
list.corrRT_targets_N1.appenditem(trial.target.latency);
list.NR_targets_N1.appenditem(0);
} else if (values.N == 2){
list.ACC_targets_N2.appenditem(1);
list.corrRT_targets_N2.appenditem(trial.target.latency);
list.NR_targets_N2.appenditem(0);
} else if (values.N == 3){
list.ACC_targets_N3.appenditem(1);
list.corrRT_targets_N3.appenditem(trial.target.latency);
list.NR_targets_N3.appenditem(0);
} else if (values.N == 4){
list.ACC_targets_N4.appenditem(1);
list.corrRT_targets_N4.appenditem(trial.target.latency);
list.NR_targets_N4.appenditem(0);
} else if (values.N == 5){
list.ACC_targets_N5.appenditem(1);
list.corrRT_targets_N5.appenditem(trial.target.latency);
list.NR_targets_N5.appenditem(0);
} else if (values.N == 6){
list.ACC_targets_N6.appenditem(1);
list.corrRT_targets_N6.appenditem(trial.target.latency);
list.NR_targets_N6.appenditem(0);
}//if further values of N should be added, add the necessary code here
} else if (trial.target.responsetext == "L"){
values.responseCategory = "Incorrect";
list.ACC_targets.appenditem(0);
list.incorrRT_targets.appenditem(trial.target.latency);
list.NR_targets.appenditem(0);
if (values.N == 0){
list.ACC_targets_N0.appenditem(0);
list.incorrRT_targets_N0.appenditem(trial.target.latency);
list.NR_targets_N0.appenditem(0);
} else if (values.N == 1){
list.ACC_targets_N1.appenditem(0);
list.incorrRT_targets_N1.appenditem(trial.target.latency);
list.NR_targets_N1.appenditem(0);
} else if (values.N == 2){
list.ACC_targets_N2.appenditem(0);
list.incorrRT_targets_N2.appenditem(trial.target.latency);
list.NR_targets_N2.appenditem(0);
} else if (values.N == 3){
list.ACC_targets_N3.appenditem(0);
list.incorrRT_targets_N3.appenditem(trial.target.latency);
list.NR_targets_N3.appenditem(0);
} else if (values.N == 4){
list.ACC_targets_N4.appenditem(0);
list.incorrRT_targets_N4.appenditem(trial.target.latency);
list.NR_targets_N4.appenditem(0);
} else if (values.N == 5){
list.ACC_targets_N5.appenditem(0);
list.incorrRT_targets_N5.appenditem(trial.target.latency);
list.NR_targets_N5.appenditem(0);
} else if (values.N == 6){
list.ACC_targets_N6.appenditem(0);
list.incorrRT_targets_N6.appenditem(trial.target.latency);
list.NR_targets_N6.appenditem(0);
}//if further values of N should be added, add the necessary code here
} else {
values.responseCategory = "No Response";
list.ACC_targets.appenditem(0);
list.NR_targets.appenditem(1);
if (values.N == 0){
list.ACC_targets_N0.appenditem(0);
list.NR_targets_N0.appenditem(1);
} else if (values.N == 1){
list.ACC_targets_N1.appenditem(0);
list.NR_targets_N1.appenditem(1);
} else if (values.N == 2){
list.ACC_targets_N2.appenditem(0);
list.NR_targets_N2.appenditem(1);
} else if (values.N == 3){
list.ACC_targets_N3.appenditem(0);
list.NR_targets_N3.appenditem(1);
} else if (values.N == 4){
list.ACC_targets_N4.appenditem(0);
list.NR_targets_N4.appenditem(1);
} else if (values.N == 5){
list.ACC_targets_N5.appenditem(0);
list.NR_targets_N5.appenditem(1);
} else if (values.N == 6){
list.ACC_targets_N6.appenditem(0);
list.NR_targets_N6.appenditem(1);
}//if further values of N should be added, add the necessary code here
};
]
/ trialduration = parameters.SOA
</trial>
**********************************
Slider Trials
**********************************
<slidertrial nbackperception>
/ stimulusframes = [1=clearscreen, perceptionquestion]
/ range = (0,100)
/ increment = 1
/ orientation = horizontal
/ labels = ("<font color=white>0</font>", "<font color=white>100</font>")
/ required = true
/ position = (50%, 60%)
/ size = (90%, 20%)
/ buttonlabel = "Submit"
</slidertrial>
<text perceptionquestion>
/ items = ("Please enter the percentage you believe you got correct on the N-back task")
/ txcolor = white
/ txbgcolor = black
/ position = (50%, 30%)
</text>
**************************************************************************************************************
**************************************************************************************************************
BLOCKS
**************************************************************************************************************
**************************************************************************************************************
**********************************************
PRACTICE
**********************************************
* Practice Blocks give feedback
* Block starts with
(b) N start-trials that cannot present Targets yet (for N=0, trial.start is skipped)
(c) 10 practice trials: ratio targets : nontargets = 3 : 7
* stops after lever N = highestN (set by experimenter)
(d) runs level of N from list.nextN_practice in the order specified under list settings
<block Practice>
/ preinstructions = (nback_levelInstructions)
/ onblockbegin = [
values.N = list.nextN_practice.nextvalue;
values.currenttarget = 0;
if (values.N == 0){
values.currenttarget = 1;
};
list.items.reset();
values.TotalBlocks += 1;
values.starttrialcounter = 0;
list.blockACC.reset();
]
/ trials = [
1 = start;
2 - 10 = noreplace(nontarget, nontarget, target);
]
/ screencolor = (0, 0, 0)
/ recorddata = true
/ branch = [
if (values.TotalBlocks >= list.nextN_practice.itemcount) {
values.TotalBlocks = 0;
block.RepeatPractice;
} else {
block.Practice;
};
]
</block>
if trial feedback is desired:
/ errormessage = true(ErrorFeedback, 500)
/ correctmessage = true(CorrectFeedback, 500)
<block RepeatPractice>
/ skip = [
parameters.allowPracticeRepeat == false;
]
/ trials = [1 = repeatpractice]
/ recorddata = false
/ branch = [
if (trial.repeatpractice.responsetext == "Y") {
return block.Practice;
};
]
/ screencolor = black
</block>
<block PracticeEnd>
/ preinstructions = (practiceend)
/ recorddata = false
</block>
**********************************************
EXPERIMENTAL-BLOCKS NONADAPTIVE
**********************************************
<block StartTest>
/ preinstructions = (htmlpage.nback_testStart)
/ recorddata = false
/ onblockbegin = [
values.TotalBlocks = 0;
//reset all necessary lists
list.ACC_nontargets.reset();
list.incorrRT_nontargets.reset();
list.corrRT_nontargets.reset();
list.NR_nontargets.reset();
list.ACC_targets.reset();
list.incorrRT_targets.reset();
list.corrRT_targets.reset();
list.NR_targets.reset();
list.ACC_nontargets_N0.reset();
list.incorrRT_nontargets_N0.reset();
list.corrRT_nontargets_N0.reset();
list.NR_nontargets_N0.reset();
list.ACC_targets_N0.reset();
list.incorrRT_targets_N0.reset();
list.corrRT_targets_N0.reset();
list.NR_targets_N0.reset();
list.ACC_nontargets_N1.reset();
list.incorrRT_nontargets_N1.reset();
list.corrRT_nontargets_N1.reset();
list.NR_nontargets_N1.reset();
list.ACC_targets_N1.reset();
list.incorrRT_targets_N1.reset();
list.corrRT_targets_N1.reset();
list.NR_targets_N1.reset();
list.ACC_nontargets_N2.reset();
list.incorrRT_nontargets_N2.reset();
list.corrRT_nontargets_N2.reset();
list.NR_nontargets_N2.reset();
list.ACC_targets_N2.reset();
list.incorrRT_targets_N2.reset();
list.corrRT_targets_N2.reset();
list.NR_targets_N2.reset();
list.ACC_nontargets_N3.reset();
list.incorrRT_nontargets_N3.reset();
list.corrRT_nontargets_N3.reset();
list.NR_nontargets_N3.reset();
list.ACC_targets_N3.reset();
list.incorrRT_targets_N3.reset();
list.corrRT_targets_N3.reset();
list.NR_targets_N3.reset();
list.ACC_nontargets_N4.reset();
list.incorrRT_nontargets_N4.reset();
list.corrRT_nontargets_N4.reset();
list.NR_nontargets_N4.reset();
list.ACC_targets_N4.reset();
list.incorrRT_targets_N4.reset();
list.corrRT_targets_N4.reset();
list.NR_targets_N4.reset();
list.ACC_nontargets_N5.reset();
list.incorrRT_nontargets_N5.reset();
list.corrRT_nontargets_N5.reset();
list.NR_nontargets_N5.reset();
list.ACC_targets_N5.reset();
list.incorrRT_targets_N5.reset();
list.corrRT_targets_N5.reset();
list.NR_targets_N5.reset();
list.ACC_nontargets_N6.reset();
list.incorrRT_nontargets_N6.reset();
list.corrRT_nontargets_N6.reset();
list.NR_nontargets_N6.reset();
list.ACC_targets_N6.reset();
list.incorrRT_targets_N6.reset();
list.corrRT_targets_N6.reset();
list.NR_targets_N6.reset();
//if any further N-levels should be run, reset the necessary lists here
]
</block>
* Block starts with
(a) Instructions
(b) N start-trials that cannot present Targets yet
(c) 20 Experimental trials
* ratio targets : nontargets = 6 : 14 = 3 : 7
* Block runs as many times as there are items in list.Nlevel and in the sequence controlled by list.Nlevel
<block Test>
/ preinstructions = (nback_levelInstructions)
/ onblockbegin = [
list.blockACC.reset();
values.N = list.Nlevel.nextvalue;
values.currenttarget = 0;
if (values.N == 0){
values.currenttarget = 1;
};
list.items.reset();
values.lastIndex = 1;
expressions.fillitemlist;
values.TotalBlocks += 1;
values.starttrialcounter = 0;
]
/ trials = [
1 = start;
2 - 98 = noreplace(nontarget, nontarget,target);
99 = slidertrial.nbackperception;
]
/ screencolor = (0, 0, 0)
/ branch = [
//as long as the number of test blocks run is smaller than the items in list.Nlevel, another test block will start
if (values.TotalBlocks < list.Nlevel.itemcount){
return block.Test;
};
]
</block>
<block Finish>
/ trials = [
1 = finish;
]
</block>
**************************************************************************************************************
**************************************************************************************************************
EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************
*After running the initial instructions, participants work through practice blocks for N = lowestN to N = highestN
* After practice, participants work through 3 blocks for each of the level of N (levels are pseudorandomly determined)
<expt>
/ blocks = [
1 = Introduction;
2 = Practice;
3 = PracticeEnd;
4 = StartTest;
5 = Test;
6 = Finish;
]
</expt>
**************************************************************************************************************
End of File
**************************************************************************************************************