equal distribution of trial types before and after a break

PennController for IBEX Forums Support equal distribution of trial types before and after a break

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #6292
    karmacoma
    Participant

    Hi Jeremy,

    In my experiment I have 30 congruent and 30 incongruent trials, and there is a break in the middle (i.e. after 30 trials). Is there a way to pseudorandomize the stimuli such that there are precisely 15 congruent and 15 incongruent trials presented before and after the break?

    Thanks a lot!

    #6300
    Jeremy
    Keymaster

    Hi,

    You can use the pick function, defined in this post:

    congruent = randomize("congruent");
    incongruent = randomize("incongruent");
    
    Sequence(
      rshuffle(pick(congruent,15),pick(incongruent,15))
      ,
      "break"
      ,
      rshuffle(pick(congruent,15),pick(incongruent,15))
    )

    Let me know if you have questions

    Jeremy

    #6305
    karmacoma
    Participant

    Thanks Jeremy, that works for me! However, the pattern of presentation is fixed (e.g. con-incon-con-incon-con-incon…) – do you know how to make the con/incongruent trials more randomly distributed?

    #6307
    Jeremy
    Keymaster

    Yes, replace rshuffle( ... , ... ) with randomize(seq( ... , ... ))

    Jeremy

    #6308
    karmacoma
    Participant

    Thank you, that works perfectly!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.