Millisecond Forums

Random list selection

https://forums.millisecond.com/Topic32298.aspx

By dproost - 10/11/2021

Hi!

I'm completely new to Inquisit, trying to program a task in which participants have to study words lists. There are 16 word lists in total:  8 neutral lists, 4 negative-low arousal lists and 4 negative-high arousal lists. The goal is to randomly select 4 out of the 8 neutral lists, 2 out of the 4 negative-low arousal lists and 2 out of the 4 negative-low arousal lists to actually be presented to the participant. The remaining (non-studied) lists will not be presented, but will be used in a recognition phase at the end. Right now, I tried to randomly select the numbers:

<list listAssignmentneu>
/ items = (1-8)
/ selectionmode = random
/ selectionrate = always
/ replace = false
/ resetinterval = 0
</list>

<list listAssignmentlow>
/ items = (9-12)
/ selectionmode = random
/ selectionrate = always
/ replace = false
/ resetinterval = 0
</list>

<list listAssignmenthigh>
/ items = (13-16)
/ selectionmode = random
/ selectionrate = always
/ replace = false
/ resetinterval = 0
</list>

<list listAssignmentnew>
/ items = (1-16)
/ selectionmode = random
/ selectionrate = always
/ replace = false
/ resetinterval = 0
</list>

...

/ onexptbegin = [
    var i = 0;
    while (i < 4){
        list.neutralLists.appenditem(list.listAssignmentneu.nextvalue);
        i += 1;
    };
    
    i = 0;
    while (i < 2){
        list.lowLists.appenditem(list.listAssignmentlow.nextvalue);
        i += 1;
    };
    
    i = 0;
    while (i < 2){
        list.highLists.appenditem(list.listAssignmenthigh.nextvalue);
        i += 1;
    };
    
    i = 0;
    while (i < 8){
        list.newLists.appenditem(list.listAssignmentnew.nextvalue);
        i += 1;
    };
]

The only problem is that I can't seem to find a way to indeed select the new, non-overlapping lists. Is there any way to exclude the already selected lists from the pool? I tried to use the 'not'-property, to make if-loops to ensure a sequential selection etc. but nothing seems to work. Thank you in advance!
By Dave - 10/11/2021

dproost - 10/11/2021
Hi!

I'm completely new to Inquisit, trying to program a task in which participants have to study words lists. There are 16 word lists in total:  8 neutral lists, 4 negative-low arousal lists and 4 negative-high arousal lists. The goal is to randomly select 4 out of the 8 neutral lists, 2 out of the 4 negative-low arousal lists and 2 out of the 4 negative-low arousal lists to actually be presented to the participant. The remaining (non-studied) lists will not be presented, but will be used in a recognition phase at the end. Right now, I tried to randomly select the numbers:

<list listAssignmentneu>
/ items = (1-8)
/ selectionmode = random
/ selectionrate = always
/ replace = false
/ resetinterval = 0
</list>

<list listAssignmentlow>
/ items = (9-12)
/ selectionmode = random
/ selectionrate = always
/ replace = false
/ resetinterval = 0
</list>

<list listAssignmenthigh>
/ items = (13-16)
/ selectionmode = random
/ selectionrate = always
/ replace = false
/ resetinterval = 0
</list>

<list listAssignmentnew>
/ items = (1-16)
/ selectionmode = random
/ selectionrate = always
/ replace = false
/ resetinterval = 0
</list>

...

/ onexptbegin = [
    var i = 0;
    while (i < 4){
        list.neutralLists.appenditem(list.listAssignmentneu.nextvalue);
        i += 1;
    };
    
    i = 0;
    while (i < 2){
        list.lowLists.appenditem(list.listAssignmentlow.nextvalue);
        i += 1;
    };
    
    i = 0;
    while (i < 2){
        list.highLists.appenditem(list.listAssignmenthigh.nextvalue);
        i += 1;
    };
    
    i = 0;
    while (i < 8){
        list.newLists.appenditem(list.listAssignmentnew.nextvalue);
        i += 1;
    };
]

The only problem is that I can't seem to find a way to indeed select the new, non-overlapping lists. Is there any way to exclude the already selected lists from the pool? I tried to use the 'not'-property, to make if-loops to ensure a sequential selection etc. but nothing seems to work. Thank you in advance!

All your lists sample without replacement, so the already selected lists are already excluded. I.e. if you sample a 5th item from list.listAssignmentneu, it will be one of the four not already sampled.