random stimulus fixed by participant


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: 105K
charlottebooth - Friday, November 3, 2017
Hey,

I'm having trouble randomizing my stimulus set.

Imagine you have three levels of reward (e.g. +£1, +£2, +£3) which are given according to different stimuli (e.g. square, circle, triangle) but you want to randomize this by participant so that e.g. participant 1 always has £1 for a square, but this is different for each participant. How would you go about this? Is there a type of selection that would work, or is there much more code involved that creates specific lists for each participant at the beginning of the experiment?

<picture shapes>
/erase = false
/items = ("square.png", "circle.png", "triangle.png")
/position = (50, 50)
/select = ???
</picture>

<trial reward1>
/stimulustimes = [0 = pointstotal, shape]
/trialduration = 3000
/correctresponse = (lbuttondown)
/validresponse = (noresponse)
/validresponse = (lbuttondown)
/ontrialend = [if (trial.reward.correct) values.pointstotal +=1;]
</trial>

Link a <list> containing three values to the <picture> element.

<picture shapes>
/erase = false
/items = ("square.png", "circle.png", "triangle.png")
/position = (50, 50)
/select = noreplace
</picture>

<list rewards>
/ items = (values.squarereward, values.circlereward, values.trianglereward)
/ selectionmode = picture.shapes.currentindex
</list>

with

<values>
/ squarereward = 0
/ circlereward = 0
/ trianglereward = 0
</values>

Set the three values randomly to either 1, 2 or 3 /onexptbegin

<list rewardamounts>
/ items = (1,2,3)
/ selectionrate = always
</list>

<expt>
/ onexptbegin = [values.squarereward = list.rewardamounts.nextvalue; values.circlereward = list.rewardamounts.nextvalue; values.trianglereward = list.rewardamounts.nextvalue; ]
...
</expt>


Then, in your <trial> you simply do:

<trial reward1>
/stimulustimes = [0 = pointstotal, shape]
/trialduration = 3000
/correctresponse = (lbuttondown)
/validresponse = (noresponse)
/validresponse = (lbuttondown)
/ontrialend = [if (trial.reward.correct) values.pointstotal +=list.rewards.nextvalue;]
</trial>
charlottebooth
charlottebooth
Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)
Group: Forum Members
Posts: 45, Visits: 249
Hey,

I'm having trouble randomizing my stimulus set.

Imagine you have three levels of reward (e.g. +£1, +£2, +£3) which are given according to different stimuli (e.g. square, circle, triangle) but you want to randomize this by participant so that e.g. participant 1 always has £1 for a square, but this is different for each participant. How would you go about this? Is there a type of selection that would work, or is there much more code involved that creates specific lists for each participant at the beginning of the experiment?

<picture shapes>
/erase = false
/items = ("square.png", "circle.png", "triangle.png")
/position = (50, 50)
/select = ???
</picture>

<trial reward1>
/stimulustimes = [0 = pointstotal, shape]
/trialduration = 3000
/correctresponse = (lbuttondown)
/validresponse = (noresponse)
/validresponse = (lbuttondown)
/ontrialend = [if (trial.reward.correct) values.pointstotal +=1;]
</trial>

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search