Millisecond Forums

random selection of different sequences of primes within one block

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

By juliane_d - 4/28/2014

Hi there,

I am programming an experiment in which two different sequences of trials are presented within one block in random order (and different frequencies).
Instead of this:
/trials = [1-16 = sequence(fixtrial1, primetrial); 17-24 = sequence(fixtrial2, detection)
which presents the first sequence of 2 trials 16 times and the second 8 times afterwards, I would like to actually do something like this:
/trials = [1-24 = random(sequence(fixtrial1, primetrial), sequence(fixtrial1, primetrial), sequence(fixtrial2, detection); which obviously does not work. Meaning that 2/3 of trial sequences within the block should be sequence(fixtrial1, primetrial); randomly interspersed by 1/3 of the sequence (fixtrial2, detection). Is there an easy way to do this?

As always, any help would be much appreciated!
thanks,

Juliane


By Dave - 4/28/2014

> Is there an easy way to do this?

Yes, several actually. The easiest in your case:

- /branch from <trial fixtrial1> to <trial primetrial>
-  /branch from <trial fixtrial2> to <trial detection>
- sample only the fixtrials (1,2) at the <block> level in the desired proportions

<trial fixtrial1>
[...]
/ branch = [trial.primetrial]
</trials>

<trial fixtrial2>
[...]
/ branch = [trial.detection]
</trials>

<block someblock>
/ trials = [1-24=noreplace(fixtrial1, fixtrial1, fixtrial2)]
[...]
</block>
By juliane_d - 4/28/2014

Hi Dave
Thanks for the quick and super helpful response. It works just fine!
Cheers,
Juliane