Random sampling question


Author
Message
f.smulders@maastrichtunive...
f.smulders@maastrichtuniversity.nl
New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)
Group: Forum Members
Posts: 3, Visits: 17
I have a memory task with a study / Encoding block and a Test block. I have 56 picture stimuli, of which a random 40 must be presented during the Encoding block. During the Test block, all 56 are presented, so that during Test, 40 will be 'old' and 16 will be 'new'. That is indeed accomplished by the script below.
But now I want something better: I want exactly 10 old items and 4 new items (randomly interspersed) in every quartile of the Test block. Still, it is essential that these are randomly selected without replacement out of the whole set of 56 pictures, so different they are across participants.
The goal is to analyze results as a function of 'time' with 4 levels, and then have 10 old and 4 new items at each of the 4 levels of the factor 'time'.
I feel I need to set things up differently, but how?
Many thanks for help!

*************************************************
Creating Instruction pages
*************************************************

<page introPage>
^Welcome to the experiment.^
The experiment contains a Study and a Test phase.^
In each phase, you will be shown a series of pictures.^
^
During the Study phase, determine whether a pictured object is SMALLER than a soccerball or LARGER.^
Also, remember which pictures you have seen, and when. You later need this in the Test phase.^
The study phase will take [] minutes in total.^
^
During the Test phase, we present many pictures from the Study phase again ('old pictures'),^
but also 'new pictures'. You need to indicate if a picture is 'old' or 'new'.^
If 'old', then you indicate the moment at which it was presented during the Study phase on a timeline.^
</page>

<page taskPage>
"More instructions to be given before blocks, here."
</page>

<page encInstrPage>
Study phase^
^
^
You will see a series of pictures, taking about [] minutes.^
Please indicate for every object whether it is smaller or larger than a soccerball.^
There is no need to respond very fast, just inspect each picture thoroughly.^
You have three seconds to answer.^
^
If smaller, press 'S' with your left index finger.^
If larger, press 'L' with your right index finger.^
^
Keep these fingers above the 'S' and 'L' keys on the keyboard.^
Remember both the pictures and their moment of presentation.^
</page>

<page testInstrPage>
Test phase^^^
You will see a series of pictures and use the keyboard and mouse.^
Some pictures are the same as in the Study phase ('old), others are 'new'.^
For each picture, recall if it is new or old.^
If new, then click that button.^
If old, then click on the time line to indicate when it was presented during the Study phase.^
</page>

<page endPage>
""End of experiment^^
Many thanks !!""
</page>

<instruct>
/ lastlabel = ("Press the spacebar to continue")
/ nextlabel = ("Press the spacebar to continue")
/ nextkey = (" ")
/ fontstyle = ("Arial", 20pt, false, false, false, false, 5)
</instruct>

<item encpics>
/1= "p101belt02a.jpg"
/2= "p102bench01.jpg"
/3= "p103birdhouse.jpg"
/4= "p104bottleofredwine01.jpg"
/5= "p105boxingglove02a.jpg"
/6= "p106bust.jpg"
/7= "p107button03.jpg"
/8= "p108camera01b.jpg"
/9= "p109candelabra.jpg"
/10= "p110candy.jpg"
/11= "p111cello.jpg"
/12= "p112cessna.jpg"
/13= "p113chain01.jpg"
/14= "p114chainsaw.jpg"
/15= "p115chair.jpg"
/16= "p116clock01a.jpg"
/17 = "p117clothespin01.jpg"
/18 = "p118comb01b (1).jpg"
/19 = "p119cookingpot.jpg"
/20 = "p120corkscrew03c.jpg"
/21 = "p121cornet.jpg"
/22 = "p122cracker02.jpg"
/23 = "p123dice02a.jpg"
/24 = "p124electricguitar01.jpg"
/25 = "p125electrictoothbrush01c.jpg"
/26 = "p126fan.jpg"
/27 = "p127fence02.jpg"
/28 = "p128ferry.jpg"
/29 = "p129fireextinguisher02.jpg"
/30 = "p130flashlight03a.jpg"
/31 = "p131fork04b.jpg"
/32 = "p132gardenshears01a.jpg"
/33 = "p133glasses01b.jpg"
/34 = "p134hairdryer01b.jpg"
/35 = "p135hanger04.jpg"
/36 = "p136hat05.jpg"
/37 = "p137highlighter03b.jpg"
/38 = "p138iron01a.jpg"
/39 = "p139key01.jpg"
/40 = "p140kite.jpg"
/41 = "p141lamp02a.jpg"
/42 = "p142lightbulb02a.jpg"
/43 = "p143lock02b.jpg"
/44 = "p144magnifyingglass01a.jpg"
/45 = "p145masquerademask02b.jpg"
/46 = "p146microphone01.jpg"
/47 = "p147feather01.jpg"
/48 = "p148pencilsharpener03a.jpg"
/49 = "p149pylon01.jpg"
/50 = "p150saltshaker02b.jpg"
/51 = "p151scissors02a.jpg"
/52 = "p152stapler01.jpg"
/53 = "p153thumbtack02b (1).jpg"
/54 = "p154tongs01a.jpg"
/55 = "p155handmixer01a.jpg"
/56 = "p156croissant02b.jpg"
</item>

<picture studypic>
/ items=encpics
/ position = (50%, 50%)
/ height = 20%
/ erase=false
</picture>

<picture testpic>
/ items=encpics
/ position = (50%, 40%)
/ height = 20%
</picture>

<text encTaskReminder>
/ items = ("Study phase~n~nPress:~nL: larger than football;~nS: smaller than football")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<text testTaskReminder>
/ items = ("Test phase")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<shape focuspoint>
/ shape= rectangle
/ color = (128, 128, 128)
/ size = (400, 400)
/ position = (50%, 50%)
/ erase = false
</shape>

<text errormessage>
/ items = ("Please respond s or l !!")
/ txcolor = white
/ txbgcolor = (transparent)
/ size=(600, 50)
/ fontstyle = ("Arial", 20pt)
/ position = (50%,70%)
</text>


*************************************************
Creating trials
*************************************************
Encoding trial
<trial encTrial>
/ stimulustimes = [100=studypic; 3500=focuspoint]
/ beginresponseframe = 1
/ inputdevice = keyboard
/ validresponse = ("s","l","S","L")
/ correctresponse = ("s","l","S","L")
/ beginresponsetime = 700
/ responseinterrupt = trial
/ trialduration = 4500
</trial>

Test trial: first asks about old vs. new, then slider or nothing, respectively
<text testNewText>
/ items = ("You answered: new picture")
/ txcolor = white
/ txbgcolor = (transparent)
/ fontstyle = ("Arial", 20pt)
</text>

<trial testNewTrial>
/ stimulustimes = [10=testNewText;]
/ trialduration = 3000 // duration should not be much shorter than the slider trial, else pps gain time by saying 'new'
</trial>

<text testTrialOldNewInstr>
/ items = ("Press o if seen before, and press n if new...")
/ position = (50%, 60%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</text>

<text testTrialSliderInstr>
/ items = ("in previous series, presented at ...?")
/ position = (50%, 60%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</text>

<slidertrial testSlider>
/ stimulustimes = [1000=testTrialSliderInstr; ]
/ buttonlabel = "Press to continue"
/ position = (50, 70)
/ size = (40%,10%)
/ range = (1,80)
/ increment = 1
/ showticks = false
/ labels = ("start","middle","end",)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</slidertrial>

<trial testTrialOldNew>
/ stimulustimes = [1000=testpic,testTrialOldNewInstr; ]
/ inputdevice = keyboard
/ validresponse=("o", "n")
/ branch=[if (trial.testTrialOldNew.responsetext == "n") trial.testNewTrial] // for new-response
/ branch=[if (trial.testTrialOldNew.responsetext == "o") trial.testSlider] // for 'old' response, show slider
</trial>



*************************************************
Creating blocks
*************************************************
<block encBlock>
/ preinstructions = (encInstrPage)
/ trials = [1-40 = noreplace(encTrial)]
/ bgstim = (encTaskReminder)
/ screencolor = (128, 128, 128)
/ errormessage = true(errormessage, 2500)
</block>

<block testBlock>
/ preinstructions = (testInstrPage)
/ trials = [1-56 = noreplace(testTrialOldNew)]
/ bgstim = (testTaskReminder)
/ screencolor = (128, 128, 128)
</block>

*************************************************
Creating an Experiment
*************************************************
<expt tmem>
/ preinstructions = (introPage, taskPage)
/ blocks = [1=encBlock; 2=testBlock]
/ postinstructions = (endPage)
</expt>

<survey tmemSurvey>
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 2%
/ showpagenumbers = false
</survey>



<defaults>
/ fontstyle = ("Arial", 20pt)
/ posttrialpause = 500
/ screencolor = (128, 128, 128)
</defaults>


Attachments
tmeminq.iqx (30 views, 7.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
I have a memory task with a study / Encoding block and a Test block. I have 56 picture stimuli, of which a random 40 must be presented during the Encoding block. During the Test block, all 56 are presented, so that during Test, 40 will be 'old' and 16 will be 'new'. That is indeed accomplished by the script below.
But now I want something better: I want exactly 10 old items and 4 new items (randomly interspersed) in every quartile of the Test block. Still, it is essential that these are randomly selected without replacement out of the whole set of 56 pictures, so different they are across participants.
The goal is to analyze results as a function of 'time' with 4 levels, and then have 10 old and 4 new items at each of the 4 levels of the factor 'time'.
I feel I need to set things up differently, but how?
Many thanks for help!

*************************************************
Creating Instruction pages
*************************************************

<page introPage>
^Welcome to the experiment.^
The experiment contains a Study and a Test phase.^
In each phase, you will be shown a series of pictures.^
^
During the Study phase, determine whether a pictured object is SMALLER than a soccerball or LARGER.^
Also, remember which pictures you have seen, and when. You later need this in the Test phase.^
The study phase will take [] minutes in total.^
^
During the Test phase, we present many pictures from the Study phase again ('old pictures'),^
but also 'new pictures'. You need to indicate if a picture is 'old' or 'new'.^
If 'old', then you indicate the moment at which it was presented during the Study phase on a timeline.^
</page>

<page taskPage>
"More instructions to be given before blocks, here."
</page>

<page encInstrPage>
Study phase^
^
^
You will see a series of pictures, taking about [] minutes.^
Please indicate for every object whether it is smaller or larger than a soccerball.^
There is no need to respond very fast, just inspect each picture thoroughly.^
You have three seconds to answer.^
^
If smaller, press 'S' with your left index finger.^
If larger, press 'L' with your right index finger.^
^
Keep these fingers above the 'S' and 'L' keys on the keyboard.^
Remember both the pictures and their moment of presentation.^
</page>

<page testInstrPage>
Test phase^^^
You will see a series of pictures and use the keyboard and mouse.^
Some pictures are the same as in the Study phase ('old), others are 'new'.^
For each picture, recall if it is new or old.^
If new, then click that button.^
If old, then click on the time line to indicate when it was presented during the Study phase.^
</page>

<page endPage>
""End of experiment^^
Many thanks !!""
</page>

<instruct>
/ lastlabel = ("Press the spacebar to continue")
/ nextlabel = ("Press the spacebar to continue")
/ nextkey = (" ")
/ fontstyle = ("Arial", 20pt, false, false, false, false, 5)
</instruct>

<item encpics>
/1= "p101belt02a.jpg"
/2= "p102bench01.jpg"
/3= "p103birdhouse.jpg"
/4= "p104bottleofredwine01.jpg"
/5= "p105boxingglove02a.jpg"
/6= "p106bust.jpg"
/7= "p107button03.jpg"
/8= "p108camera01b.jpg"
/9= "p109candelabra.jpg"
/10= "p110candy.jpg"
/11= "p111cello.jpg"
/12= "p112cessna.jpg"
/13= "p113chain01.jpg"
/14= "p114chainsaw.jpg"
/15= "p115chair.jpg"
/16= "p116clock01a.jpg"
/17 = "p117clothespin01.jpg"
/18 = "p118comb01b (1).jpg"
/19 = "p119cookingpot.jpg"
/20 = "p120corkscrew03c.jpg"
/21 = "p121cornet.jpg"
/22 = "p122cracker02.jpg"
/23 = "p123dice02a.jpg"
/24 = "p124electricguitar01.jpg"
/25 = "p125electrictoothbrush01c.jpg"
/26 = "p126fan.jpg"
/27 = "p127fence02.jpg"
/28 = "p128ferry.jpg"
/29 = "p129fireextinguisher02.jpg"
/30 = "p130flashlight03a.jpg"
/31 = "p131fork04b.jpg"
/32 = "p132gardenshears01a.jpg"
/33 = "p133glasses01b.jpg"
/34 = "p134hairdryer01b.jpg"
/35 = "p135hanger04.jpg"
/36 = "p136hat05.jpg"
/37 = "p137highlighter03b.jpg"
/38 = "p138iron01a.jpg"
/39 = "p139key01.jpg"
/40 = "p140kite.jpg"
/41 = "p141lamp02a.jpg"
/42 = "p142lightbulb02a.jpg"
/43 = "p143lock02b.jpg"
/44 = "p144magnifyingglass01a.jpg"
/45 = "p145masquerademask02b.jpg"
/46 = "p146microphone01.jpg"
/47 = "p147feather01.jpg"
/48 = "p148pencilsharpener03a.jpg"
/49 = "p149pylon01.jpg"
/50 = "p150saltshaker02b.jpg"
/51 = "p151scissors02a.jpg"
/52 = "p152stapler01.jpg"
/53 = "p153thumbtack02b (1).jpg"
/54 = "p154tongs01a.jpg"
/55 = "p155handmixer01a.jpg"
/56 = "p156croissant02b.jpg"
</item>

<picture studypic>
/ items=encpics
/ position = (50%, 50%)
/ height = 20%
/ erase=false
</picture>

<picture testpic>
/ items=encpics
/ position = (50%, 40%)
/ height = 20%
</picture>

<text encTaskReminder>
/ items = ("Study phase~n~nPress:~nL: larger than football;~nS: smaller than football")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<text testTaskReminder>
/ items = ("Test phase")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<shape focuspoint>
/ shape= rectangle
/ color = (128, 128, 128)
/ size = (400, 400)
/ position = (50%, 50%)
/ erase = false
</shape>

<text errormessage>
/ items = ("Please respond s or l !!")
/ txcolor = white
/ txbgcolor = (transparent)
/ size=(600, 50)
/ fontstyle = ("Arial", 20pt)
/ position = (50%,70%)
</text>


*************************************************
Creating trials
*************************************************
Encoding trial
<trial encTrial>
/ stimulustimes = [100=studypic; 3500=focuspoint]
/ beginresponseframe = 1
/ inputdevice = keyboard
/ validresponse = ("s","l","S","L")
/ correctresponse = ("s","l","S","L")
/ beginresponsetime = 700
/ responseinterrupt = trial
/ trialduration = 4500
</trial>

Test trial: first asks about old vs. new, then slider or nothing, respectively
<text testNewText>
/ items = ("You answered: new picture")
/ txcolor = white
/ txbgcolor = (transparent)
/ fontstyle = ("Arial", 20pt)
</text>

<trial testNewTrial>
/ stimulustimes = [10=testNewText;]
/ trialduration = 3000 // duration should not be much shorter than the slider trial, else pps gain time by saying 'new'
</trial>

<text testTrialOldNewInstr>
/ items = ("Press o if seen before, and press n if new...")
/ position = (50%, 60%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</text>

<text testTrialSliderInstr>
/ items = ("in previous series, presented at ...?")
/ position = (50%, 60%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</text>

<slidertrial testSlider>
/ stimulustimes = [1000=testTrialSliderInstr; ]
/ buttonlabel = "Press to continue"
/ position = (50, 70)
/ size = (40%,10%)
/ range = (1,80)
/ increment = 1
/ showticks = false
/ labels = ("start","middle","end",)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</slidertrial>

<trial testTrialOldNew>
/ stimulustimes = [1000=testpic,testTrialOldNewInstr; ]
/ inputdevice = keyboard
/ validresponse=("o", "n")
/ branch=[if (trial.testTrialOldNew.responsetext == "n") trial.testNewTrial] // for new-response
/ branch=[if (trial.testTrialOldNew.responsetext == "o") trial.testSlider] // for 'old' response, show slider
</trial>



*************************************************
Creating blocks
*************************************************
<block encBlock>
/ preinstructions = (encInstrPage)
/ trials = [1-40 = noreplace(encTrial)]
/ bgstim = (encTaskReminder)
/ screencolor = (128, 128, 128)
/ errormessage = true(errormessage, 2500)
</block>

<block testBlock>
/ preinstructions = (testInstrPage)
/ trials = [1-56 = noreplace(testTrialOldNew)]
/ bgstim = (testTaskReminder)
/ screencolor = (128, 128, 128)
</block>

*************************************************
Creating an Experiment
*************************************************
<expt tmem>
/ preinstructions = (introPage, taskPage)
/ blocks = [1=encBlock; 2=testBlock]
/ postinstructions = (endPage)
</expt>

<survey tmemSurvey>
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 2%
/ showpagenumbers = false
</survey>



<defaults>
/ fontstyle = ("Arial", 20pt)
/ posttrialpause = 500
/ screencolor = (128, 128, 128)
</defaults>


Old-new paradigms have been discussed many times before, so I suggest you do a search.

The gist is this: Use <list>s.
- Have one list containing all 56 item numbers.
- /onexptbegin, divy up those 56 item numbers: Put 40 in an "old" list (those will be shown in the encoding block), put 16 in a "new" list (those will not be shown),
- For the test block, set up two trials "old" and "new". For the old trial, show the items contained in the old list again. For the new trial, show the items contained in the new list,
- Sample old and new trials in the manner you want, i.e. 4 chunks of 14 trials (10 old, 4 new, i.e. a ratio of 5:2).

Edited Last Month by Dave
f.smulders@maastrichtunive...
f.smulders@maastrichtuniversity.nl
New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)
Group: Forum Members
Posts: 3, Visits: 17
Dave - 3/5/2024
I have a memory task with a study / Encoding block and a Test block. I have 56 picture stimuli, of which a random 40 must be presented during the Encoding block. During the Test block, all 56 are presented, so that during Test, 40 will be 'old' and 16 will be 'new'. That is indeed accomplished by the script below.
But now I want something better: I want exactly 10 old items and 4 new items (randomly interspersed) in every quartile of the Test block. Still, it is essential that these are randomly selected without replacement out of the whole set of 56 pictures, so different they are across participants.
The goal is to analyze results as a function of 'time' with 4 levels, and then have 10 old and 4 new items at each of the 4 levels of the factor 'time'.
I feel I need to set things up differently, but how?
Many thanks for help!

*************************************************
Creating Instruction pages
*************************************************

<page introPage>
^Welcome to the experiment.^
The experiment contains a Study and a Test phase.^
In each phase, you will be shown a series of pictures.^
^
During the Study phase, determine whether a pictured object is SMALLER than a soccerball or LARGER.^
Also, remember which pictures you have seen, and when. You later need this in the Test phase.^
The study phase will take [] minutes in total.^
^
During the Test phase, we present many pictures from the Study phase again ('old pictures'),^
but also 'new pictures'. You need to indicate if a picture is 'old' or 'new'.^
If 'old', then you indicate the moment at which it was presented during the Study phase on a timeline.^
</page>

<page taskPage>
"More instructions to be given before blocks, here."
</page>

<page encInstrPage>
Study phase^
^
^
You will see a series of pictures, taking about [] minutes.^
Please indicate for every object whether it is smaller or larger than a soccerball.^
There is no need to respond very fast, just inspect each picture thoroughly.^
You have three seconds to answer.^
^
If smaller, press 'S' with your left index finger.^
If larger, press 'L' with your right index finger.^
^
Keep these fingers above the 'S' and 'L' keys on the keyboard.^
Remember both the pictures and their moment of presentation.^
</page>

<page testInstrPage>
Test phase^^^
You will see a series of pictures and use the keyboard and mouse.^
Some pictures are the same as in the Study phase ('old), others are 'new'.^
For each picture, recall if it is new or old.^
If new, then click that button.^
If old, then click on the time line to indicate when it was presented during the Study phase.^
</page>

<page endPage>
""End of experiment^^
Many thanks !!""
</page>

<instruct>
/ lastlabel = ("Press the spacebar to continue")
/ nextlabel = ("Press the spacebar to continue")
/ nextkey = (" ")
/ fontstyle = ("Arial", 20pt, false, false, false, false, 5)
</instruct>

<item encpics>
/1= "p101belt02a.jpg"
/2= "p102bench01.jpg"
/3= "p103birdhouse.jpg"
/4= "p104bottleofredwine01.jpg"
/5= "p105boxingglove02a.jpg"
/6= "p106bust.jpg"
/7= "p107button03.jpg"
/8= "p108camera01b.jpg"
/9= "p109candelabra.jpg"
/10= "p110candy.jpg"
/11= "p111cello.jpg"
/12= "p112cessna.jpg"
/13= "p113chain01.jpg"
/14= "p114chainsaw.jpg"
/15= "p115chair.jpg"
/16= "p116clock01a.jpg"
/17 = "p117clothespin01.jpg"
/18 = "p118comb01b (1).jpg"
/19 = "p119cookingpot.jpg"
/20 = "p120corkscrew03c.jpg"
/21 = "p121cornet.jpg"
/22 = "p122cracker02.jpg"
/23 = "p123dice02a.jpg"
/24 = "p124electricguitar01.jpg"
/25 = "p125electrictoothbrush01c.jpg"
/26 = "p126fan.jpg"
/27 = "p127fence02.jpg"
/28 = "p128ferry.jpg"
/29 = "p129fireextinguisher02.jpg"
/30 = "p130flashlight03a.jpg"
/31 = "p131fork04b.jpg"
/32 = "p132gardenshears01a.jpg"
/33 = "p133glasses01b.jpg"
/34 = "p134hairdryer01b.jpg"
/35 = "p135hanger04.jpg"
/36 = "p136hat05.jpg"
/37 = "p137highlighter03b.jpg"
/38 = "p138iron01a.jpg"
/39 = "p139key01.jpg"
/40 = "p140kite.jpg"
/41 = "p141lamp02a.jpg"
/42 = "p142lightbulb02a.jpg"
/43 = "p143lock02b.jpg"
/44 = "p144magnifyingglass01a.jpg"
/45 = "p145masquerademask02b.jpg"
/46 = "p146microphone01.jpg"
/47 = "p147feather01.jpg"
/48 = "p148pencilsharpener03a.jpg"
/49 = "p149pylon01.jpg"
/50 = "p150saltshaker02b.jpg"
/51 = "p151scissors02a.jpg"
/52 = "p152stapler01.jpg"
/53 = "p153thumbtack02b (1).jpg"
/54 = "p154tongs01a.jpg"
/55 = "p155handmixer01a.jpg"
/56 = "p156croissant02b.jpg"
</item>

<picture studypic>
/ items=encpics
/ position = (50%, 50%)
/ height = 20%
/ erase=false
</picture>

<picture testpic>
/ items=encpics
/ position = (50%, 40%)
/ height = 20%
</picture>

<text encTaskReminder>
/ items = ("Study phase~n~nPress:~nL: larger than football;~nS: smaller than football")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<text testTaskReminder>
/ items = ("Test phase")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<shape focuspoint>
/ shape= rectangle
/ color = (128, 128, 128)
/ size = (400, 400)
/ position = (50%, 50%)
/ erase = false
</shape>

<text errormessage>
/ items = ("Please respond s or l !!")
/ txcolor = white
/ txbgcolor = (transparent)
/ size=(600, 50)
/ fontstyle = ("Arial", 20pt)
/ position = (50%,70%)
</text>


*************************************************
Creating trials
*************************************************
Encoding trial
<trial encTrial>
/ stimulustimes = [100=studypic; 3500=focuspoint]
/ beginresponseframe = 1
/ inputdevice = keyboard
/ validresponse = ("s","l","S","L")
/ correctresponse = ("s","l","S","L")
/ beginresponsetime = 700
/ responseinterrupt = trial
/ trialduration = 4500
</trial>

Test trial: first asks about old vs. new, then slider or nothing, respectively
<text testNewText>
/ items = ("You answered: new picture")
/ txcolor = white
/ txbgcolor = (transparent)
/ fontstyle = ("Arial", 20pt)
</text>

<trial testNewTrial>
/ stimulustimes = [10=testNewText;]
/ trialduration = 3000 // duration should not be much shorter than the slider trial, else pps gain time by saying 'new'
</trial>

<text testTrialOldNewInstr>
/ items = ("Press o if seen before, and press n if new...")
/ position = (50%, 60%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</text>

<text testTrialSliderInstr>
/ items = ("in previous series, presented at ...?")
/ position = (50%, 60%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</text>

<slidertrial testSlider>
/ stimulustimes = [1000=testTrialSliderInstr; ]
/ buttonlabel = "Press to continue"
/ position = (50, 70)
/ size = (40%,10%)
/ range = (1,80)
/ increment = 1
/ showticks = false
/ labels = ("start","middle","end",)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</slidertrial>

<trial testTrialOldNew>
/ stimulustimes = [1000=testpic,testTrialOldNewInstr; ]
/ inputdevice = keyboard
/ validresponse=("o", "n")
/ branch=[if (trial.testTrialOldNew.responsetext == "n") trial.testNewTrial] // for new-response
/ branch=[if (trial.testTrialOldNew.responsetext == "o") trial.testSlider] // for 'old' response, show slider
</trial>



*************************************************
Creating blocks
*************************************************
<block encBlock>
/ preinstructions = (encInstrPage)
/ trials = [1-40 = noreplace(encTrial)]
/ bgstim = (encTaskReminder)
/ screencolor = (128, 128, 128)
/ errormessage = true(errormessage, 2500)
</block>

<block testBlock>
/ preinstructions = (testInstrPage)
/ trials = [1-56 = noreplace(testTrialOldNew)]
/ bgstim = (testTaskReminder)
/ screencolor = (128, 128, 128)
</block>

*************************************************
Creating an Experiment
*************************************************
<expt tmem>
/ preinstructions = (introPage, taskPage)
/ blocks = [1=encBlock; 2=testBlock]
/ postinstructions = (endPage)
</expt>

<survey tmemSurvey>
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 2%
/ showpagenumbers = false
</survey>



<defaults>
/ fontstyle = ("Arial", 20pt)
/ posttrialpause = 500
/ screencolor = (128, 128, 128)
</defaults>


Old-new paradigms have been discussed many times before, so I suggest you do a search.

The gist is this: Use <list>s.
- Have one list containing all 56 item numbers.
- /onexptbegin, divy up those 56 item numbers: Put 40 in an "old" list (those will be shown in the encoding block), put 16 in a "new" list (those will not be shown),
- For the test block, set up two trials "old" and "new". For the old trial, show the items contained in the old list again. For the new trial, show the items contained in the new list,
- Sample old and new trials in the manner you want, i.e. 4 chunks of 14 trials (10 old, 4 new, i.e. a ratio of 5:2).

Many thanks! I now managed, using your reply and the Inquisit Programmer's Manual. Beginning to like Inquisit more and more ;-)

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
Dave - 3/5/2024
I have a memory task with a study / Encoding block and a Test block. I have 56 picture stimuli, of which a random 40 must be presented during the Encoding block. During the Test block, all 56 are presented, so that during Test, 40 will be 'old' and 16 will be 'new'. That is indeed accomplished by the script below.
But now I want something better: I want exactly 10 old items and 4 new items (randomly interspersed) in every quartile of the Test block. Still, it is essential that these are randomly selected without replacement out of the whole set of 56 pictures, so different they are across participants.
The goal is to analyze results as a function of 'time' with 4 levels, and then have 10 old and 4 new items at each of the 4 levels of the factor 'time'.
I feel I need to set things up differently, but how?
Many thanks for help!

*************************************************
Creating Instruction pages
*************************************************

<page introPage>
^Welcome to the experiment.^
The experiment contains a Study and a Test phase.^
In each phase, you will be shown a series of pictures.^
^
During the Study phase, determine whether a pictured object is SMALLER than a soccerball or LARGER.^
Also, remember which pictures you have seen, and when. You later need this in the Test phase.^
The study phase will take [] minutes in total.^
^
During the Test phase, we present many pictures from the Study phase again ('old pictures'),^
but also 'new pictures'. You need to indicate if a picture is 'old' or 'new'.^
If 'old', then you indicate the moment at which it was presented during the Study phase on a timeline.^
</page>

<page taskPage>
"More instructions to be given before blocks, here."
</page>

<page encInstrPage>
Study phase^
^
^
You will see a series of pictures, taking about [] minutes.^
Please indicate for every object whether it is smaller or larger than a soccerball.^
There is no need to respond very fast, just inspect each picture thoroughly.^
You have three seconds to answer.^
^
If smaller, press 'S' with your left index finger.^
If larger, press 'L' with your right index finger.^
^
Keep these fingers above the 'S' and 'L' keys on the keyboard.^
Remember both the pictures and their moment of presentation.^
</page>

<page testInstrPage>
Test phase^^^
You will see a series of pictures and use the keyboard and mouse.^
Some pictures are the same as in the Study phase ('old), others are 'new'.^
For each picture, recall if it is new or old.^
If new, then click that button.^
If old, then click on the time line to indicate when it was presented during the Study phase.^
</page>

<page endPage>
""End of experiment^^
Many thanks !!""
</page>

<instruct>
/ lastlabel = ("Press the spacebar to continue")
/ nextlabel = ("Press the spacebar to continue")
/ nextkey = (" ")
/ fontstyle = ("Arial", 20pt, false, false, false, false, 5)
</instruct>

<item encpics>
/1= "p101belt02a.jpg"
/2= "p102bench01.jpg"
/3= "p103birdhouse.jpg"
/4= "p104bottleofredwine01.jpg"
/5= "p105boxingglove02a.jpg"
/6= "p106bust.jpg"
/7= "p107button03.jpg"
/8= "p108camera01b.jpg"
/9= "p109candelabra.jpg"
/10= "p110candy.jpg"
/11= "p111cello.jpg"
/12= "p112cessna.jpg"
/13= "p113chain01.jpg"
/14= "p114chainsaw.jpg"
/15= "p115chair.jpg"
/16= "p116clock01a.jpg"
/17 = "p117clothespin01.jpg"
/18 = "p118comb01b (1).jpg"
/19 = "p119cookingpot.jpg"
/20 = "p120corkscrew03c.jpg"
/21 = "p121cornet.jpg"
/22 = "p122cracker02.jpg"
/23 = "p123dice02a.jpg"
/24 = "p124electricguitar01.jpg"
/25 = "p125electrictoothbrush01c.jpg"
/26 = "p126fan.jpg"
/27 = "p127fence02.jpg"
/28 = "p128ferry.jpg"
/29 = "p129fireextinguisher02.jpg"
/30 = "p130flashlight03a.jpg"
/31 = "p131fork04b.jpg"
/32 = "p132gardenshears01a.jpg"
/33 = "p133glasses01b.jpg"
/34 = "p134hairdryer01b.jpg"
/35 = "p135hanger04.jpg"
/36 = "p136hat05.jpg"
/37 = "p137highlighter03b.jpg"
/38 = "p138iron01a.jpg"
/39 = "p139key01.jpg"
/40 = "p140kite.jpg"
/41 = "p141lamp02a.jpg"
/42 = "p142lightbulb02a.jpg"
/43 = "p143lock02b.jpg"
/44 = "p144magnifyingglass01a.jpg"
/45 = "p145masquerademask02b.jpg"
/46 = "p146microphone01.jpg"
/47 = "p147feather01.jpg"
/48 = "p148pencilsharpener03a.jpg"
/49 = "p149pylon01.jpg"
/50 = "p150saltshaker02b.jpg"
/51 = "p151scissors02a.jpg"
/52 = "p152stapler01.jpg"
/53 = "p153thumbtack02b (1).jpg"
/54 = "p154tongs01a.jpg"
/55 = "p155handmixer01a.jpg"
/56 = "p156croissant02b.jpg"
</item>

<picture studypic>
/ items=encpics
/ position = (50%, 50%)
/ height = 20%
/ erase=false
</picture>

<picture testpic>
/ items=encpics
/ position = (50%, 40%)
/ height = 20%
</picture>

<text encTaskReminder>
/ items = ("Study phase~n~nPress:~nL: larger than football;~nS: smaller than football")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<text testTaskReminder>
/ items = ("Test phase")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<shape focuspoint>
/ shape= rectangle
/ color = (128, 128, 128)
/ size = (400, 400)
/ position = (50%, 50%)
/ erase = false
</shape>

<text errormessage>
/ items = ("Please respond s or l !!")
/ txcolor = white
/ txbgcolor = (transparent)
/ size=(600, 50)
/ fontstyle = ("Arial", 20pt)
/ position = (50%,70%)
</text>


*************************************************
Creating trials
*************************************************
Encoding trial
<trial encTrial>
/ stimulustimes = [100=studypic; 3500=focuspoint]
/ beginresponseframe = 1
/ inputdevice = keyboard
/ validresponse = ("s","l","S","L")
/ correctresponse = ("s","l","S","L")
/ beginresponsetime = 700
/ responseinterrupt = trial
/ trialduration = 4500
</trial>

Test trial: first asks about old vs. new, then slider or nothing, respectively
<text testNewText>
/ items = ("You answered: new picture")
/ txcolor = white
/ txbgcolor = (transparent)
/ fontstyle = ("Arial", 20pt)
</text>

<trial testNewTrial>
/ stimulustimes = [10=testNewText;]
/ trialduration = 3000 // duration should not be much shorter than the slider trial, else pps gain time by saying 'new'
</trial>

<text testTrialOldNewInstr>
/ items = ("Press o if seen before, and press n if new...")
/ position = (50%, 60%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</text>

<text testTrialSliderInstr>
/ items = ("in previous series, presented at ...?")
/ position = (50%, 60%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</text>

<slidertrial testSlider>
/ stimulustimes = [1000=testTrialSliderInstr; ]
/ buttonlabel = "Press to continue"
/ position = (50, 70)
/ size = (40%,10%)
/ range = (1,80)
/ increment = 1
/ showticks = false
/ labels = ("start","middle","end",)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</slidertrial>

<trial testTrialOldNew>
/ stimulustimes = [1000=testpic,testTrialOldNewInstr; ]
/ inputdevice = keyboard
/ validresponse=("o", "n")
/ branch=[if (trial.testTrialOldNew.responsetext == "n") trial.testNewTrial] // for new-response
/ branch=[if (trial.testTrialOldNew.responsetext == "o") trial.testSlider] // for 'old' response, show slider
</trial>



*************************************************
Creating blocks
*************************************************
<block encBlock>
/ preinstructions = (encInstrPage)
/ trials = [1-40 = noreplace(encTrial)]
/ bgstim = (encTaskReminder)
/ screencolor = (128, 128, 128)
/ errormessage = true(errormessage, 2500)
</block>

<block testBlock>
/ preinstructions = (testInstrPage)
/ trials = [1-56 = noreplace(testTrialOldNew)]
/ bgstim = (testTaskReminder)
/ screencolor = (128, 128, 128)
</block>

*************************************************
Creating an Experiment
*************************************************
<expt tmem>
/ preinstructions = (introPage, taskPage)
/ blocks = [1=encBlock; 2=testBlock]
/ postinstructions = (endPage)
</expt>

<survey tmemSurvey>
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 2%
/ showpagenumbers = false
</survey>



<defaults>
/ fontstyle = ("Arial", 20pt)
/ posttrialpause = 500
/ screencolor = (128, 128, 128)
</defaults>


Old-new paradigms have been discussed many times before, so I suggest you do a search.

The gist is this: Use <list>s.
- Have one list containing all 56 item numbers.
- /onexptbegin, divy up those 56 item numbers: Put 40 in an "old" list (those will be shown in the encoding block), put 16 in a "new" list (those will not be shown),
- For the test block, set up two trials "old" and "new". For the old trial, show the items contained in the old list again. For the new trial, show the items contained in the new list,
- Sample old and new trials in the manner you want, i.e. 4 chunks of 14 trials (10 old, 4 new, i.e. a ratio of 5:2).

Many thanks! I now managed, using your reply and the Inquisit Programmer's Manual. Beginning to like Inquisit more and more ;-)

So that others may benefit, here's an example implementation of what I outlined in my previous response. Please feel free to add yours as well.

*************************************************
Creating Instruction pages
*************************************************

<page introPage>
^Welcome to the experiment.^
The experiment contains a Study and a Test phase.^
In each phase, you will be shown a series of pictures.^
^
During the Study phase, determine whether a pictured object is SMALLER than a soccerball or LARGER.^
Also, remember which pictures you have seen, and when. You later need this in the Test phase.^
The study phase will take [] minutes in total.^
^
During the Test phase, we present many pictures from the Study phase again ('old pictures'),^
but also 'new pictures'. You need to indicate if a picture is 'old' or 'new'.^
If 'old', then you indicate the moment at which it was presented during the Study phase on a timeline.^
</page>

<page taskPage>
"More instructions to be given before blocks, here."
</page>

<page encInstrPage>
Study phase^
^
^
You will see a series of pictures, taking about [] minutes.^
Please indicate for every object whether it is smaller or larger than a soccerball.^
There is no need to respond very fast, just inspect each picture thoroughly.^
You have three seconds to answer.^
^
If smaller, press 'S' with your left index finger.^
If larger, press 'L' with your right index finger.^
^
Keep these fingers above the 'S' and 'L' keys on the keyboard.^
Remember both the pictures and their moment of presentation.^
</page>

<page testInstrPage>
Test phase^^^
You will see a series of pictures and use the keyboard and mouse.^
Some pictures are the same as in the Study phase ('old), others are 'new'.^
For each picture, recall if it is new or old.^
If new, then click that button.^
If old, then click on the time line to indicate when it was presented during the Study phase.^
</page>

<page endPage>
""End of experiment^^
Many thanks !!""
</page>

<instruct>
/ lastlabel = ("Press the spacebar to continue")
/ nextlabel = ("Press the spacebar to continue")
/ nextkey = (" ")
/ fontstyle = ("Arial", 20pt, false, false, false, false, 5)
</instruct>

<item encpics>
/1= "p101belt02a.jpg"
/2= "p102bench01.jpg"
/3= "p103birdhouse.jpg"
/4= "p104bottleofredwine01.jpg"
/5= "p105boxingglove02a.jpg"
/6= "p106bust.jpg"
/7= "p107button03.jpg"
/8= "p108camera01b.jpg"
/9= "p109candelabra.jpg"
/10= "p110candy.jpg"
/11= "p111cello.jpg"
/12= "p112cessna.jpg"
/13= "p113chain01.jpg"
/14= "p114chainsaw.jpg"
/15= "p115chair.jpg"
/16= "p116clock01a.jpg"
/17 = "p117clothespin01.jpg"
/18 = "p118comb01b (1).jpg"
/19 = "p119cookingpot.jpg"
/20 = "p120corkscrew03c.jpg"
/21 = "p121cornet.jpg"
/22 = "p122cracker02.jpg"
/23 = "p123dice02a.jpg"
/24 = "p124electricguitar01.jpg"
/25 = "p125electrictoothbrush01c.jpg"
/26 = "p126fan.jpg"
/27 = "p127fence02.jpg"
/28 = "p128ferry.jpg"
/29 = "p129fireextinguisher02.jpg"
/30 = "p130flashlight03a.jpg"
/31 = "p131fork04b.jpg"
/32 = "p132gardenshears01a.jpg"
/33 = "p133glasses01b.jpg"
/34 = "p134hairdryer01b.jpg"
/35 = "p135hanger04.jpg"
/36 = "p136hat05.jpg"
/37 = "p137highlighter03b.jpg"
/38 = "p138iron01a.jpg"
/39 = "p139key01.jpg"
/40 = "p140kite.jpg"
/41 = "p141lamp02a.jpg"
/42 = "p142lightbulb02a.jpg"
/43 = "p143lock02b.jpg"
/44 = "p144magnifyingglass01a.jpg"
/45 = "p145masquerademask02b.jpg"
/46 = "p146microphone01.jpg"
/47 = "p147feather01.jpg"
/48 = "p148pencilsharpener03a.jpg"
/49 = "p149pylon01.jpg"
/50 = "p150saltshaker02b.jpg"
/51 = "p151scissors02a.jpg"
/52 = "p152stapler01.jpg"
/53 = "p153thumbtack02b (1).jpg"
/54 = "p154tongs01a.jpg"
/55 = "p155handmixer01a.jpg"
/56 = "p156croissant02b.jpg"
</item>

<picture studypic>
/ items=encpics
/ position = (50%, 50%)
/ height = 20%
/ erase=false
/ select = values.itemnumber
</picture>

<picture testpic>
/ items=encpics
/ position = (50%, 40%)
/ height = 20%
/ select = values.itemnumber
</picture>

<text encTaskReminder>
/ items = ("Study phase~n~nPress:~nL: larger than football;~nS: smaller than football")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<text testTaskReminder>
/ items = ("Test phase")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<shape focuspoint>
/ shape= rectangle
/ color = (128, 128, 128)
/ size = (400, 400)
/ position = (50%, 50%)
/ erase = false
</shape>

<text errormessage>
/ items = ("Please respond s or l !!")
/ txcolor = white
/ txbgcolor = (transparent)
/ size=(600, 50)
/ fontstyle = ("Arial", 20pt)
/ position = (50%,70%)
</text>


*************************************************
Creating trials
*************************************************
Encoding trial
<trial encTrial>
/ ontrialbegin = [
    values.itemnumber = list.olditems.nextvalue; // select item designated as "old" for encoding
]

/ stimulustimes = [100=studypic; 3500=focuspoint]
/ beginresponseframe = 1
/ inputdevice = keyboard
/ validresponse = ("s","l","S","L")
/ correctresponse = ("s","l","S","L")
/ beginresponsetime = 700
/ responseinterrupt = trial
/ trialduration = 4500
</trial>

Test trial: first asks about old vs. new, then slider or nothing, respectively
<text testNewText>
/ items = ("You answered: new picture")
/ txcolor = white
/ txbgcolor = (transparent)
/ fontstyle = ("Arial", 20pt)
</text>

<trial testNewTrial>
/ stimulustimes = [10=testNewText;]
/ trialduration = 3000 // duration should not be much shorter than the slider trial, else pps gain time by saying 'new'
</trial>

<text testTrialOldNewInstr>
/ items = ("Press o if seen before, and press n if new...")
/ position = (50%, 60%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</text>

<text testTrialSliderInstr>
/ items = ("in previous series, presented at ...?")
/ position = (50%, 60%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</text>

<slidertrial testSlider>
/ stimulustimes = [1000=testTrialSliderInstr; ]
/ buttonlabel = "Press to continue"
/ position = (50, 70)
/ size = (40%,10%)
/ range = (1,80)
/ increment = 1
/ showticks = false
/ labels = ("start","middle","end",)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</slidertrial>

<trial testTrialOld>
/ ontrialbegin = [
    values.itemnumber = list.olditems.nextvalue; // select item designated as "old"
]
/ stimulustimes = [1000=testpic,testTrialOldNewInstr; ]
/ inputdevice = keyboard
/ validresponse=("o", "n")
/ correctresponse = ("o")
/ branch=[if (trial.testTrialOld.responsetext == "n") trial.testNewTrial] // for new-response
/ branch=[if (trial.testTrialOld.responsetext == "o") trial.testSlider] // for 'old' response, show slider
</trial>

<trial testTrialNew>
/ ontrialbegin = [
    values.itemnumber = list.newitems.nextvalue; // select item designated as "new"
]
/ stimulustimes = [1000=testpic,testTrialOldNewInstr; ]
/ inputdevice = keyboard
/ validresponse=("o", "n")
/ correctresponse = ("n")
/ branch=[if (trial.testTrialNew.responsetext == "n") trial.testNewTrial] // for new-response
/ branch=[if (trial.testTrialNew.responsetext == "o") trial.testSlider] // for 'old' response, show slider
</trial>


*************************************************
Creating blocks
*************************************************
<block encBlock>
/ preinstructions = (encInstrPage)
/ trials = [1-40 = noreplace(encTrial)]
/ bgstim = (encTaskReminder)
/ screencolor = (128, 128, 128)
/ errormessage = true(errormessage, 2500)
</block>

<block testBlock>
/ preinstructions = (testInstrPage)
/ trials = [
    // 4 chunks of 10 old trials and 4 new trials (5:2 ratio)
    1-14 = noreplace(testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialNew, testTrialNew);
    15-28 = noreplace(testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialNew, testTrialNew);
    29-42 = noreplace(testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialNew, testTrialNew);
    43-56 = noreplace(testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialNew, testTrialNew);
    ]
/ bgstim = (testTaskReminder)
/ screencolor = (128, 128, 128)
</block>

*************************************************
Creating an Experiment
*************************************************
<expt tmem>
/ onexptbegin = [
    // set up the old and new item number lists
    var i = 0;
    while (i < 40) {
        list.olditems.appenditem(list.allitems.nextindex); // 40 random item numbers go into the "old" list
        i += 1;
    };
    i = 0;
    while (i < 16) {
        list.newitems.appenditem(list.allitems.nextindex); // 16 random item numbers go into the "new" list
        i += 1;
    };
]
/ preinstructions = (introPage, taskPage)
/ blocks = [1=encBlock; 2=testBlock]
/ postinstructions = (endPage)
</expt>

<list allitems>
/ poolsize = 56 // we have 56 items total, item numbers 1 to 56
/ selectionrate = always
/ selectionmode = random
/ replace = false
</list>

// holds the "old" item numbers
<list olditems>
/ selectionmode = random
/ replace = false
</list>

// holds the "new" item numbers
<list newitems>
/ selectionmode = random
/ replace = false
</list>

<values>
/ itemnumber = 1 // holds the selected item number
</values>

<survey tmemSurvey>
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 2%
/ showpagenumbers = false
</survey>

<defaults>
/ fontstyle = ("Arial", 20pt)
/ posttrialpause = 500
/ screencolor = (128, 128, 128)
</defaults>

f.smulders@maastrichtunive...
f.smulders@maastrichtuniversity.nl
New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)
Group: Forum Members
Posts: 3, Visits: 17
Dave - 3/6/2024
Dave - 3/5/2024
I have a memory task with a study / Encoding block and a Test block. I have 56 picture stimuli, of which a random 40 must be presented during the Encoding block. During the Test block, all 56 are presented, so that during Test, 40 will be 'old' and 16 will be 'new'. That is indeed accomplished by the script below.
But now I want something better: I want exactly 10 old items and 4 new items (randomly interspersed) in every quartile of the Test block. Still, it is essential that these are randomly selected without replacement out of the whole set of 56 pictures, so different they are across participants.
The goal is to analyze results as a function of 'time' with 4 levels, and then have 10 old and 4 new items at each of the 4 levels of the factor 'time'.
I feel I need to set things up differently, but how?
Many thanks for help!

*************************************************
Creating Instruction pages
*************************************************

<page introPage>
^Welcome to the experiment.^
The experiment contains a Study and a Test phase.^
In each phase, you will be shown a series of pictures.^
^
During the Study phase, determine whether a pictured object is SMALLER than a soccerball or LARGER.^
Also, remember which pictures you have seen, and when. You later need this in the Test phase.^
The study phase will take [] minutes in total.^
^
During the Test phase, we present many pictures from the Study phase again ('old pictures'),^
but also 'new pictures'. You need to indicate if a picture is 'old' or 'new'.^
If 'old', then you indicate the moment at which it was presented during the Study phase on a timeline.^
</page>

<page taskPage>
"More instructions to be given before blocks, here."
</page>

<page encInstrPage>
Study phase^
^
^
You will see a series of pictures, taking about [] minutes.^
Please indicate for every object whether it is smaller or larger than a soccerball.^
There is no need to respond very fast, just inspect each picture thoroughly.^
You have three seconds to answer.^
^
If smaller, press 'S' with your left index finger.^
If larger, press 'L' with your right index finger.^
^
Keep these fingers above the 'S' and 'L' keys on the keyboard.^
Remember both the pictures and their moment of presentation.^
</page>

<page testInstrPage>
Test phase^^^
You will see a series of pictures and use the keyboard and mouse.^
Some pictures are the same as in the Study phase ('old), others are 'new'.^
For each picture, recall if it is new or old.^
If new, then click that button.^
If old, then click on the time line to indicate when it was presented during the Study phase.^
</page>

<page endPage>
""End of experiment^^
Many thanks !!""
</page>

<instruct>
/ lastlabel = ("Press the spacebar to continue")
/ nextlabel = ("Press the spacebar to continue")
/ nextkey = (" ")
/ fontstyle = ("Arial", 20pt, false, false, false, false, 5)
</instruct>

<item encpics>
/1= "p101belt02a.jpg"
/2= "p102bench01.jpg"
/3= "p103birdhouse.jpg"
/4= "p104bottleofredwine01.jpg"
/5= "p105boxingglove02a.jpg"
/6= "p106bust.jpg"
/7= "p107button03.jpg"
/8= "p108camera01b.jpg"
/9= "p109candelabra.jpg"
/10= "p110candy.jpg"
/11= "p111cello.jpg"
/12= "p112cessna.jpg"
/13= "p113chain01.jpg"
/14= "p114chainsaw.jpg"
/15= "p115chair.jpg"
/16= "p116clock01a.jpg"
/17 = "p117clothespin01.jpg"
/18 = "p118comb01b (1).jpg"
/19 = "p119cookingpot.jpg"
/20 = "p120corkscrew03c.jpg"
/21 = "p121cornet.jpg"
/22 = "p122cracker02.jpg"
/23 = "p123dice02a.jpg"
/24 = "p124electricguitar01.jpg"
/25 = "p125electrictoothbrush01c.jpg"
/26 = "p126fan.jpg"
/27 = "p127fence02.jpg"
/28 = "p128ferry.jpg"
/29 = "p129fireextinguisher02.jpg"
/30 = "p130flashlight03a.jpg"
/31 = "p131fork04b.jpg"
/32 = "p132gardenshears01a.jpg"
/33 = "p133glasses01b.jpg"
/34 = "p134hairdryer01b.jpg"
/35 = "p135hanger04.jpg"
/36 = "p136hat05.jpg"
/37 = "p137highlighter03b.jpg"
/38 = "p138iron01a.jpg"
/39 = "p139key01.jpg"
/40 = "p140kite.jpg"
/41 = "p141lamp02a.jpg"
/42 = "p142lightbulb02a.jpg"
/43 = "p143lock02b.jpg"
/44 = "p144magnifyingglass01a.jpg"
/45 = "p145masquerademask02b.jpg"
/46 = "p146microphone01.jpg"
/47 = "p147feather01.jpg"
/48 = "p148pencilsharpener03a.jpg"
/49 = "p149pylon01.jpg"
/50 = "p150saltshaker02b.jpg"
/51 = "p151scissors02a.jpg"
/52 = "p152stapler01.jpg"
/53 = "p153thumbtack02b (1).jpg"
/54 = "p154tongs01a.jpg"
/55 = "p155handmixer01a.jpg"
/56 = "p156croissant02b.jpg"
</item>

<picture studypic>
/ items=encpics
/ position = (50%, 50%)
/ height = 20%
/ erase=false
</picture>

<picture testpic>
/ items=encpics
/ position = (50%, 40%)
/ height = 20%
</picture>

<text encTaskReminder>
/ items = ("Study phase~n~nPress:~nL: larger than football;~nS: smaller than football")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<text testTaskReminder>
/ items = ("Test phase")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<shape focuspoint>
/ shape= rectangle
/ color = (128, 128, 128)
/ size = (400, 400)
/ position = (50%, 50%)
/ erase = false
</shape>

<text errormessage>
/ items = ("Please respond s or l !!")
/ txcolor = white
/ txbgcolor = (transparent)
/ size=(600, 50)
/ fontstyle = ("Arial", 20pt)
/ position = (50%,70%)
</text>


*************************************************
Creating trials
*************************************************
Encoding trial
<trial encTrial>
/ stimulustimes = [100=studypic; 3500=focuspoint]
/ beginresponseframe = 1
/ inputdevice = keyboard
/ validresponse = ("s","l","S","L")
/ correctresponse = ("s","l","S","L")
/ beginresponsetime = 700
/ responseinterrupt = trial
/ trialduration = 4500
</trial>

Test trial: first asks about old vs. new, then slider or nothing, respectively
<text testNewText>
/ items = ("You answered: new picture")
/ txcolor = white
/ txbgcolor = (transparent)
/ fontstyle = ("Arial", 20pt)
</text>

<trial testNewTrial>
/ stimulustimes = [10=testNewText;]
/ trialduration = 3000 // duration should not be much shorter than the slider trial, else pps gain time by saying 'new'
</trial>

<text testTrialOldNewInstr>
/ items = ("Press o if seen before, and press n if new...")
/ position = (50%, 60%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</text>

<text testTrialSliderInstr>
/ items = ("in previous series, presented at ...?")
/ position = (50%, 60%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</text>

<slidertrial testSlider>
/ stimulustimes = [1000=testTrialSliderInstr; ]
/ buttonlabel = "Press to continue"
/ position = (50, 70)
/ size = (40%,10%)
/ range = (1,80)
/ increment = 1
/ showticks = false
/ labels = ("start","middle","end",)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</slidertrial>

<trial testTrialOldNew>
/ stimulustimes = [1000=testpic,testTrialOldNewInstr; ]
/ inputdevice = keyboard
/ validresponse=("o", "n")
/ branch=[if (trial.testTrialOldNew.responsetext == "n") trial.testNewTrial] // for new-response
/ branch=[if (trial.testTrialOldNew.responsetext == "o") trial.testSlider] // for 'old' response, show slider
</trial>



*************************************************
Creating blocks
*************************************************
<block encBlock>
/ preinstructions = (encInstrPage)
/ trials = [1-40 = noreplace(encTrial)]
/ bgstim = (encTaskReminder)
/ screencolor = (128, 128, 128)
/ errormessage = true(errormessage, 2500)
</block>

<block testBlock>
/ preinstructions = (testInstrPage)
/ trials = [1-56 = noreplace(testTrialOldNew)]
/ bgstim = (testTaskReminder)
/ screencolor = (128, 128, 128)
</block>

*************************************************
Creating an Experiment
*************************************************
<expt tmem>
/ preinstructions = (introPage, taskPage)
/ blocks = [1=encBlock; 2=testBlock]
/ postinstructions = (endPage)
</expt>

<survey tmemSurvey>
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 2%
/ showpagenumbers = false
</survey>



<defaults>
/ fontstyle = ("Arial", 20pt)
/ posttrialpause = 500
/ screencolor = (128, 128, 128)
</defaults>


Old-new paradigms have been discussed many times before, so I suggest you do a search.

The gist is this: Use <list>s.
- Have one list containing all 56 item numbers.
- /onexptbegin, divy up those 56 item numbers: Put 40 in an "old" list (those will be shown in the encoding block), put 16 in a "new" list (those will not be shown),
- For the test block, set up two trials "old" and "new". For the old trial, show the items contained in the old list again. For the new trial, show the items contained in the new list,
- Sample old and new trials in the manner you want, i.e. 4 chunks of 14 trials (10 old, 4 new, i.e. a ratio of 5:2).

Many thanks! I now managed, using your reply and the Inquisit Programmer's Manual. Beginning to like Inquisit more and more ;-)

So that others may benefit, here's an example implementation of what I outlined in my previous response. Please feel free to add yours as well.

*************************************************
Creating Instruction pages
*************************************************

<page introPage>
^Welcome to the experiment.^
The experiment contains a Study and a Test phase.^
In each phase, you will be shown a series of pictures.^
^
During the Study phase, determine whether a pictured object is SMALLER than a soccerball or LARGER.^
Also, remember which pictures you have seen, and when. You later need this in the Test phase.^
The study phase will take [] minutes in total.^
^
During the Test phase, we present many pictures from the Study phase again ('old pictures'),^
but also 'new pictures'. You need to indicate if a picture is 'old' or 'new'.^
If 'old', then you indicate the moment at which it was presented during the Study phase on a timeline.^
</page>

<page taskPage>
"More instructions to be given before blocks, here."
</page>

<page encInstrPage>
Study phase^
^
^
You will see a series of pictures, taking about [] minutes.^
Please indicate for every object whether it is smaller or larger than a soccerball.^
There is no need to respond very fast, just inspect each picture thoroughly.^
You have three seconds to answer.^
^
If smaller, press 'S' with your left index finger.^
If larger, press 'L' with your right index finger.^
^
Keep these fingers above the 'S' and 'L' keys on the keyboard.^
Remember both the pictures and their moment of presentation.^
</page>

<page testInstrPage>
Test phase^^^
You will see a series of pictures and use the keyboard and mouse.^
Some pictures are the same as in the Study phase ('old), others are 'new'.^
For each picture, recall if it is new or old.^
If new, then click that button.^
If old, then click on the time line to indicate when it was presented during the Study phase.^
</page>

<page endPage>
""End of experiment^^
Many thanks !!""
</page>

<instruct>
/ lastlabel = ("Press the spacebar to continue")
/ nextlabel = ("Press the spacebar to continue")
/ nextkey = (" ")
/ fontstyle = ("Arial", 20pt, false, false, false, false, 5)
</instruct>

<item encpics>
/1= "p101belt02a.jpg"
/2= "p102bench01.jpg"
/3= "p103birdhouse.jpg"
/4= "p104bottleofredwine01.jpg"
/5= "p105boxingglove02a.jpg"
/6= "p106bust.jpg"
/7= "p107button03.jpg"
/8= "p108camera01b.jpg"
/9= "p109candelabra.jpg"
/10= "p110candy.jpg"
/11= "p111cello.jpg"
/12= "p112cessna.jpg"
/13= "p113chain01.jpg"
/14= "p114chainsaw.jpg"
/15= "p115chair.jpg"
/16= "p116clock01a.jpg"
/17 = "p117clothespin01.jpg"
/18 = "p118comb01b (1).jpg"
/19 = "p119cookingpot.jpg"
/20 = "p120corkscrew03c.jpg"
/21 = "p121cornet.jpg"
/22 = "p122cracker02.jpg"
/23 = "p123dice02a.jpg"
/24 = "p124electricguitar01.jpg"
/25 = "p125electrictoothbrush01c.jpg"
/26 = "p126fan.jpg"
/27 = "p127fence02.jpg"
/28 = "p128ferry.jpg"
/29 = "p129fireextinguisher02.jpg"
/30 = "p130flashlight03a.jpg"
/31 = "p131fork04b.jpg"
/32 = "p132gardenshears01a.jpg"
/33 = "p133glasses01b.jpg"
/34 = "p134hairdryer01b.jpg"
/35 = "p135hanger04.jpg"
/36 = "p136hat05.jpg"
/37 = "p137highlighter03b.jpg"
/38 = "p138iron01a.jpg"
/39 = "p139key01.jpg"
/40 = "p140kite.jpg"
/41 = "p141lamp02a.jpg"
/42 = "p142lightbulb02a.jpg"
/43 = "p143lock02b.jpg"
/44 = "p144magnifyingglass01a.jpg"
/45 = "p145masquerademask02b.jpg"
/46 = "p146microphone01.jpg"
/47 = "p147feather01.jpg"
/48 = "p148pencilsharpener03a.jpg"
/49 = "p149pylon01.jpg"
/50 = "p150saltshaker02b.jpg"
/51 = "p151scissors02a.jpg"
/52 = "p152stapler01.jpg"
/53 = "p153thumbtack02b (1).jpg"
/54 = "p154tongs01a.jpg"
/55 = "p155handmixer01a.jpg"
/56 = "p156croissant02b.jpg"
</item>

<picture studypic>
/ items=encpics
/ position = (50%, 50%)
/ height = 20%
/ erase=false
/ select = values.itemnumber
</picture>

<picture testpic>
/ items=encpics
/ position = (50%, 40%)
/ height = 20%
/ select = values.itemnumber
</picture>

<text encTaskReminder>
/ items = ("Study phase~n~nPress:~nL: larger than football;~nS: smaller than football")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<text testTaskReminder>
/ items = ("Test phase")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<shape focuspoint>
/ shape= rectangle
/ color = (128, 128, 128)
/ size = (400, 400)
/ position = (50%, 50%)
/ erase = false
</shape>

<text errormessage>
/ items = ("Please respond s or l !!")
/ txcolor = white
/ txbgcolor = (transparent)
/ size=(600, 50)
/ fontstyle = ("Arial", 20pt)
/ position = (50%,70%)
</text>


*************************************************
Creating trials
*************************************************
Encoding trial
<trial encTrial>
/ ontrialbegin = [
    values.itemnumber = list.olditems.nextvalue; // select item designated as "old" for encoding
]

/ stimulustimes = [100=studypic; 3500=focuspoint]
/ beginresponseframe = 1
/ inputdevice = keyboard
/ validresponse = ("s","l","S","L")
/ correctresponse = ("s","l","S","L")
/ beginresponsetime = 700
/ responseinterrupt = trial
/ trialduration = 4500
</trial>

Test trial: first asks about old vs. new, then slider or nothing, respectively
<text testNewText>
/ items = ("You answered: new picture")
/ txcolor = white
/ txbgcolor = (transparent)
/ fontstyle = ("Arial", 20pt)
</text>

<trial testNewTrial>
/ stimulustimes = [10=testNewText;]
/ trialduration = 3000 // duration should not be much shorter than the slider trial, else pps gain time by saying 'new'
</trial>

<text testTrialOldNewInstr>
/ items = ("Press o if seen before, and press n if new...")
/ position = (50%, 60%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</text>

<text testTrialSliderInstr>
/ items = ("in previous series, presented at ...?")
/ position = (50%, 60%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</text>

<slidertrial testSlider>
/ stimulustimes = [1000=testTrialSliderInstr; ]
/ buttonlabel = "Press to continue"
/ position = (50, 70)
/ size = (40%,10%)
/ range = (1,80)
/ increment = 1
/ showticks = false
/ labels = ("start","middle","end",)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</slidertrial>

<trial testTrialOld>
/ ontrialbegin = [
    values.itemnumber = list.olditems.nextvalue; // select item designated as "old"
]
/ stimulustimes = [1000=testpic,testTrialOldNewInstr; ]
/ inputdevice = keyboard
/ validresponse=("o", "n")
/ correctresponse = ("o")
/ branch=[if (trial.testTrialOld.responsetext == "n") trial.testNewTrial] // for new-response
/ branch=[if (trial.testTrialOld.responsetext == "o") trial.testSlider] // for 'old' response, show slider
</trial>

<trial testTrialNew>
/ ontrialbegin = [
    values.itemnumber = list.newitems.nextvalue; // select item designated as "new"
]
/ stimulustimes = [1000=testpic,testTrialOldNewInstr; ]
/ inputdevice = keyboard
/ validresponse=("o", "n")
/ correctresponse = ("n")
/ branch=[if (trial.testTrialNew.responsetext == "n") trial.testNewTrial] // for new-response
/ branch=[if (trial.testTrialNew.responsetext == "o") trial.testSlider] // for 'old' response, show slider
</trial>


*************************************************
Creating blocks
*************************************************
<block encBlock>
/ preinstructions = (encInstrPage)
/ trials = [1-40 = noreplace(encTrial)]
/ bgstim = (encTaskReminder)
/ screencolor = (128, 128, 128)
/ errormessage = true(errormessage, 2500)
</block>

<block testBlock>
/ preinstructions = (testInstrPage)
/ trials = [
    // 4 chunks of 10 old trials and 4 new trials (5:2 ratio)
    1-14 = noreplace(testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialNew, testTrialNew);
    15-28 = noreplace(testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialNew, testTrialNew);
    29-42 = noreplace(testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialNew, testTrialNew);
    43-56 = noreplace(testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialNew, testTrialNew);
    ]
/ bgstim = (testTaskReminder)
/ screencolor = (128, 128, 128)
</block>

*************************************************
Creating an Experiment
*************************************************
<expt tmem>
/ onexptbegin = [
    // set up the old and new item number lists
    var i = 0;
    while (i < 40) {
        list.olditems.appenditem(list.allitems.nextindex); // 40 random item numbers go into the "old" list
        i += 1;
    };
    i = 0;
    while (i < 16) {
        list.newitems.appenditem(list.allitems.nextindex); // 16 random item numbers go into the "new" list
        i += 1;
    };
]
/ preinstructions = (introPage, taskPage)
/ blocks = [1=encBlock; 2=testBlock]
/ postinstructions = (endPage)
</expt>

<list allitems>
/ poolsize = 56 // we have 56 items total, item numbers 1 to 56
/ selectionrate = always
/ selectionmode = random
/ replace = false
</list>

// holds the "old" item numbers
<list olditems>
/ selectionmode = random
/ replace = false
</list>

// holds the "new" item numbers
<list newitems>
/ selectionmode = random
/ replace = false
</list>

<values>
/ itemnumber = 1 // holds the selected item number
</values>

<survey tmemSurvey>
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 2%
/ showpagenumbers = false
</survey>

<defaults>
/ fontstyle = ("Arial", 20pt)
/ posttrialpause = 500
/ screencolor = (128, 128, 128)
</defaults>

Dear Dave, many thanks! I had not expected that kind of great service.
I give my code below. Some things are very similar to your solution, others not. I hope that functionality will be equivalent.
Would appreciate it if you let me know there is a difference. Thanks!



<defaults>
/ canvasaspectratio = (4,3)
/ posttrialpause = 100
/ screencolor = (128, 128, 128)
/ windowsize = (100%, 100%)
/ fontstyle = ("Arial", 20pt)
</defaults>


*************************************************
Creating Instruction pages
*************************************************

<page introPage>
^
Welcome to the experiment.
^
^
To do the experiment, please take note of the following:^
- be sure that you have about 15 minutes time to devote solely to completing the experiment.^
- avoid all distractions (turn your phone to silent and put it away).^
- preferably be alone in a room.^
- have a computer with both mouse and keyboard.^
- study all instructions carefully, they will not be repeated, but you can sometimes go back with the backspace button.^
</page>

<page taskPage>
^
The experiment contains a Study and a Test phase.^
In each phase, you will be shown a series of pictures.^
^
During the Study phase, determine whether a pictured object is SMALLER than a soccerball or LARGER.^
Also, memorize which pictures you have seen, and when. You later need this in the Test phase.^
The Study phase will take 3 minutes in total.^
^
During the Test phase, we present pictures from the Study phase again ('old pictures'),^
but also pictures that were not presented before ('new pictures').^
You are then asked to indicate if a picture is 'old' or 'new'.^
If 'old', then you indicate the precise moment at which it was presented during the Study phase on a timeline.^
</page>

<page consentPage>
Declaration of Consent^
^
^
for participation in the research study:^
^
Classifying pictures: 'Larger or Smaller than a soccer ball'^
^
Maastricht University, Department of Psychology and Neuroscience, Ethical approval code: ERCPN- OZL_277_20_02_2024^
^
By pressing the spacebar, you indicate that:^
- you read the information about the study and the use of your data.^
- you have had the opportunity to ask questions.^
- you have been able to think about your participation.^
- you agree that the data as described in the information letter will be collected from you and used for the research.^
- you are 16 year or older and agree to participate in the study.^
^
If you decide not to participate and leave the online environment, then press Ctrl+q (control-q) to quit.^
</page>

<page encInstrPage>
Study Phase^
^
^
You will see a series of pictures, taking about 3 minutes.^
Please indicate for every object whether it is smaller or larger than a soccer ball.^
There is no need to respond very fast, just inspect each picture thoroughly and memorize it.^
You have three seconds to answer.^
^
If smaller, press 'S' with your left index finger.^
If larger, press 'L' with your right index finger.^
^
Keep these fingers above the 'S' and 'L' keys on the keyboard.^
^
Important:^
Memorize every picture and its moment of presentation.^
^
Get ready and press the space bar to begin immediately.
</page>

<page testInstrPage>
Test phase^
^
^
You will see a series of pictures and use both the keyboard and mouse.^
Some pictures have been presented before in the Study phase ('old), others are 'new'.^
For each picture, recall if it is old or new.^
If new, then press the 'n' key.^
If old, then press the 'o' key and after that, click on the time line to indicate^
the precise moment at which it was presented during the Study phase.^
</page>

<page endPage>
""End of experiment^^
Many thanks !!""
</page>

<instruct>
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ nextlabel = ("Press the spacebar to continue")
/ nextkey = (" ")
/ finishlabel = "press [space] to start"
/ navigationbuttonfontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</instruct>

<item encpics>
/1= "p101belt02a.jpg"
/2= "p102bench01.jpg"
/3= "p103birdhouse.jpg"
/4= "p104bottleofredwine01.jpg"
/5= "p105boxingglove02a.jpg"
/6= "p106bust.jpg"
/7= "p107button03.jpg"
/8= "p108camera01b.jpg"
/9= "p109candelabra.jpg"
/10= "p110candy.jpg"
/11= "p111cello.jpg"
/12= "p112cessna.jpg"
/13= "p113chain01.jpg"
/14= "p114chainsaw.jpg"
/15= "p115chair.jpg"
/16= "p116clock01a.jpg"
/17 = "p117clothespin01.jpg"
/18 = "p118comb01b (1).jpg"
/19 = "p119cookingpot.jpg"
/20 = "p120corkscrew03c.jpg"
/21 = "p121cornet.jpg"
/22 = "p122cracker02.jpg"
/23 = "p123dice02a.jpg"
/24 = "p124electricguitar01.jpg"
/25 = "p125electrictoothbrush01c.jpg"
/26 = "p126fan.jpg"
/27 = "p127fence02.jpg"
/28 = "p128ferry.jpg"
/29 = "p129fireextinguisher02.jpg"
/30 = "p130flashlight03a.jpg"
/31 = "p131fork04b.jpg"
/32 = "p132gardenshears01a.jpg"
/33 = "p133glasses01b.jpg"
/34 = "p134hairdryer01b.jpg"
/35 = "p135hanger04.jpg"
/36 = "p136hat05.jpg"
/37 = "p137highlighter03b.jpg"
/38 = "p138iron01a.jpg"
/39 = "p139key01.jpg"
/40 = "p140kite.jpg"
/41 = "p141lamp02a.jpg"
/42 = "p142lightbulb02a.jpg"
/43 = "p143lock02b.jpg"
/44 = "p144magnifyingglass01a.jpg"
/45 = "p145masquerademask02b.jpg"
/46 = "p146microphone01.jpg"
/47 = "p147feather01.jpg"
/48 = "p148pencilsharpener03a.jpg"
/49 = "p149pylon01.jpg"
/50 = "p150saltshaker02b.jpg"
/51 = "p151scissors02a.jpg"
/52 = "p152stapler01.jpg"
/53 = "p153thumbtack02b (1).jpg"
/54 = "p154tongs01a.jpg"
/55 = "p155handmixer01a.jpg"
/56 = "p156croissant02b.jpg"
</item>

<list allpics>
/items=(1-56)
/replace=false
/selectionmode=random
/selectionrate=always
</list>

<picture oldpic>
/ items=encpics
/ select=list.oldpics
/ position = (50%, 50%)
/ height = 20%
/ erase=false
</picture>

<picture newpic>
/ items=encpics
/ select=list.newpics
/ position = (50%, 50%)
/ height = 20%
/ erase=false
</picture>

<text encTaskReminder>
/ items = ("Study phase~n~nPress:~nL: larger than soccer ball;~nS: smaller than soccer ball")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<text testTaskReminder>
/ items = ("Test phase")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<shape focuspoint>
/ shape= rectangle
/ color = (128, 128, 128)
/ size = (null, 20%)
/ position = (50%, 50%)
/ erase = false
</shape>

<text encErrormessage>
/ items = ("Please respond s or l !!")
/ txcolor = white
/ txbgcolor = (transparent)
/ size=(600, 50)
/ position = (50%,70%)
</text>


*************************************************
Creating trials
*************************************************
Encoding trial
<trial encTrial>
/ stimulustimes = [100=oldpic; 3500=focuspoint]
/ beginresponseframe = 1
/ inputdevice = keyboard
/ validresponse = ("s","l","S","L")
/ correctresponse = ("s","l","S","L")
/ beginresponsetime = 700
/ responseinterrupt = trial
/ trialduration = 4500
</trial>

Test trial: first asks about old vs. new, then slider or nothing, respectively
<text newFBText>
/ items = ("You answered: new picture")
/ txcolor = white
/ txbgcolor = (transparent)
/ position = (50%,70%)
</text>

<trial newFBTrial>
/ stimulustimes = [10=newFBText;]
/ trialduration = 3000 // duration should not be much shorter than the slider trial, else pps gain time by saying 'new'
</trial>

<text testTrialOldNewInstr>
/ items = ("Press o if seen before, and press n if new...")
/ position = (50%, 70%)
/ txcolor = (255, 255, 255)
/ txbgcolor = (transparent)
</text>

<text testTrialSliderInstr>
/ items = ("in previous series, presented at ...?")
/ position = (50%, 60%)
/ txcolor = white
/ txbgcolor = (transparent)
/ position = (50%,70%)
</text>

<slidertrial testSlider>
/ stimulustimes = [1000=testTrialSliderInstr; ]
/ buttonlabel = "Press to continue"
/ position = (50, 80)
/ size = (40%,10%)
/ range = (1,80)
/ increment = 1
/ showticks = false
/ labels = ("start","middle","end",)
</slidertrial>
/ txbgcolor = (transparent)

<trial tOldT>
/ stimulustimes = [100=focuspoint; 1000=oldpic,testTrialOldNewInstr; ]
/ inputdevice = keyboard
/ validresponse=("o", "n")
/ correctresponse = ("o")
/ branch=[if (trial.tOldT.responsetext == "n") trial.NewFBTrial] // for new-response
/ branch=[if (trial.tOldT.responsetext == "o") trial.testSlider] // for 'old' response, show slider
</trial>

<trial tNewT>
/ stimulustimes = [100=focuspoint; 1000=newpic,testTrialOldNewInstr; ]
/ inputdevice = keyboard
/ validresponse=("o", "n")
/ correctresponse = ("n")
/ branch=[if (trial.tNewT.responsetext == "n") trial.newFBTrial] // for new-response
/ branch=[if (trial.tNewT.responsetext == "o") trial.testSlider] // for 'old' response, show slider
</trial>



*************************************************
Creating blocks
*************************************************
<block encBlock>
/ preinstructions = (encInstrPage)
/ trials = [1 - 40 = encTrial]
/ bgstim = (encTaskReminder)
/ screencolor = (128, 128, 128)
/ errormessage = true(encErrormessage, 2500)
</block>

<block testBlock>
/ preinstructions = (testInstrPage)
/ trials = [ 1 - 14 = noreplace(tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tNewT,tNewT,tNewT,tNewT);
    15 - 28 = noreplace(tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tNewT,tNewT,tNewT,tNewT);
            29 - 42 = noreplace(tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tNewT,tNewT,tNewT,tNewT);
            43 - 56 = noreplace(tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tNewT,tNewT,tNewT,tNewT)]
/ bgstim = (testTaskReminder)
/ screencolor = (128, 128, 128)
</block>

*************************************************
Creating an Experiment
*************************************************
<list oldpics>
</list>
<list newpics>
</list>

<expt tmem>
/ onexptbegin = [ //ivvy up randomized item numbers between 40 old and 16 new
var i=0;
while (i<40) {
    list.oldpics.appenditem(list.allpics.nextvalue);
    i+=1;
}
i=0;
while (i<16) {
    list.newpics.appenditem(list.allpics.nextvalue);
    i+=1;
}
]
/ preinstructions = (introPage, taskPage, consentPage)
/ blocks = [1=encBlock; 2=testBlock]
/ postinstructions = (endPage)
</expt>

<survey tmemSurvey>
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 2%
/ showpagenumbers = false
</survey>




Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
Dave - 3/6/2024
Dave - 3/5/2024
I have a memory task with a study / Encoding block and a Test block. I have 56 picture stimuli, of which a random 40 must be presented during the Encoding block. During the Test block, all 56 are presented, so that during Test, 40 will be 'old' and 16 will be 'new'. That is indeed accomplished by the script below.
But now I want something better: I want exactly 10 old items and 4 new items (randomly interspersed) in every quartile of the Test block. Still, it is essential that these are randomly selected without replacement out of the whole set of 56 pictures, so different they are across participants.
The goal is to analyze results as a function of 'time' with 4 levels, and then have 10 old and 4 new items at each of the 4 levels of the factor 'time'.
I feel I need to set things up differently, but how?
Many thanks for help!

*************************************************
Creating Instruction pages
*************************************************

<page introPage>
^Welcome to the experiment.^
The experiment contains a Study and a Test phase.^
In each phase, you will be shown a series of pictures.^
^
During the Study phase, determine whether a pictured object is SMALLER than a soccerball or LARGER.^
Also, remember which pictures you have seen, and when. You later need this in the Test phase.^
The study phase will take [] minutes in total.^
^
During the Test phase, we present many pictures from the Study phase again ('old pictures'),^
but also 'new pictures'. You need to indicate if a picture is 'old' or 'new'.^
If 'old', then you indicate the moment at which it was presented during the Study phase on a timeline.^
</page>

<page taskPage>
"More instructions to be given before blocks, here."
</page>

<page encInstrPage>
Study phase^
^
^
You will see a series of pictures, taking about [] minutes.^
Please indicate for every object whether it is smaller or larger than a soccerball.^
There is no need to respond very fast, just inspect each picture thoroughly.^
You have three seconds to answer.^
^
If smaller, press 'S' with your left index finger.^
If larger, press 'L' with your right index finger.^
^
Keep these fingers above the 'S' and 'L' keys on the keyboard.^
Remember both the pictures and their moment of presentation.^
</page>

<page testInstrPage>
Test phase^^^
You will see a series of pictures and use the keyboard and mouse.^
Some pictures are the same as in the Study phase ('old), others are 'new'.^
For each picture, recall if it is new or old.^
If new, then click that button.^
If old, then click on the time line to indicate when it was presented during the Study phase.^
</page>

<page endPage>
""End of experiment^^
Many thanks !!""
</page>

<instruct>
/ lastlabel = ("Press the spacebar to continue")
/ nextlabel = ("Press the spacebar to continue")
/ nextkey = (" ")
/ fontstyle = ("Arial", 20pt, false, false, false, false, 5)
</instruct>

<item encpics>
/1= "p101belt02a.jpg"
/2= "p102bench01.jpg"
/3= "p103birdhouse.jpg"
/4= "p104bottleofredwine01.jpg"
/5= "p105boxingglove02a.jpg"
/6= "p106bust.jpg"
/7= "p107button03.jpg"
/8= "p108camera01b.jpg"
/9= "p109candelabra.jpg"
/10= "p110candy.jpg"
/11= "p111cello.jpg"
/12= "p112cessna.jpg"
/13= "p113chain01.jpg"
/14= "p114chainsaw.jpg"
/15= "p115chair.jpg"
/16= "p116clock01a.jpg"
/17 = "p117clothespin01.jpg"
/18 = "p118comb01b (1).jpg"
/19 = "p119cookingpot.jpg"
/20 = "p120corkscrew03c.jpg"
/21 = "p121cornet.jpg"
/22 = "p122cracker02.jpg"
/23 = "p123dice02a.jpg"
/24 = "p124electricguitar01.jpg"
/25 = "p125electrictoothbrush01c.jpg"
/26 = "p126fan.jpg"
/27 = "p127fence02.jpg"
/28 = "p128ferry.jpg"
/29 = "p129fireextinguisher02.jpg"
/30 = "p130flashlight03a.jpg"
/31 = "p131fork04b.jpg"
/32 = "p132gardenshears01a.jpg"
/33 = "p133glasses01b.jpg"
/34 = "p134hairdryer01b.jpg"
/35 = "p135hanger04.jpg"
/36 = "p136hat05.jpg"
/37 = "p137highlighter03b.jpg"
/38 = "p138iron01a.jpg"
/39 = "p139key01.jpg"
/40 = "p140kite.jpg"
/41 = "p141lamp02a.jpg"
/42 = "p142lightbulb02a.jpg"
/43 = "p143lock02b.jpg"
/44 = "p144magnifyingglass01a.jpg"
/45 = "p145masquerademask02b.jpg"
/46 = "p146microphone01.jpg"
/47 = "p147feather01.jpg"
/48 = "p148pencilsharpener03a.jpg"
/49 = "p149pylon01.jpg"
/50 = "p150saltshaker02b.jpg"
/51 = "p151scissors02a.jpg"
/52 = "p152stapler01.jpg"
/53 = "p153thumbtack02b (1).jpg"
/54 = "p154tongs01a.jpg"
/55 = "p155handmixer01a.jpg"
/56 = "p156croissant02b.jpg"
</item>

<picture studypic>
/ items=encpics
/ position = (50%, 50%)
/ height = 20%
/ erase=false
</picture>

<picture testpic>
/ items=encpics
/ position = (50%, 40%)
/ height = 20%
</picture>

<text encTaskReminder>
/ items = ("Study phase~n~nPress:~nL: larger than football;~nS: smaller than football")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<text testTaskReminder>
/ items = ("Test phase")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<shape focuspoint>
/ shape= rectangle
/ color = (128, 128, 128)
/ size = (400, 400)
/ position = (50%, 50%)
/ erase = false
</shape>

<text errormessage>
/ items = ("Please respond s or l !!")
/ txcolor = white
/ txbgcolor = (transparent)
/ size=(600, 50)
/ fontstyle = ("Arial", 20pt)
/ position = (50%,70%)
</text>


*************************************************
Creating trials
*************************************************
Encoding trial
<trial encTrial>
/ stimulustimes = [100=studypic; 3500=focuspoint]
/ beginresponseframe = 1
/ inputdevice = keyboard
/ validresponse = ("s","l","S","L")
/ correctresponse = ("s","l","S","L")
/ beginresponsetime = 700
/ responseinterrupt = trial
/ trialduration = 4500
</trial>

Test trial: first asks about old vs. new, then slider or nothing, respectively
<text testNewText>
/ items = ("You answered: new picture")
/ txcolor = white
/ txbgcolor = (transparent)
/ fontstyle = ("Arial", 20pt)
</text>

<trial testNewTrial>
/ stimulustimes = [10=testNewText;]
/ trialduration = 3000 // duration should not be much shorter than the slider trial, else pps gain time by saying 'new'
</trial>

<text testTrialOldNewInstr>
/ items = ("Press o if seen before, and press n if new...")
/ position = (50%, 60%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</text>

<text testTrialSliderInstr>
/ items = ("in previous series, presented at ...?")
/ position = (50%, 60%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</text>

<slidertrial testSlider>
/ stimulustimes = [1000=testTrialSliderInstr; ]
/ buttonlabel = "Press to continue"
/ position = (50, 70)
/ size = (40%,10%)
/ range = (1,80)
/ increment = 1
/ showticks = false
/ labels = ("start","middle","end",)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</slidertrial>

<trial testTrialOldNew>
/ stimulustimes = [1000=testpic,testTrialOldNewInstr; ]
/ inputdevice = keyboard
/ validresponse=("o", "n")
/ branch=[if (trial.testTrialOldNew.responsetext == "n") trial.testNewTrial] // for new-response
/ branch=[if (trial.testTrialOldNew.responsetext == "o") trial.testSlider] // for 'old' response, show slider
</trial>



*************************************************
Creating blocks
*************************************************
<block encBlock>
/ preinstructions = (encInstrPage)
/ trials = [1-40 = noreplace(encTrial)]
/ bgstim = (encTaskReminder)
/ screencolor = (128, 128, 128)
/ errormessage = true(errormessage, 2500)
</block>

<block testBlock>
/ preinstructions = (testInstrPage)
/ trials = [1-56 = noreplace(testTrialOldNew)]
/ bgstim = (testTaskReminder)
/ screencolor = (128, 128, 128)
</block>

*************************************************
Creating an Experiment
*************************************************
<expt tmem>
/ preinstructions = (introPage, taskPage)
/ blocks = [1=encBlock; 2=testBlock]
/ postinstructions = (endPage)
</expt>

<survey tmemSurvey>
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 2%
/ showpagenumbers = false
</survey>



<defaults>
/ fontstyle = ("Arial", 20pt)
/ posttrialpause = 500
/ screencolor = (128, 128, 128)
</defaults>


Old-new paradigms have been discussed many times before, so I suggest you do a search.

The gist is this: Use <list>s.
- Have one list containing all 56 item numbers.
- /onexptbegin, divy up those 56 item numbers: Put 40 in an "old" list (those will be shown in the encoding block), put 16 in a "new" list (those will not be shown),
- For the test block, set up two trials "old" and "new". For the old trial, show the items contained in the old list again. For the new trial, show the items contained in the new list,
- Sample old and new trials in the manner you want, i.e. 4 chunks of 14 trials (10 old, 4 new, i.e. a ratio of 5:2).

Many thanks! I now managed, using your reply and the Inquisit Programmer's Manual. Beginning to like Inquisit more and more ;-)

So that others may benefit, here's an example implementation of what I outlined in my previous response. Please feel free to add yours as well.

*************************************************
Creating Instruction pages
*************************************************

<page introPage>
^Welcome to the experiment.^
The experiment contains a Study and a Test phase.^
In each phase, you will be shown a series of pictures.^
^
During the Study phase, determine whether a pictured object is SMALLER than a soccerball or LARGER.^
Also, remember which pictures you have seen, and when. You later need this in the Test phase.^
The study phase will take [] minutes in total.^
^
During the Test phase, we present many pictures from the Study phase again ('old pictures'),^
but also 'new pictures'. You need to indicate if a picture is 'old' or 'new'.^
If 'old', then you indicate the moment at which it was presented during the Study phase on a timeline.^
</page>

<page taskPage>
"More instructions to be given before blocks, here."
</page>

<page encInstrPage>
Study phase^
^
^
You will see a series of pictures, taking about [] minutes.^
Please indicate for every object whether it is smaller or larger than a soccerball.^
There is no need to respond very fast, just inspect each picture thoroughly.^
You have three seconds to answer.^
^
If smaller, press 'S' with your left index finger.^
If larger, press 'L' with your right index finger.^
^
Keep these fingers above the 'S' and 'L' keys on the keyboard.^
Remember both the pictures and their moment of presentation.^
</page>

<page testInstrPage>
Test phase^^^
You will see a series of pictures and use the keyboard and mouse.^
Some pictures are the same as in the Study phase ('old), others are 'new'.^
For each picture, recall if it is new or old.^
If new, then click that button.^
If old, then click on the time line to indicate when it was presented during the Study phase.^
</page>

<page endPage>
""End of experiment^^
Many thanks !!""
</page>

<instruct>
/ lastlabel = ("Press the spacebar to continue")
/ nextlabel = ("Press the spacebar to continue")
/ nextkey = (" ")
/ fontstyle = ("Arial", 20pt, false, false, false, false, 5)
</instruct>

<item encpics>
/1= "p101belt02a.jpg"
/2= "p102bench01.jpg"
/3= "p103birdhouse.jpg"
/4= "p104bottleofredwine01.jpg"
/5= "p105boxingglove02a.jpg"
/6= "p106bust.jpg"
/7= "p107button03.jpg"
/8= "p108camera01b.jpg"
/9= "p109candelabra.jpg"
/10= "p110candy.jpg"
/11= "p111cello.jpg"
/12= "p112cessna.jpg"
/13= "p113chain01.jpg"
/14= "p114chainsaw.jpg"
/15= "p115chair.jpg"
/16= "p116clock01a.jpg"
/17 = "p117clothespin01.jpg"
/18 = "p118comb01b (1).jpg"
/19 = "p119cookingpot.jpg"
/20 = "p120corkscrew03c.jpg"
/21 = "p121cornet.jpg"
/22 = "p122cracker02.jpg"
/23 = "p123dice02a.jpg"
/24 = "p124electricguitar01.jpg"
/25 = "p125electrictoothbrush01c.jpg"
/26 = "p126fan.jpg"
/27 = "p127fence02.jpg"
/28 = "p128ferry.jpg"
/29 = "p129fireextinguisher02.jpg"
/30 = "p130flashlight03a.jpg"
/31 = "p131fork04b.jpg"
/32 = "p132gardenshears01a.jpg"
/33 = "p133glasses01b.jpg"
/34 = "p134hairdryer01b.jpg"
/35 = "p135hanger04.jpg"
/36 = "p136hat05.jpg"
/37 = "p137highlighter03b.jpg"
/38 = "p138iron01a.jpg"
/39 = "p139key01.jpg"
/40 = "p140kite.jpg"
/41 = "p141lamp02a.jpg"
/42 = "p142lightbulb02a.jpg"
/43 = "p143lock02b.jpg"
/44 = "p144magnifyingglass01a.jpg"
/45 = "p145masquerademask02b.jpg"
/46 = "p146microphone01.jpg"
/47 = "p147feather01.jpg"
/48 = "p148pencilsharpener03a.jpg"
/49 = "p149pylon01.jpg"
/50 = "p150saltshaker02b.jpg"
/51 = "p151scissors02a.jpg"
/52 = "p152stapler01.jpg"
/53 = "p153thumbtack02b (1).jpg"
/54 = "p154tongs01a.jpg"
/55 = "p155handmixer01a.jpg"
/56 = "p156croissant02b.jpg"
</item>

<picture studypic>
/ items=encpics
/ position = (50%, 50%)
/ height = 20%
/ erase=false
/ select = values.itemnumber
</picture>

<picture testpic>
/ items=encpics
/ position = (50%, 40%)
/ height = 20%
/ select = values.itemnumber
</picture>

<text encTaskReminder>
/ items = ("Study phase~n~nPress:~nL: larger than football;~nS: smaller than football")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<text testTaskReminder>
/ items = ("Test phase")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<shape focuspoint>
/ shape= rectangle
/ color = (128, 128, 128)
/ size = (400, 400)
/ position = (50%, 50%)
/ erase = false
</shape>

<text errormessage>
/ items = ("Please respond s or l !!")
/ txcolor = white
/ txbgcolor = (transparent)
/ size=(600, 50)
/ fontstyle = ("Arial", 20pt)
/ position = (50%,70%)
</text>


*************************************************
Creating trials
*************************************************
Encoding trial
<trial encTrial>
/ ontrialbegin = [
    values.itemnumber = list.olditems.nextvalue; // select item designated as "old" for encoding
]

/ stimulustimes = [100=studypic; 3500=focuspoint]
/ beginresponseframe = 1
/ inputdevice = keyboard
/ validresponse = ("s","l","S","L")
/ correctresponse = ("s","l","S","L")
/ beginresponsetime = 700
/ responseinterrupt = trial
/ trialduration = 4500
</trial>

Test trial: first asks about old vs. new, then slider or nothing, respectively
<text testNewText>
/ items = ("You answered: new picture")
/ txcolor = white
/ txbgcolor = (transparent)
/ fontstyle = ("Arial", 20pt)
</text>

<trial testNewTrial>
/ stimulustimes = [10=testNewText;]
/ trialduration = 3000 // duration should not be much shorter than the slider trial, else pps gain time by saying 'new'
</trial>

<text testTrialOldNewInstr>
/ items = ("Press o if seen before, and press n if new...")
/ position = (50%, 60%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</text>

<text testTrialSliderInstr>
/ items = ("in previous series, presented at ...?")
/ position = (50%, 60%)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</text>

<slidertrial testSlider>
/ stimulustimes = [1000=testTrialSliderInstr; ]
/ buttonlabel = "Press to continue"
/ position = (50, 70)
/ size = (40%,10%)
/ range = (1,80)
/ increment = 1
/ showticks = false
/ labels = ("start","middle","end",)
/ fontstyle = ("Arial", 20pt)
/ txbgcolor = (transparent)
</slidertrial>

<trial testTrialOld>
/ ontrialbegin = [
    values.itemnumber = list.olditems.nextvalue; // select item designated as "old"
]
/ stimulustimes = [1000=testpic,testTrialOldNewInstr; ]
/ inputdevice = keyboard
/ validresponse=("o", "n")
/ correctresponse = ("o")
/ branch=[if (trial.testTrialOld.responsetext == "n") trial.testNewTrial] // for new-response
/ branch=[if (trial.testTrialOld.responsetext == "o") trial.testSlider] // for 'old' response, show slider
</trial>

<trial testTrialNew>
/ ontrialbegin = [
    values.itemnumber = list.newitems.nextvalue; // select item designated as "new"
]
/ stimulustimes = [1000=testpic,testTrialOldNewInstr; ]
/ inputdevice = keyboard
/ validresponse=("o", "n")
/ correctresponse = ("n")
/ branch=[if (trial.testTrialNew.responsetext == "n") trial.testNewTrial] // for new-response
/ branch=[if (trial.testTrialNew.responsetext == "o") trial.testSlider] // for 'old' response, show slider
</trial>


*************************************************
Creating blocks
*************************************************
<block encBlock>
/ preinstructions = (encInstrPage)
/ trials = [1-40 = noreplace(encTrial)]
/ bgstim = (encTaskReminder)
/ screencolor = (128, 128, 128)
/ errormessage = true(errormessage, 2500)
</block>

<block testBlock>
/ preinstructions = (testInstrPage)
/ trials = [
    // 4 chunks of 10 old trials and 4 new trials (5:2 ratio)
    1-14 = noreplace(testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialNew, testTrialNew);
    15-28 = noreplace(testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialNew, testTrialNew);
    29-42 = noreplace(testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialNew, testTrialNew);
    43-56 = noreplace(testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialOld, testTrialNew, testTrialNew);
    ]
/ bgstim = (testTaskReminder)
/ screencolor = (128, 128, 128)
</block>

*************************************************
Creating an Experiment
*************************************************
<expt tmem>
/ onexptbegin = [
    // set up the old and new item number lists
    var i = 0;
    while (i < 40) {
        list.olditems.appenditem(list.allitems.nextindex); // 40 random item numbers go into the "old" list
        i += 1;
    };
    i = 0;
    while (i < 16) {
        list.newitems.appenditem(list.allitems.nextindex); // 16 random item numbers go into the "new" list
        i += 1;
    };
]
/ preinstructions = (introPage, taskPage)
/ blocks = [1=encBlock; 2=testBlock]
/ postinstructions = (endPage)
</expt>

<list allitems>
/ poolsize = 56 // we have 56 items total, item numbers 1 to 56
/ selectionrate = always
/ selectionmode = random
/ replace = false
</list>

// holds the "old" item numbers
<list olditems>
/ selectionmode = random
/ replace = false
</list>

// holds the "new" item numbers
<list newitems>
/ selectionmode = random
/ replace = false
</list>

<values>
/ itemnumber = 1 // holds the selected item number
</values>

<survey tmemSurvey>
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 2%
/ showpagenumbers = false
</survey>

<defaults>
/ fontstyle = ("Arial", 20pt)
/ posttrialpause = 500
/ screencolor = (128, 128, 128)
</defaults>

Dear Dave, many thanks! I had not expected that kind of great service.
I give my code below. Some things are very similar to your solution, others not. I hope that functionality will be equivalent.
Would appreciate it if you let me know there is a difference. Thanks!



<defaults>
/ canvasaspectratio = (4,3)
/ posttrialpause = 100
/ screencolor = (128, 128, 128)
/ windowsize = (100%, 100%)
/ fontstyle = ("Arial", 20pt)
</defaults>


*************************************************
Creating Instruction pages
*************************************************

<page introPage>
^
Welcome to the experiment.
^
^
To do the experiment, please take note of the following:^
- be sure that you have about 15 minutes time to devote solely to completing the experiment.^
- avoid all distractions (turn your phone to silent and put it away).^
- preferably be alone in a room.^
- have a computer with both mouse and keyboard.^
- study all instructions carefully, they will not be repeated, but you can sometimes go back with the backspace button.^
</page>

<page taskPage>
^
The experiment contains a Study and a Test phase.^
In each phase, you will be shown a series of pictures.^
^
During the Study phase, determine whether a pictured object is SMALLER than a soccerball or LARGER.^
Also, memorize which pictures you have seen, and when. You later need this in the Test phase.^
The Study phase will take 3 minutes in total.^
^
During the Test phase, we present pictures from the Study phase again ('old pictures'),^
but also pictures that were not presented before ('new pictures').^
You are then asked to indicate if a picture is 'old' or 'new'.^
If 'old', then you indicate the precise moment at which it was presented during the Study phase on a timeline.^
</page>

<page consentPage>
Declaration of Consent^
^
^
for participation in the research study:^
^
Classifying pictures: 'Larger or Smaller than a soccer ball'^
^
Maastricht University, Department of Psychology and Neuroscience, Ethical approval code: ERCPN- OZL_277_20_02_2024^
^
By pressing the spacebar, you indicate that:^
- you read the information about the study and the use of your data.^
- you have had the opportunity to ask questions.^
- you have been able to think about your participation.^
- you agree that the data as described in the information letter will be collected from you and used for the research.^
- you are 16 year or older and agree to participate in the study.^
^
If you decide not to participate and leave the online environment, then press Ctrl+q (control-q) to quit.^
</page>

<page encInstrPage>
Study Phase^
^
^
You will see a series of pictures, taking about 3 minutes.^
Please indicate for every object whether it is smaller or larger than a soccer ball.^
There is no need to respond very fast, just inspect each picture thoroughly and memorize it.^
You have three seconds to answer.^
^
If smaller, press 'S' with your left index finger.^
If larger, press 'L' with your right index finger.^
^
Keep these fingers above the 'S' and 'L' keys on the keyboard.^
^
Important:^
Memorize every picture and its moment of presentation.^
^
Get ready and press the space bar to begin immediately.
</page>

<page testInstrPage>
Test phase^
^
^
You will see a series of pictures and use both the keyboard and mouse.^
Some pictures have been presented before in the Study phase ('old), others are 'new'.^
For each picture, recall if it is old or new.^
If new, then press the 'n' key.^
If old, then press the 'o' key and after that, click on the time line to indicate^
the precise moment at which it was presented during the Study phase.^
</page>

<page endPage>
""End of experiment^^
Many thanks !!""
</page>

<instruct>
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ nextlabel = ("Press the spacebar to continue")
/ nextkey = (" ")
/ finishlabel = "press [space] to start"
/ navigationbuttonfontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</instruct>

<item encpics>
/1= "p101belt02a.jpg"
/2= "p102bench01.jpg"
/3= "p103birdhouse.jpg"
/4= "p104bottleofredwine01.jpg"
/5= "p105boxingglove02a.jpg"
/6= "p106bust.jpg"
/7= "p107button03.jpg"
/8= "p108camera01b.jpg"
/9= "p109candelabra.jpg"
/10= "p110candy.jpg"
/11= "p111cello.jpg"
/12= "p112cessna.jpg"
/13= "p113chain01.jpg"
/14= "p114chainsaw.jpg"
/15= "p115chair.jpg"
/16= "p116clock01a.jpg"
/17 = "p117clothespin01.jpg"
/18 = "p118comb01b (1).jpg"
/19 = "p119cookingpot.jpg"
/20 = "p120corkscrew03c.jpg"
/21 = "p121cornet.jpg"
/22 = "p122cracker02.jpg"
/23 = "p123dice02a.jpg"
/24 = "p124electricguitar01.jpg"
/25 = "p125electrictoothbrush01c.jpg"
/26 = "p126fan.jpg"
/27 = "p127fence02.jpg"
/28 = "p128ferry.jpg"
/29 = "p129fireextinguisher02.jpg"
/30 = "p130flashlight03a.jpg"
/31 = "p131fork04b.jpg"
/32 = "p132gardenshears01a.jpg"
/33 = "p133glasses01b.jpg"
/34 = "p134hairdryer01b.jpg"
/35 = "p135hanger04.jpg"
/36 = "p136hat05.jpg"
/37 = "p137highlighter03b.jpg"
/38 = "p138iron01a.jpg"
/39 = "p139key01.jpg"
/40 = "p140kite.jpg"
/41 = "p141lamp02a.jpg"
/42 = "p142lightbulb02a.jpg"
/43 = "p143lock02b.jpg"
/44 = "p144magnifyingglass01a.jpg"
/45 = "p145masquerademask02b.jpg"
/46 = "p146microphone01.jpg"
/47 = "p147feather01.jpg"
/48 = "p148pencilsharpener03a.jpg"
/49 = "p149pylon01.jpg"
/50 = "p150saltshaker02b.jpg"
/51 = "p151scissors02a.jpg"
/52 = "p152stapler01.jpg"
/53 = "p153thumbtack02b (1).jpg"
/54 = "p154tongs01a.jpg"
/55 = "p155handmixer01a.jpg"
/56 = "p156croissant02b.jpg"
</item>

<list allpics>
/items=(1-56)
/replace=false
/selectionmode=random
/selectionrate=always
</list>

<picture oldpic>
/ items=encpics
/ select=list.oldpics
/ position = (50%, 50%)
/ height = 20%
/ erase=false
</picture>

<picture newpic>
/ items=encpics
/ select=list.newpics
/ position = (50%, 50%)
/ height = 20%
/ erase=false
</picture>

<text encTaskReminder>
/ items = ("Study phase~n~nPress:~nL: larger than soccer ball;~nS: smaller than soccer ball")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<text testTaskReminder>
/ items = ("Test phase")
/ position = (50%, 15%)
/ txcolor = (255, 255, 255)
/ txbgcolor = (transparent)
// size=(200, 50)
</text>

<shape focuspoint>
/ shape= rectangle
/ color = (128, 128, 128)
/ size = (null, 20%)
/ position = (50%, 50%)
/ erase = false
</shape>

<text encErrormessage>
/ items = ("Please respond s or l !!")
/ txcolor = white
/ txbgcolor = (transparent)
/ size=(600, 50)
/ position = (50%,70%)
</text>


*************************************************
Creating trials
*************************************************
Encoding trial
<trial encTrial>
/ stimulustimes = [100=oldpic; 3500=focuspoint]
/ beginresponseframe = 1
/ inputdevice = keyboard
/ validresponse = ("s","l","S","L")
/ correctresponse = ("s","l","S","L")
/ beginresponsetime = 700
/ responseinterrupt = trial
/ trialduration = 4500
</trial>

Test trial: first asks about old vs. new, then slider or nothing, respectively
<text newFBText>
/ items = ("You answered: new picture")
/ txcolor = white
/ txbgcolor = (transparent)
/ position = (50%,70%)
</text>

<trial newFBTrial>
/ stimulustimes = [10=newFBText;]
/ trialduration = 3000 // duration should not be much shorter than the slider trial, else pps gain time by saying 'new'
</trial>

<text testTrialOldNewInstr>
/ items = ("Press o if seen before, and press n if new...")
/ position = (50%, 70%)
/ txcolor = (255, 255, 255)
/ txbgcolor = (transparent)
</text>

<text testTrialSliderInstr>
/ items = ("in previous series, presented at ...?")
/ position = (50%, 60%)
/ txcolor = white
/ txbgcolor = (transparent)
/ position = (50%,70%)
</text>

<slidertrial testSlider>
/ stimulustimes = [1000=testTrialSliderInstr; ]
/ buttonlabel = "Press to continue"
/ position = (50, 80)
/ size = (40%,10%)
/ range = (1,80)
/ increment = 1
/ showticks = false
/ labels = ("start","middle","end",)
</slidertrial>
/ txbgcolor = (transparent)

<trial tOldT>
/ stimulustimes = [100=focuspoint; 1000=oldpic,testTrialOldNewInstr; ]
/ inputdevice = keyboard
/ validresponse=("o", "n")
/ correctresponse = ("o")
/ branch=[if (trial.tOldT.responsetext == "n") trial.NewFBTrial] // for new-response
/ branch=[if (trial.tOldT.responsetext == "o") trial.testSlider] // for 'old' response, show slider
</trial>

<trial tNewT>
/ stimulustimes = [100=focuspoint; 1000=newpic,testTrialOldNewInstr; ]
/ inputdevice = keyboard
/ validresponse=("o", "n")
/ correctresponse = ("n")
/ branch=[if (trial.tNewT.responsetext == "n") trial.newFBTrial] // for new-response
/ branch=[if (trial.tNewT.responsetext == "o") trial.testSlider] // for 'old' response, show slider
</trial>



*************************************************
Creating blocks
*************************************************
<block encBlock>
/ preinstructions = (encInstrPage)
/ trials = [1 - 40 = encTrial]
/ bgstim = (encTaskReminder)
/ screencolor = (128, 128, 128)
/ errormessage = true(encErrormessage, 2500)
</block>

<block testBlock>
/ preinstructions = (testInstrPage)
/ trials = [ 1 - 14 = noreplace(tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tNewT,tNewT,tNewT,tNewT);
    15 - 28 = noreplace(tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tNewT,tNewT,tNewT,tNewT);
            29 - 42 = noreplace(tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tNewT,tNewT,tNewT,tNewT);
            43 - 56 = noreplace(tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tOldT,tNewT,tNewT,tNewT,tNewT)]
/ bgstim = (testTaskReminder)
/ screencolor = (128, 128, 128)
</block>

*************************************************
Creating an Experiment
*************************************************
<list oldpics>
</list>
<list newpics>
</list>

<expt tmem>
/ onexptbegin = [ //ivvy up randomized item numbers between 40 old and 16 new
var i=0;
while (i<40) {
    list.oldpics.appenditem(list.allpics.nextvalue);
    i+=1;
}
i=0;
while (i<16) {
    list.newpics.appenditem(list.allpics.nextvalue);
    i+=1;
}
]
/ preinstructions = (introPage, taskPage, consentPage)
/ blocks = [1=encBlock; 2=testBlock]
/ postinstructions = (endPage)
</expt>

<survey tmemSurvey>
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 2%
/ showpagenumbers = false
</survey>




As far as I can see, functionality is the same. (Inquisit's programming language is reasonably capable and flexible, so almost always there are more ways than one to solve a given problem.)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search