counterbalanced stimuli


Author
Message
James Charlie
James Charlie
Respected Member (315 reputation)Respected Member (315 reputation)Respected Member (315 reputation)Respected Member (315 reputation)Respected Member (315 reputation)Respected Member (315 reputation)Respected Member (315 reputation)Respected Member (315 reputation)Respected Member (315 reputation)
Group: Forum Members
Posts: 5, Visits: 9
Hi,

I am trying to create a script that shows participants one pair of images (stimuli image and reference image) and asked them to choose which one is bigger. I have 5 stimuli images and 1 reference image. I try to make it counterbalanced so participants will see equal amount of each stimuli image. Is there a way to counterbalanced this?

Here is my script:

<defaults >
/ screencolor = black
/ txcolor = white
/ txbgcolor = black
/ windowaspectratio = (4,3)
</defaults>


<values>
/completed = 0
/stiminterval = 0
/ aset = 1
/a1=0
/b1=0
</values>

<parameters>
/trialtimeout=10000
/instructiontime=2000
/breaktime=30000
</parameters>


=============================================================================
Instruction page
=============================================================================
<instruct instruction>
/ timeout = parameters.instructiontime
/ fontstyle = ("Arial", 4.5%, false, false, false, false, 5, 1)
/ screencolor = black
/ txcolor = white
/ windowsize = (100%, 100%)
</instruct>


<page instruction1>

              Welcome
^^In this task two pictures containing different portion size will appear on your screen.

^^Please answer the question 'Which one of the pictures has a larger portion ?' by pressing 'F' for the first one and 'J' for the second one.

^^You will have 50 comparison pairs and then a break of 30 seconds.

^^ You will perform a practice trial containing 6 comparison pairs before starting the real test.

^^   Press the space bar to start your practice session!

</page>

<page instruction2>

^^^^^         Get ready for another trial !

^^^^         Press the space bar to start

</page>


<item poolA>
/1="Chips1.jpg"
/2="Chips2.jpg"
/3="Chips3.jpg"
/4="Chips4.jpg"
/5="Chips5.jpg"
/6="Choco1.jpg"
/7="Choco2.jpg"
/8="Choco3.jpg"
/9="Choco4.jpg"
/10="Choco5.jpg"
/11="Yoghurt1.jpg"
/12="Yoghurt2.jpg"
/13="Yoghurt3.jpg"
/14="Yoghurt4.jpg"
/15="Yoghurt5.jpg"
</item>

<list chips_set1>
/ items = (1,2,3,4,5)
/ selectionrate = always
</list>

<list Chipsitemnumbers1>
/ items = (list.chips_set1.nextvalue)
/ selectionmode = values.aset
/ selectionrate = always
</list>

<list choco_set1>
/ items = (6,7,8,9,10)
/ selectionrate = always
</list>

<list Chocoitemnumbers1>
/ items = (list.choco_set1.nextvalue)
/ selectionmode = values.aset
/ selectionrate = always
</list>

<list Yoghurt_set1>
/ items = (11,12,13,14,15)
/ selectionrate = always
</list>

<list Yoghurtitemnumbers1>
/ items = (list.Yoghurt_set1.nextvalue)
/ selectionmode = values.aset
/ selectionrate = always
</list>

<picture a1>
/ items = poolA
/select=values.a1
/size= (50%,50%)
/position=(50%,50%)
</picture>

<item poolB>
/1="Chips6.jpg"
/2="Chips7.jpg"
/3="Chips8.jpg"
/4="Chips9.jpg"
/5="Chips10.jpg"
/6="Choco6.jpg"
/7="Choco7.jpg"
/8="Choco8.jpg"
/9="Choco9.jpg"
/10="Choco10.jpg"
/11="Yoghurt6.jpg"
/12="Yoghurt7.jpg"
/13="Yoghurt8.jpg"
/14="Yoghurt9.jpg"
/15="Yoghurt10.jpg"
</item>

<list Chips_set2>
/ items = (1,2,3,4,5)
/ selectionrate = always
</list>

<list Chipsitemnumbers2>
/ items = (list.Chips_set2.nextvalue)
/ selectionmode = values.aset
/ selectionrate = always
</list>

<list choco_set2>
/ items = (6,7,8,9,10)
/ selectionrate = always
</list>

<list Chocoitemnumbers2>
/ items = (list.choco_set2.nextvalue)
/ selectionmode = values.aset
/ selectionrate = always
</list>

<list Yoghurt_set2>
/ items = (11,12,13,14,15)
/ selectionrate = always
</list>

<list Yoghurtitemnumbers2>
/ items = (list.Yoghurt_set2.nextvalue)
/ selectionmode = values.aset
/ selectionrate = always
</list>

<picture b1>
/ items = poolb
/select=values.b1
/size= (50%,50%)
/position=(50%,50%)
</picture>

<list asetnumbers>
/ poolsize = 1
</list>

===========================================================================================
Reference image
============================================================================================

<picture Chipsreference>
/items=("Chips0.jpg")
/size= (50%,50%)
/position=(50%,50%)
</picture>

<picture Chocoreference>
/items=("Choco0.jpg")
/size= (50%,50%)
/position=(50%,50%)
</picture>

<picture Yoghurtreference>
/items=("Yoghurt0.jpg")
/size= (50%,50%)
/position=(50%,50%)
</picture>



<text questions>
/ items = ("Which one of the pictures has a larger portion?")
/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)
/ valign = top
/ halign = center
/ position = (50,20)

</text>

<Text ChoiceA>
/ items = ("Press F= First picture")
/ fontstyle = ("Arial", 4.44%, false, false, false, false, 5, 1)
/ valign = center
/ halign = center
/ position = (20,50)
</text>

<Text ChoiceB>
/ items = ("Press J= Second picture")
/ fontstyle = ("Arial", 4.44%, false, false, false, false, 5, 1)
/ valign = center
/ halign = center
/ position = (75,50)

</text>

========================================================================================================
Chips trial
========================================================================================================

<trial Chipsa1>
/ ontrialbegin = [
values.aset = list.asetnumbers.nextindex;
values.a1 = list.chipsitemnumbers1.nextvalue;]
/ stimulustimes = [0=a1;2000=clearscreen;2001=chipsreference;4000=clearscreen;4001=questions,choiceA,choiceB]
/ beginresponsetime = 4001
/ validresponse = ("F","J")
/ correctresponse = ("F")
</trial>

<trial Chipsa2>
/ ontrialbegin = [
values.aset = list.asetnumbers.nextindex;
values.a1 = list.chipsitemnumbers1.nextvalue;]
/ stimulustimes = [0=chipsreference;2000=clearscreen;2001=a1;4000=clearscreen;4001=questions,choiceA,choiceB]
/ beginresponsetime = 4001
/ validresponse = ("F","J")
/ correctresponse = ("F")
</trial>

<trial Chipsb1>
/ ontrialbegin = [
values.aset = list.asetnumbers.nextindex;
values.b1 = list.Chipsitemnumbers2.nextvalue;]
/ stimulustimes = [0=b1;2000=clearscreen;2001=chipsreference;4000=clearscreen;4001=questions,choiceA,choiceB]
/ beginresponsetime = 4001
/ validresponse = ("F","J")
/ correctresponse = ("J")
</trial>

<trial Chipsb2>
/ ontrialbegin = [
values.aset = list.asetnumbers.nextindex;
values.b1 = list.Chipsitemnumbers2.nextvalue;]
/ stimulustimes = [0=chipsreference;2000=clearscreen;2001=b1;4000=clearscreen;4001=questions,choiceA,choiceB]
/ beginresponsetime = 4001
/ validresponse = ("F","J")
/ correctresponse = ("J")
</trial>


========================================================================================================
Choco trial
========================================================================================================

<trial Chocoa1>
/ ontrialbegin = [
values.aset = list.asetnumbers.nextindex;
values.a1 = list.chocoitemnumbers1.nextvalue;]
/ stimulustimes = [0=a1;2000=clearscreen;2001=chocoreference;4000=clearscreen;4001=questions,choiceA,choiceB]
/ beginresponsetime = 4001
/ validresponse = ("F","J")
/ correctresponse = ("F")
</trial>

<trial Chocoa2>
/ ontrialbegin = [
values.aset = list.asetnumbers.nextindex;
values.a1 = list.chocoitemnumbers1.nextvalue;]
/ stimulustimes = [0=chocoreference;2000=clearscreen;2001=a1;4000=clearscreen;4001=questions,choiceA,choiceB]
/ beginresponsetime = 4001
/ validresponse = ("F","J")
/ correctresponse = ("F")
</trial>

<trial Chocob1>
/ ontrialbegin = [
values.aset = list.asetnumbers.nextindex;
values.b1 = list.Chocoitemnumbers2.nextvalue;]
/ stimulustimes = [0=b1;2000=clearscreen;2001=chocoreference;4000=clearscreen;4001=questions,choiceA,choiceB]
/ beginresponsetime = 4001
/ validresponse = ("F","J")
/ correctresponse = ("J")
</trial>

<trial Chocob2>
/ ontrialbegin = [
values.aset = list.asetnumbers.nextindex;
values.b1 = list.Chocoitemnumbers2.nextvalue;]
/ stimulustimes = [0=chocoreference;2000=clearscreen;2001=b1;4000=clearscreen;4001=questions,choiceA,choiceB]
/ beginresponsetime = 4001
/ validresponse = ("F","J")
/ correctresponse = ("J")
</trial>

========================================================================================================
Yoghurt trial
========================================================================================================

<trial Yoghurta1>
/ ontrialbegin = [
values.aset = list.asetnumbers.nextindex;
values.a1 = list.Yoghurtitemnumbers1.nextvalue;]
/ stimulustimes = [0=a1;2000=clearscreen;2001=Yoghurtreference;4000=clearscreen;4001=questions,choiceA,choiceB]
/ beginresponsetime = 4001
/ validresponse = ("F","J")
/ correctresponse = ("F")
</trial>

<trial Yoghurta2>
/ ontrialbegin = [
values.aset = list.asetnumbers.nextindex;
values.a1 = list.Yoghurtitemnumbers1.nextvalue;]
/ stimulustimes = [0=Yoghurtreference;2000=clearscreen;2001=a1;4000=clearscreen;4001=questions,choiceA,choiceB]
/ beginresponsetime = 4001
/ validresponse = ("F","J")
/ correctresponse = ("F")
</trial>

<trial Yoghurtb1>
/ ontrialbegin = [
values.aset = list.asetnumbers.nextindex;
values.b1 = list.Yoghurtitemnumbers2.nextvalue;]
/ stimulustimes = [0=b1;2000=clearscreen;2001=Yoghurtreference;4000=clearscreen;4001=questions,choiceA,choiceB]
/ beginresponsetime = 4001
/ validresponse = ("F","J")
/ correctresponse = ("J")
</trial>

<trial Yoghurtb2>
/ ontrialbegin = [
values.aset = list.asetnumbers.nextindex;
values.b1 = list.Yoghurtitemnumbers2.nextvalue;]
/ stimulustimes = [0=Yoghurtreference;2000=clearscreen;2001=b1;4000=clearscreen;4001=questions,choiceA,choiceB]
/ beginresponsetime = 4001
/ validresponse = ("F","J")
/ correctresponse = ("J")
</trial>

=================================================================================================================
Break
================================================================================================================

<clock timer>
/ format = "mm:ss"
/ mode = timer
/ erase = false
/ position = (50%, 50%)
/ resetrate = block
/ txbgcolor = black
/ txcolor = white
/ size = (100,100)
/ position = (50,60)
/ timeout = parameters.breaktime
</clock>

<text break>
/items=("Please have a break")
/ fontstyle = ("Arial", 6.67%, false, false, false, false, 5, 1)
</text>

<trial break>
/stimulusframes=[1=break, timer]
/timeout= parameters.breaktime
</trial>

===================================================================================================
Block
======================================================================================================

<block chipsblock>

/ trials = [1-50=noreplace(chipsa1,chipsa2,chipsb1,chipsb2);51=break]
/ preinstructions = (instruction2)
</block>

<block chocoblock>
/ trials = [1-50=noreplace(chocoa1,chocoa2,chocob1,chocob2);51=break]
/ preinstructions = (instruction2)
</block>

<block Yoghurtblock>
/ trials = [1-50=noreplace(Yoghurta1,Yoghurta2,Yoghurtb1,Yoghurtb2);51=break]
/ preinstructions = (instruction2)
</block>

<block practice>
/trials= [1-2=noreplace(chipsa1,chipsb2);3-4= noreplace(chocoa2,chocob2);5-6=noreplace(Yoghurta1,Yoghurtb2)]
/ preinstructions = (instruction1)
</block>


==================================================================================================
Experiment
=================================================================================================

<expt study>
/ blocks = [1=practice; 2-7=noreplace(Chipsblock,Chocoblock,Yoghurtblock)]
</expt>

==================================================================================================
Data
==================================================================================================

<data>
/columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum,
stimulus,stimulus,stimulus,response, correct, latency)
/ separatefiles = true
</data>


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
James Charlie - 6 Years Ago
Dave - 6 Years Ago
James Charlie - 6 Years Ago
Dave - 6 Years Ago
                     + x [quote] [b] Dave - Monday, April 1, 2019 [/b] +...
James Charlie - 6 Years Ago
                         + x [quote] [b] James Charlie - Monday, April 1, 2019 [/b]...
Dave - 6 Years Ago

Reading This Topic

Explore
Messages
Mentions
Search