Randomly select some trials from two distinct groups
Hi there,
I am trying to set up a very simple experiment but I stuck in a practical issue. I am supposed to ask my participants to indicate whether a pair of words are opposites or not. I am planning to present two sets of pairs. The first set will refer to certain adjectives (e.g., competent - incompetent) and the other set will refer to emotions (e.g., happy - sad) and colors (e.g., black - white). There are a lot of pairs and I want to randomly show my participants, some but not all the pairs. Say, that I want to show them 10 pairs. But, I want seven out of these 10 pairs (i.e., 70%) to come from the first set and the remaining three (i.e., 30%) of the pairs to come from the second set. Although I tried to find a solution from the discussion forum or from the instructions in opensesame page (for example by using the command "slice" or through "weighing") I could not find a way how to address this issue. I would appreciate any assistance.
Best regards
PS. this is an exploratory study so there is not necessarily a "correct answer". I only want to see how people construe specific pairs of adjectives and I want to include pairs of emotions or colors as "manipulation checks". As can be seen below the example of my block loop is quite simple:
Comments
Hi @thanmour ,
Is it possible to upload your experiment here? And will you be running your study online or locally?
Cheers,
Lotje
Did you like my answer? Feel free to
Dear Lotje,
First, I am sorry for my delayed reaction. And second, I thank you a lot for your consideration. I have just prepared the experiment, which includes 212 pairs of adjectives or phrases. I am planning to ask from participants to randomly rate 10% of them (about 20 pairs) whether they are opposites or not (there is no right or wrong answer for that - I only want to assess how they construe meanings that they might be (or might not be) opposites. Among those 20 pairs, however, I want 10 (i.e., 50%) of them to be randomly chosen from a certain block of the list, 5 (i.e., 25%) of them to be randomly chosen from another block from the list, and the remaining ones (i.e., 25%) from a third block. To ease the "blocking", I added a column called "my_class". There, the first 150 entries (rows) are classified as "a", the next 35 entries as "b" and the remaining ones as "c". So, my question is how I can make the experiment proportionally select (randomly) 10 entries from "a", 5 from "b", and "5" from c.
About how to run the study, I am planning to run it online. (But still have a
problem setting up a follow-up survey)
Hi @thanmour ,
And I guess you want the pairs from the different classes to be mixed, right? Or can you first show 10 items from class "a", then 5 from class "b" and 5 from class "c"?
Regarding the survey, these links might be useful:
Cheers,
Lotje
Did you like my answer? Feel free to
Hi Lotje,
Indeed, I want them to be randomly presented in a mixed fashion (say, a, a, a, b, b, c, a, b, c, c, a, a, a, b, etc.)
About the links, thanks a lot. I was aware of the first two, but I think the one which makes a great difference and was really missing was the youtube video. It is amazingly clear !!! Thanks a lot for that and congrats on whoever has prepared it!
Hi @thanmour ,
I'll get back to you shortly.
Cheers,
Lotje
Did you like my answer? Feel free to
Hi @thanmour ,
It took me a while to figure this one out, but I think the following solution will work. It might not be the most elegant way, and requires some JavaScript, but I think otherwise your implementation is not possible with OSWeb.
Prepare
tab of aninline_javascript
item (instead of in the block_loop
) at the beginning of your experiment (see comments for some explanation):inline_script
item, this time to the beginning of the trial_sequence, and place something like the following in thePrepare
tab:The overview of your experiment should now look like this:
I uploaded an example script.
I hope this helps!
Cheers,
Lotje
Did you like my answer? Feel free to
Thanks a lot, Lotje!
I am almost there. But still, after the "practice loop", I get an error message. Is there something that I can do about it?
Also, should the var array_A include "correct_response1" or "correct_response2"? Is there any particular reason for including these two options (and not just keeping it as "correct_response")?
HI @thanmour ,
Sorry for the late reply! I didn't know which response ("p" or "q" belonged to which trial, which is why I used dummy names ("correct_response1" and "correct_response2"). But they indeed should be changed.
Could you upload the current version of your experiment that gives the above error message?
Cheers,
Lotje
Did you like my answer? Feel free to
Hi Lotje,
I am attaching the experiment as you prepared it. Everything goes perfectly in the first block but it stucks in the second block. I tried dozens of different solutions but at no avail.
Kind regards
Hi @thanmour ,
Oops, sorry about that. The lists had to be redefined at the beginning of the experimental phase (this time in the Run tab of an inline_javascript item. I attached the new version.
Could you check whether it works as desired now?
Cheers,
Lotje
Did you like my answer? Feel free to
Yes! Now it works perfectly! So, it needed a new inline_script in the end of Block A to redefine it. Now I've got it. Thanks, Lotje!!!