Sampling without replacement
I'm programming an OSpan task and want to sample without replacement. My block loop has the variables: 'equation', 'letter', and 'correct_response'. My trial sequence consists of a sketchpad presenting the [equation] stimuli, and then another sketchpad afterwards presenting the [letter] stimuli. The trial sequence will be called however many letters long I want the letter string (that the participant is trying to memorize in between math equations) to be. However, when the trial sequence is recalled, there's the possibility of getting the same math equation or same letter in that one letter string "trial", which I don't want. How can I get it to be called randomly but without replacement?
Comments
Hi Morgan,
The structure of your experiment is not really clear to me. Could you upload it (you can attach it to a comment) so I can take a look?
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
How do I upload an .osexp file into the comments? I'm only seeing an external link for URL and image URL? Or did you want the general script of the experiment?
You can just upload it by selecting an osexp file instead of an image through the attachment dialog (which, I admit, is a bit confusing).
Check out SigmundAI.eu for our OpenSesame AI assistant!
I've checked on both a PC and Mac, and 3 different web browsers and I'm not able to get a file upload through the attachment dialog. They all strictly offer an Image URL attachment. Maybe it's a function that got lost in the US version of the website? I'm not sure!
Oops, it was a permission issue: Regular members weren't allowed to upload files. You should be able to upload the experiment now.
Check out SigmundAI.eu for our OpenSesame AI assistant!
I'm specifically looking for a way to have no replacement when I'm sampling from the tables (like the one I screenshot). I don't want any of the equations or letters to be repeated while doing one letter sequence. For example, the 2_Loop is a loop that creates a 2 letter sequence OSpan, where the participant is shown an equation, then a letter, then another equation, then another letter, and finally has to recall the 2 letters in the correct order. Within that 2 letter sequence, I don't want there to be a repeated equation or a repeated letter, but I can't figure out a way to do that.
Hi Morgan,
I don't think you can make your experiment with relying only on the
loop tables, at least not in an easy way. I recommend you select the trials to run from within aninline_script. This requires that you have your variables stored in some data container. As all three (equation, correct_response, and letter) belong together, it makes sense to store them in adictionary, e.g.trial_one = dict(equation='1+4 =5',cor_resp = 'left',letter='F'). However, if you could also just have three separate lists, and use the same indices to operate on them. This should also make sure that you don't mix them up. Here some code that selects two trials with the restrictions you mentioned.I hope this is useful.
Good luck,
Eduard