Random list selection


Author
Message
dproost
dproost
Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)
Group: Forum Members
Posts: 7, Visits: 62
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!

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: 12K, Visits: 98K
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.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search