Millisecond Forums

counterbalanced video and audio stimuli pairs appearing equal amounts

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

By Nick00004 - 3/4/2015

Hi Inquisit team,
I'm not sure how best to title this topic (it's a mouthful already), or even summarize the issue effectively, but here it goes --

I have 3 types of videos (unpleasant, pleasant, and neutral), with 9 videos of each (for a total of 27 video stimuli in my script). In addition, I have 3 types of audio instructions (what I'm calling repeated, non-repeated, and passive viewing). Everything is running and saving beautifully, but I'm not having an equal number of video-audio stim pairings. What I mean is I need 3 (randomized) pairs of each possible combination: e.g., 3 unpleasant-repeated, 3 unpleasant-nonrepeated, 3 pleasant-neutral, etc. Instead, I'm getting, say, 6 unpleasant-neutral and 1 unpleasant-repeated, etc.

I've attached the script which I hope will help clarify my question.

Thanks so much -

Nick

By Dave - 3/4/2015

> Everything is running and saving beautifully, but I'm not having an equal number of video-audio stim pairings. [...]

There is no reason you should get equal pairings. Nowhere in your script do you define any such pairings.

All your video items (pleasant, unpleasant, neutral) are in a single element and are sampled randomly without replacement:

<video videoclip>
/ items = VideoClipList
/ select = clip.counter
/ size = (50%, 50%)
/ position = (50%, 50%)
</video>

<counter clip.counter>
/ select = noreplacenorepeat (1-27)
/ resetinterval = 0
</counter>

<item VideoClipList>
/ 1 = "basejump_pleasant.mp4"
/ 2 = "beach_pleasant.mp4"
/ 3 = "biking_pleasant.mp4"
/ 4 = "canyon_pleasant.mp4"
/ 5 = "field_pleasant.mp4"
/ 6 = "penguins_pleasant.mp4"
/ 7 = "puppy_pleasant.mp4"
/ 8 = "waterfall_pleasant.mp4"
/ 9 = "flysuit_pleasant.mp4"
/ 10 = "car_neutral.mp4"
/ 11 = "city_neutral.mp4"
/ 12 = "clothes_neutral.mp4"
/ 13 = "digging_neutral.mp4"
/ 14 = "home_neutral.mp4"
/ 15 = "photocopier_neutral.mp4"
/ 16 = "typing_neutral.mp4"
/ 17 = "windfarm_neutral.mp4"
/ 18 = "planes_neutral.mp4"
/ 19 = "Hiroshima_unpleasant.mp4"
/ 20 = "holocaust_unpleasant.mp4"
/ 21 = "pigs_unpleasant.mp4"
/ 22 = "pollutedriver_unpleasant.mp4"
/ 23 = "snakes_unpleasant.mp4"
/ 24 = "surgery_unpleasant.mp4"
/ 25 = "tumor_unpleasant.mp4"
/ 26 = "watermelon_unpleasant.mp4"
/ 27 = "dogpoop_unpleasant.mp4"
</item>


All your trial elements display that single video element:

<trial repeated.videos>
/ stimulustimes = [0 = videoclip; 10000= audioinstruction.repeated1; 30000 = audioinstruction.repeated2]
/ validresponse = (anyresponse)
/ timeout = 40000
/ posttrialpause = 1000
</trial>

<trial nonrepeated.videos>
/ stimulustimes = [0 = videoclip; 10000 = audioinstruction.nonrepeated1; 30000 = audioinstruction.nonrepeated2]
/ validresponse = (anyresponse)
/ timeout = 40000
/ posttrialpause = 1000
</trial>

<trial viewing.videos>
/ stimulustimes = [0 = videoclip, audioinstruction.viewing]
/ validresponse = (anyresponse)
/ timeout = 40000
/ posttrialpause = 1000
</trial>

Over the course of the experiment, each of the above trials will be run 9 times. However, there is no reason whatsoever why e.g. <trial viewing.videos> should sample exactly 3 unpleasant videos, 3 pleasant videos and 3 neutral videos across those 9 runs.

If you have a shuffled deck of 4 black cards and 4 red cards and then proceed to draw 4 cards with your left hand and 4 cards with your right, there is no reason why you should end up with exactly 2 black cards and 2 red cards in your left hand (same for your right hand). That's precisely the issue here.
By Dave - 3/4/2015

To fix the above, you need to add an additional layer of selection. I.e., make sure that each of the <trial>s mentioned above gets exactly 3 pleasant, 3 neutral and 3 unpleasant videos across its 9 runs. This can be accomplished using a bunch of <list> elements and some bits of conditional logic /ontrialbegin. See the attached file for details (look for "*** NEW STUFF ***").