Back
Login
Register
Login
Register
Millisecond Forums
Home
»
Millisecond Forums
»
Inquisit 4
»
Random selection without replacement
Random selection without replacement
Post Reply
Like
23
Random selection without replacement
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Diane
Diane
posted 11 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 53,
Visits: 131
Hi,
I have four picture elements that randomly select an item from an item element. However, I noticed that sometimes an item is selected more than once, even though I used the "noreplace" attribute. How can I randomly select without replacement?
This is the relevant part of the code:
<item recallcues>
</item>
<trial fillrecallcues>
/ontrialbegin = [item.recallcues.item=item.poweritems1.1;
item.recallcues.item=item.indexitems2.1;
item.recallcues.item=item.fingeritems3.1;
item.recallcues.item=item.parallelitems4.1]
/ trialduration = 0
</trial>
<picture recallcue1>
/items = recallcues
/select = noreplace
/size = (20%,20%)
/ position = (10,10)
</picture>
<picture recallcue2>
/items = recallcues
/select = noreplace
/size = (20%,20%)
/ position = (30,10)
</picture>
<picture recallcue3>
/items = recallcues
/select = noreplace
/size = (20%,20%)
/ position = (50,10)
</picture>
<picture recallcue4>
/items = recallcues
/select = noreplace
/size = (20%,20%)
/ position = (70,10)
</picture>
Thanks,
Diane
Reply
Like
23
Dave
Dave
posted 11 Years Ago
ANSWER
Post Details
Share Post
Group: Administrators
Posts: 13K,
Visits: 108K
See e.g.
https://www.millisecond.com/forums/FindPost13609.aspx.
What you need to realize is that having several stimulus elements (<text>, <picture>) reference the same <item> element
<picture recallcue1>
/items = recallcues
/select = noreplace
/size = (20%,20%)
/ position = (10,10)
</picture>
<picture recallcue2>
/items = recallcues
/select = noreplace
/size = (20%,20%)
/ position = (30,10)
</picture>
...
does *not* establish a single selection pool for all those stimulus elements. They are independent and each one will sample from *all* the items given in the <item> element without replacement. I.e.
<text text1>
/ items = myitems
/ select = noreplace
...
</text>
<text text2>
/ items = myitems
/ select = noreplace
...
</text>
<item myitems>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
/ 4 = "D"
</item>
is equivalent to stating
<text text1>
/ items = ("A", "B", "C", "D")
/ select = noreplace
...
</text>
<text text2>
/ items = ("A", "B", "C", "D")
/ select = noreplace
...
</text>
Reply
Like
17
Diane
Diane
posted 11 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 53,
Visits: 131
Hi Dave
Thanks. That link doesnt seem to work, but perhaps my question can be solved in a different way.
The reason I have made 4 recallcue picture elements is that I want four pictures at four different locations on the screen, and which picture goes where should be random. Is there a way to do that with one picture element?
Thanks
Diane
Reply
Like
18
Dave
Dave
posted 11 Years Ago
ANSWER
Post Details
Share Post
Group: Administrators
Posts: 13K,
Visits: 108K
Fixed link:
https://www.millisecond.com/forums/FindPost13609.aspx
And, yes, of course that's possible:
<trial mytrial>
/ stimulusframes = [1=t1,t2,t3,t4]
/ validresponse = (57)
</trial>
<text t1>
/ items = myitems
/ position = (20%, 50%)
/ select = list.mylist.nextvalue
</text>
<text t2>
/ items = myitems
/ position = (40%, 50%)
/ select = list.mylist.nextvalue
</text>
<text t3>
/ items = myitems
/ position = (60%, 50%)
/ select = list.mylist.nextvalue
</text>
<text t4>
/ items = myitems
/ position = (80%, 50%)
/ select = list.mylist.nextvalue
</text>
<item myitems>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
/ 4 = "D"
</item>
<list mylist>
/ items = (1,2,3,4)
/ selectionrate = always
</list>
(works the same for <picture> elements).
Reply
Like
17
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
23
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Facebook
Explore
Messages
Mentions
Search