Randomly present a subset of items

PennController for IBEX Forums Support Randomly present a subset of items

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10572
    hailinguist
    Participant

    Hi Jeremy,

    I’m implementing an experiment using the native IBEX, as in the following code.

    [["exp.caus.tran.1", 101], "Maze", {s:"What did the clown pop at the party?", a:"x-x-x sick gal tuned ben pre draw thank?"}],

    It’s a 2*2 design so it’ll presumably have four groups/lists. However, out of the 24 critical items, I only want to show 10 of them randomly to the participants. I wanna do the same for fillers. I have 90 of them want it to randomly select 30 each time. May I know how this can be implemented? Thank you!

    Best,
    Hailin Hao

    #10583
    Jeremy
    Keymaster

    Hi Hailin,

    You could use the custom pick function. Assuming all your critical items have labels that start with exp. and all your filler items have labels that start with fil. it would look something like this:

    var shuffleSequence = seq(
      shuffle(
        pick( randomize(startsWith("exp.")) , 10),
        pick( randomize(startsWith("fil.")) , 30)
      )
    )

    Jeremy

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