Search the Legacy Support Archive (up to v2020)
  1. Read-only archive (2005–2024). Posting is closed. Need help with MediaLab or DirectRT 2027? Email service@empirisoft.com.

    All words · “exact phrase” · -leave out

    Advanced search

randomizing within a fixed alternating pattern

  1. #1

    randomizing within a fixed alternating pattern

    hi,
    in my experiment i have 2 types of trials, A-trials and B-trials. both trial types should all be randomized within each other (i.e they are all treated as one group for wgr). BUT i also need to make sure that B type trials do not follow each other. if a B trial was presented, the next trial must be of type A. is it possible to implement this?
    thanks!

  2. #2
    jarvis24 Blair Jarvis, Administrator
    So it should always be ABABABABABA... etc? If so, just assign all the A's a WGR of 1 and all the B's a WGR of 2. Yes?

  3. #3
    the proportion is 4 A-type trials to 1 B-type trial. so it can be AAAAAAABABA etc.

  4. #4
    jarvis24 Blair Jarvis, Administrator
    I've been working on a nice simple notation system for creating constraints like that, but I haven't programmed it. Might be working by the next version. The only way I can think of to do this in v2006 would be to treat the BA's as BGR pairs and draw the stimuli randomly from stimlists as follows:
    BGR WGR STIM
    1 0 $A
    2 0 $A
    3 0 $A
    4 0 $A
    5 0 $A
    6 0 $A
    7 0 $B
    7 0 $A
    8 0 $B
    8 0 $A

  5. #5
    because i'm using compound screens, drawing the stimuli from a stimlist wouldn't work in my case.
    after some thinking & consulting, i implemented the following solution:

    since there are exactly 4 different A-type stimuli and only one B-type stimulus, i created 4 compound B trials: BA1, BA2, BA3, BA4. then i randomized these trials with the regular A trials:
    WGR stim
    1 A1
    1 A2
    1 A3
    1 A4
    1 BA1
    1 A1
    1 A2
    1 A3
    1 A4
    1 BA2

    and so on.
    so, i've ensured that after each B trial there would be an A trial, but the stimulus for the particular A trial is randomized.

    i hope this is clear.
    michal.

  6. #6
    jarvis24 Blair Jarvis, Administrator
    So you stuck two trials together into one? i.e., whenever you have a B trial, you automatically get an A trial because it's actually stuck onto the end of that B trial?

  7. #7
    that's exactly what i did. what do you think?

  8. #8
    jarvis24 Blair Jarvis, Administrator
    Clever! :)