Sequence with random start point


Author
Message
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: 13K, Visits: 104K
You should put the <likert>s in a separate <block>.

<values>
/ sequencenumber = 0
/ listposition = 1
/ correctcount = 0
/ trialcount = 0
/ highlight = 0
/ correctkey = 0
/ x1 = 1
/ x2 = 1
/ x3 = 1
/ x4 = 1
</values>

<expt>
/ blocks = [1-24 = sequence(circleblock, likertblock)]
</expt>

<block circleblock>
/ preinstructions = (start)
/ screencolor = black
/ stop = [values.correctcount==6]
/ onblockbegin = [values.sequencenumber = list.sequencetype.nextvalue; ]
/ onblockbegin = [values.correctcount=0; values.trialcount=0;
values.listposition = list.startposition.nextvalue-1; ]
/ trials = [1 = circletrial]
</block>

<block likertblock>
/ postinstructions = (end)
/ trials = [1= ratingquestionA; 2 = ratingquestionB]
</block>


//Likert
<likert ratingquestionA>
/ anchors = [1="NUEVA"; 2="VIEJA"]
/ stimulusframes = [1 = likertP1]
/ mouse=true
/ numpoints=2
/ position= (50, 80)
/ fontstyle = ("Arial", 16px)
</likert>

<likert ratingquestionB>
/ anchors = [1="MUY SEGURO"; 2="RELATIVAMENTE SEGURO"; 3="SUPONGO"]
/ stimulusframes = [1 = likertP2]
/ mouse=true
/ numpoints=3
/ position= (50, 80)
/ fontstyle = ("Arial", 16px)
</likert>

<text likertP1>
/size = (500, 70)
/items = likertP1
/position = (50, 50)
/halign = center
/select = sequence
</text>

<text likertP2>
/size = (500, 70)
/items = likertP2
/position = (50, 50)
/halign = center
/select = sequence
</text>

<item likertP1>
/1 = "Piensas que la secuencia que acabas de ver es..."
</item>

<item likertP2>
/1 = "¿Qué tan seguro estás de tu respuesta?"
</item>
//END LIKERT

<trial circletrial>
/ ontrialbegin = [shape.c1.color=white; shape.c2.color=white; shape.c3.color=white; shape.c4.color=white;
values.x1=1; values.x2=1; values.x3=1; values.x4=1; ]
/ ontrialbegin = [if (trial.circletrial.correct || values.trialcount<=0) {values.listposition+=1; values.listposition = mod(values.listposition-1,12)+1;
values.highlight=list.circlesequence.nextvalue; }
]
/ ontrialbegin = [if (values.highlight==1) {values.correctkey=47; shape.c1.color=red; values.x1=2; }
else if (values.highlight==2) {values.correctkey=48; shape.c2.color=red; values.x2=2; }
else if (values.highlight==3) {values.correctkey=49; shape.c3.color=red; values.x3=2; }
else if (values.highlight==4) {values.correctkey=50; shape.c4.color=red; values.x4=2;}
]
/ ontrialend = [values.trialcount+=1; values.correctcount+=trial.circletrial.correct; ]
/ stimulusframes = [1=c1, c2, c3, c4 x1, x2, x3, x4, debug]
/ validresponse = (47,48,49,50)
/ iscorrectresponse = [trial.circletrial.response==values.correctkey]
/ branch = [if(trial.circletrial.correct) trial.iti else trial.circletrial]
/ errormessage = (systembeep, 200)
</trial>

<trial iti>
/ stimulusframes = [1=blankscreen]
/ trialduration = 250
/ validresponse = (0)
/ recorddata = false
/ branch = [trial.circletrial]
</trial>

<shape blankscreen>
/ color = black
/ shape = rectangle
/ erase = false
/ size = (100%, 100%)
</shape>

<list startposition>
/ items = (1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12)
/ selectionmode = random
/ replace = false
</list>

<list sequencetype>
/ items = (1,2)
/ poolsize = 24
/ maxrunsize = 3
</list>

<list circlesequence>
/ items = (list.circlesequence_1.nextvalue, list.circlesequence_2.nextvalue)
/ selectionmode = values.sequencenumber
</list>

<list circlesequence_1>
/ items = (3,1,4,3,2,4,2,1,3,4,1,2)
/ selectionmode = values.listposition
</list>

<list circlesequence_2>
/ items = (4,3,1,2,4,1,3,2,1,4,2,3)
/ selectionmode = values.listposition
</list>

<shape c1>
/ shape = circle
/ size = (10%, 0.10*display.width)
/ position = (20%, 50%)
/ color = white
/ erase = false
</shape>

<shape c2>
/ shape = circle
/ size = (10%, 0.10*display.width)
/ position = (40%, 50%)
/ color = white
/ erase = false
</shape>

<shape c3>
/ shape = circle
/ size = (10%, 0.10*display.width)
/ position = (60%, 50%)
/ color = white
/ erase = false
</shape>

<shape c4>
/ shape = circle
/ size = (10%, 0.10*display.width)
/ position = (80%, 50%)
/ color = white
/ erase = false
</shape>

<text x1>
/ items = (" ", "X")
/ size = (10%, 0.10*display.width)
/ position = (20%, 50%)
/ select = values.x1
/ txcolor = white
/ txbgcolor = transparent
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

<text x2>
/ items = (" ", "X")
/ size = (10%, 0.10*display.width)
/ position = (40%, 50%)
/ select = values.x2
/ txcolor = white
/ txbgcolor = transparent
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

<text x3>
/ items = (" ", "X")
/ size = (10%, 0.10*display.width)
/ position = (60%, 50%)
/ select = values.x3
/ txcolor = white
/ txbgcolor = transparent
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

<text x4>
/ items = (" ", "X")
/ size = (10%, 0.10*display.width)
/ position = (80%, 50%)
/ select = values.x4
/ txcolor = white
/ txbgcolor = transparent
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

<text debug>
/ items = ("sequence #= <%values.sequencenumber%> | position=<%values.listposition%> | highlight=<%values.highlight%> | trialcount=<%values.trialcount%> | correctcount=<%values.correctcount%>")
/ position = (50%, 10%)
/ erase = false
/ txcolor = red
/ txbgcolor = black
/ size = (50%, 10%)
</text>

<page start>
^start of new block
</page>

<page end>
^end of block
^stats:
^mean latency: <%trial.circletrial.meanlatency%> ms
^error rate: <%(1-(values.correctcount/values.trialcount))*100%> %
</page>

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search