Item pool confusion
Hey everyone :)
I am new with openSesame and very thankful for this great openSource program and Chapeau! I am very impressed by the program.
I am trying to build an experiment and I am stuck with 2 concrete questions: The experiment itself is straight forward. People simply have to rate statements. Now I built a list with, lets say 300 statements within 3 categorieys (100 each). I divided these statments in 10 blocks. In the first block I would like to show 8 statements out of the category 1 + 8 statements out of category 2 and 8 statements out of category 3. This will change for the next block (12/8/4). Can I select a specific number of items out of a pool?
Additionally (2. question) I do not want a statement to be repeated. If its used. Its used. So in the second/3rd/4th blocks Items should not be repeated. Is it possible to somehow cross-out items if they have been seen once?
Does somebody know how to implement that or has something similiar to that ?
Thank you for you help, greetings Vanessa.
Comments
Hi @VJay ,
There are many ways in which you could implement this, but I guess what I would do is define the statements themselves in an
inline_scriptas randomized lists of strings at the very start of the experiment. Something like this:import random category1 = [ 'a statement', 'another statement', # etc. ] category2 = [ 'a statement', 'another statement', # etc. ] category3 = [ 'a statement', 'another statement', # etc. ] random.shuffle(category1) random.shuffle(category2) random.shuffle(category3)Then, in the block_loop you create a column "category", which indicates the category that you want to sample from. If you want to have a 12/ 8/ 4 ratio, this would simply be implemented by having 12 rows on which the column "category" has the value 1, 8 rows with 2 and 4 rows with 3.
Finally, at the start of each trial_sequence, you have another
inline_scriptthat takes one statement from the correct list and assigns it to an experiment variable. Like this:if var.category == 1: var.statement = category1.pop() elif var.category == 2: var.statement = category2.pop() elif var.category == 3: var.statement = category3.pop() else: raise ValueError('category should be 1, 2, or 3') # sanity checkDoes that make sense?
— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
I will try out :) thanks a lot
Dear Sebastiaan,
I tried your advices now in diffrent ways, but I am still stuck. somehow openSesame is not taking the statements which I defined at the very beginning of the experiment as you said. Is it possible to check somehow if the lists is working ? I also created in the block loop the category. Here I am not complety sure if I understood it right what you suggested. It looks like this (teil2) now in my openSesame profile.
category should be 1, 2, or 3Can somehelp out again ?
Kind regards, Vanessa
Hi Vanessa,
The error message comes from the fact that you have some empty rows in your
block_loopitem. You can remove them by selecting them (from row 7 to 12), right click, "remove 6 row(s.)"Note that in the above example, the categories are divided equally, that is, 33% each.
Cheers,
Lotje
Did you like my answer? Feel free to

Hi @VJay ,
To show the statement instead of the category number, you should change the sketchpad content accordingly. Write
[statement]instead of[category]Hope this helps!
Cheers,
Lotje
Did you like my answer? Feel free to

Dear Lotje,
Yessss.. there was the logical mistake. Now it works like clockwork!!
Thank you!!
Vanessa