Random display of 1 image between items10-40 in a pool of 50


Author
Message
carmen0101
carmen0101
Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)
Group: Forum Members
Posts: 20, Visits: 95
I am struggling to make sure that the picture.practice_WM displayed at 1800 is randomly displaying between items 10 and 40 from my entire pool of 50. Right now it is randomly pulling out of the whole 50 and I can't work out why? I feel the issue might be in the line of code that I bold. Any advice is much appreciated!!!

<item practice_WM>
/1="practice_WM_01.jpg"
/2="practice_WM_02.jpg"
/3="practice_WM_03.jpg"
/4="practice_WM_04.jpg"
/5="practice_WM_05.jpg"
/6="practice_WM_06.jpg"
/7="practice_WM_07.jpg"
/8="practice_WM_08.jpg"
/9="practice_WM_09.jpg"
/10="practice_WM_10.jpg"
/11="practice_WM_11.jpg"
/12="practice_WM_12.jpg"
/13="practice_WM_13.jpg"
/14="practice_WM_14.jpg"
/15="practice_WM_15.jpg"
/16="practice_WM_16.jpg"
/17="practice_WM_17.jpg"
/18="practice_WM_18.jpg"
/19="practice_WM_19.jpg"
/20="practice_WM_20.jpg"
/21="practice_WM_21.jpg"
/22="practice_WM_22.jpg"
/23="practice_WM_23.jpg"
/24="practice_WM_24.jpg"
/25="practice_WM_25.jpg"
/26="practice_WM_26.jpg"
/27="practice_WM_27.jpg"
/28="practice_WM_28.jpg"
/29="practice_WM_29.jpg"
/30="practice_WM_30.jpg"
/31="practice_WM_31.jpg"
/32="practice_WM_32.jpg"
/33="practice_WM_33.jpg"
/34="practice_WM_34.jpg"
/35="practice_WM_35.jpg"
/36="practice_WM_36.jpg"
/37="practice_WM_37.jpg"
/38="practice_WM_38.jpg"
/39="practice_WM_39.jpg"
/40="practice_WM_40.jpg"
/41="practice_WM_41.jpg"
/42="practice_WM_42.jpg"
/43="practice_WM_43.jpg"
/44="practice_WM_44.jpg"
/45="practice_WM_45.jpg"
/46="practice_WM_46.jpg"
/47="practice_WM_47.jpg"
/48="practice_WM_48.jpg"
/49="practice_WM_49.jpg"
/50="practice_WM_50.jpg"
</item>

<values>
/drink = 0
/likert_response = 0
/slider_response = 0
/ success = false
/stimulusitems = ""
/actual_crowd_mean =0
/crowdgender =0
/rt = 0
</values>

<list 1selecteditems>
/ selectionrate = always
</list>

<list allitems>
/ items = (item.practice_WM)
/ poolsize = 50
/ selectionrate = always
</list>

<picture practice_WM>
/items = practice_WM
/select =list.1selecteditems
/size = (20%, 20%)
</picture>

<shape blank>
/ color = white
/ shape = rectangle
/ size = (100%, 100%)
/ erase = false
</shape>

<trial practice>
/stimulustimes = [0=noreplacenorepeat(picture.Neutraldrinks); 1700=blank; 1800=noreplacenorepeat(picture.practice_WM); 3600=picture.mask_practice_WM]
/timeout = 3900
/ ontrialend = [values.actual_crowd_mean=picture.practice_WM.currentitemnumber; values.drink=0; values.crowdgender=2; values.rt = likert.practiceangerlikert.latency]
/ recorddata = true
/ branch = [return likert.practiceangerlikert]
/ ontrialbegin = [picture.practice_WM.currentitemnumber;
  values.success = false;
  list.allitems.reset();
  list.1selecteditems.reset();
  list.1selecteditems.appenditem(list.allitems.nextindex);
    if (list.1selecteditems.currentvalue >= 10 && list.1selecteditems.currentvalue <= 40) {
   values.success = true;
  }]
</trial>

<likert practiceangerlikert>
/ numpoints = 51
/ position = (50, 35)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ stimulusframes = [1 =text.0_scale, text.50_scale, practiceWM1, practiceWM25, practiceWM50, question]
/ontrialend = [
    values.rt = likert.practiceangerlikert.latency;
    values.likert_response=likert.practiceangerlikert.response;
    expressions.amplification_effect]
/ recorddata = true
</likert>
Dave
Dave
Supreme Being (818K reputation)Supreme Being (818K reputation)Supreme Being (818K reputation)Supreme Being (818K reputation)Supreme Being (818K reputation)Supreme Being (818K reputation)Supreme Being (818K reputation)Supreme Being (818K reputation)Supreme Being (818K reputation)
Group: Administrators
Posts: 10K, Visits: 57K
There are numerous mistakes in your code and there's nothing in there at all that could or would prevent sampling from the whole range of 50 items.

I'm frankly struggling to understand what certain parts of the code are even supposed to do.

<list allitems>
/ items = (item.practice_WM)
/ poolsize = 50
/ selectionrate = always
</list>

This doesn't make sense, neither does this

<picture practice_WM>
/items = practice_WM
/select =list.1selecteditems
/size = (20%, 20%)
</picture>

nor does any of this

<trial practice>
/stimulustimes = [0=noreplacenorepeat(picture.Neutraldrinks); 1700=blank; 1800=noreplacenorepeat(picture.practice_WM); 3600=picture.mask_practice_WM]
/timeout = 3900
/ ontrialend = [values.actual_crowd_mean=picture.practice_WM.currentitemnumber; values.drink=0; values.crowdgender=2; values.rt = likert.practiceangerlikert.latency]
/ recorddata = true
/ branch = [return likert.practiceangerlikert]
/ ontrialbegin = [picture.practice_WM.currentitemnumber;
values.success = false;
list.allitems.reset();
list.1selecteditems.reset();
list.1selecteditems.appenditem(list.allitems.nextindex);
  if (list.1selecteditems.currentvalue >= 10 && list.1selecteditems.currentvalue <= 40) {
 values.success = true;

}]
</trial>

Anyway, if all you want is sampling from item numbers 10 to 40 (both inclusive), why don't you simply set up a list with item numbers 10 to 40 and sample from that list for the practice trials? I.e.

<list practiceitemnumbers>
/ items = (10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40)
/ replace = false
</list>

with

<picture practice_WM>
/items = practice_WM
/select =list.practiceitemnumbers.nextvalue
/size = (20%, 20%)
</picture>



Edited Last Month by Dave
carmen0101
carmen0101
Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)
Group: Forum Members
Posts: 20, Visits: 95
Your suggestion worked wonders! Thank you so much Dave :)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search