repeating a trial: loop


Author
Message
Helena_BLACKMORE
Helena_BLACKMORE
Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)
Group: Forum Members
Posts: 5, Visits: 54
Hello!

I am looking for help with creating a repeating trial with some changes depending on answer in a previous trial.
Ideally I wouldlike tocreate a loop, but couldn't find a simpleway to do it in Inquisit.

I have done the following:
<parameters>
/responsekey_beer = "b"
/responsekey_NA = "n"
</parameters>

<values>
/incentive= 50
/count= 0
/increment=0
</values>

<list increment>
/ items = (25, 12.50, 6.25, 3.10, 1.55, 0.75, 0.40, 0.20, 0.10, 0.05, 0.05, 0.01, 0.01, 0.01, 0.01)
/ selectionmode = sequence
</list>

<trial trial_e>
/ ontrialbegin = [values.increment=list.increment.nextindex]
/ stimulusframes = [1=beer,NA, taskinstruct1, taskinstruct2]
/ recorddata = true
/ validresponse = ("b", "n")
/ correctresponse = ("b")
/ ontrialend = [if (trial.trial_e.correct==TRUE ) values.incentive = values.incentive + values.increment]
/ ontrialend = [if (trial.trial_e.correct==FALSE) values.incentive = values.incentive - values.increment]
/ ontrialend = [values.count=values.count+1]
/ ontrialend = [if (values.count < 15) trial.trial_e]
</trial>


<block experiment>
/ trials = [1=trial_e]
/ postinstructions = (page.end)
</block>


However, this does not seem to work, the trial runs once only. I am not sure where am I going wrong. Any ideas? I would appreciate any help/tips.
Thank you!

Helena

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic

Explore
Messages
Mentions
Search