Randomization of blocks and "Sub-Blocks".


Author
Message
DannyPilgrim
DannyPilgrim
Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)
Group: Forum Members
Posts: 26, Visits: 117
Hello everyone,

I hope you understand my question.
I have three separate blocks which contain three Sub-blocks each:

Block_a
- a1 = 96 Trials
- a2 = 96 Trials
- a3 = 96 Trials

Block_b
- b1 = 96 Trials
- b2 = 96 Trials
- b3 = 96 Trials

Block_c
- c1 = 96 Trials
- c2 = 96 Trials
- c3 = 96 Trials

I'd like to randomize the big blocks (Block_a, Block_b, Block_c) and those inside of them as well. The picture visualizes what I mean.

On which layer do I have to define this? On the <block> or <expt> layer?

Would it be something like that in the <block> layer:
<block Block_a>
/ preinstructions = (htmlpage.Übung2)
/ trials = noreplace=[1-96 =noreplace(...)]
/ trials = [1-96 =noreplace(...)]
/ trials = [1-96 =noreplace(...)]
</block>
(The trials themselves are randomized in each Sub-Block with =noreplace)

Or do I have to define all Sub-Blocks and arrange them within the <expt> layer?

I know how to randomize blocks in the <expt> but right now I cannot define it how I need it.

Best Regards,
Danny

DannyPilgrim
DannyPilgrim
Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)
Group: Forum Members
Posts: 26, Visits: 117

Dave
Dave
Supreme Being (929K reputation)Supreme Being (929K reputation)Supreme Being (929K reputation)Supreme Being (929K reputation)Supreme Being (929K reputation)Supreme Being (929K reputation)Supreme Being (929K reputation)Supreme Being (929K reputation)Supreme Being (929K reputation)
Group: Administrators
Posts: 11K, Visits: 68K
DannyPilgrim - 4/28/2021

You have to do something like this:

<values>
/ a_blockcount = 0
/ b_blockcount = 0
/ c_blockcount = 0
</values>

<expt>
/ blocks = [1-3 = noreplace(block.a, block.b, block.c)]
</expt>

<block a>
/ branch = [
    //select a random sub-block
    list.a_sub.nextvalue;
]
</block>

// three "sub-blocks"
<list a_sub>
/ items = (block.a1, block.a2, block.a3)
</list>

<block a1>
/ onblockbegin = [
    values.a_blockcount += 1;
]
/ trials = [1=mytrial]
/ branch = [
    // if we stil have further sub-blocks to run, select the next one at random
    if (values.a_blockcount < 3) {
        list.a_sub.nextvalue;
    }
]
</block>

<block a2>
/ onblockbegin = [
    values.a_blockcount += 1;
]
/ trials = [1=mytrial]
/ branch = [
    // if we stil have further sub-blocks to run, select the next one at random
    if (values.a_blockcount < 3) {
        list.a_sub.nextvalue;
    }
]
</block>

<block a3>
/ onblockbegin = [
    values.a_blockcount += 1;
]
/ trials = [1=mytrial]
/ branch = [
    // if we stil have further sub-blocks to run, select the next one at random
    if (values.a_blockcount < 3) {
        list.a_sub.nextvalue;
    }
]
</block>

<block b>
/ branch = [
    //select a random sub-block
    list.b_sub.nextvalue;
]
</block>

// three "sub-blocks"
<list b_sub>
/ items = (block.b1, block.b2, block.b3)
</list>

<block b1>
/ onblockbegin = [
    values.b_blockcount += 1;
]
/ trials = [1=mytrial]
/ branch = [
    // if we stil have further sub-blocks to run, select the next one at random
    if (values.b_blockcount < 3) {
        list.b_sub.nextvalue;
    }
]
</block>

<block b2>
/ onblockbegin = [
    values.b_blockcount += 1;
]
/ trials = [1=mytrial]
/ branch = [
    // if we stil have further sub-blocks to run, select the next one at random
    if (values.b_blockcount < 3) {
        list.b_sub.nextvalue;
    }
]
</block>

<block b3>
/ onblockbegin = [
    values.b_blockcount += 1;
]
/ trials = [1=mytrial]
/ branch = [
    // if we stil have further sub-blocks to run, select the next one at random
    if (values.b_blockcount < 3) {
        list.b_sub.nextvalue;
    }
]
</block>

<block c>
/ branch = [
    //select a random sub-block
    list.c_sub.nextvalue;
]
</block>

// three "sub-blocks"
<list c_sub>
/ items = (block.c1, block.c2, block.c3)
</list>

<block c1>
/ onblockbegin = [
    values.c_blockcount += 1;
]
/ trials = [1=mytrial]
/ branch = [
    // if we stil have further sub-blocks to run, select the next one at random
    if (values.c_blockcount < 3) {
        list.c_sub.nextvalue;
    }
]
</block>

<block c2>
/ onblockbegin = [
    values.c_blockcount += 1;
]
/ trials = [1=mytrial]
/ branch = [
    // if we stil have further sub-blocks to run, select the next one at random
    if (values.c_blockcount < 3) {
        list.c_sub.nextvalue;
    }
]
</block>

<block c3>
/ onblockbegin = [
    values.c_blockcount += 1;
]
/ trials = [1=mytrial]
/ branch = [
    // if we stil have further sub-blocks to run, select the next one at random
    if (values.c_blockcount < 3) {
        list.c_sub.nextvalue;
    }
]
</block>

<trial mytrial>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = ("This is block <%script.currentblock%>.")
</text>



DannyPilgrim
DannyPilgrim
Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)
Group: Forum Members
Posts: 26, Visits: 117
Dave - 4/28/2021
DannyPilgrim - 4/28/2021

You have to do something like this:

<values>
/ a_blockcount = 0
/ b_blockcount = 0
/ c_blockcount = 0
</values>

<expt>
/ blocks = [1-3 = noreplace(block.a, block.b, block.c)]
</expt>

<block a>
/ branch = [
    //select a random sub-block
    list.a_sub.nextvalue;
]
</block>

// three "sub-blocks"
<list a_sub>
/ items = (block.a1, block.a2, block.a3)
</list>

<block a1>
/ onblockbegin = [
    values.a_blockcount += 1;
]
/ trials = [1=mytrial]
/ branch = [
    // if we stil have further sub-blocks to run, select the next one at random
    if (values.a_blockcount < 3) {
        list.a_sub.nextvalue;
    }
]
</block>

<block a2>
/ onblockbegin = [
    values.a_blockcount += 1;
]
/ trials = [1=mytrial]
/ branch = [
    // if we stil have further sub-blocks to run, select the next one at random
    if (values.a_blockcount < 3) {
        list.a_sub.nextvalue;
    }
]
</block>

<block a3>
/ onblockbegin = [
    values.a_blockcount += 1;
]
/ trials = [1=mytrial]
/ branch = [
    // if we stil have further sub-blocks to run, select the next one at random
    if (values.a_blockcount < 3) {
        list.a_sub.nextvalue;
    }
]
</block>

<block b>
/ branch = [
    //select a random sub-block
    list.b_sub.nextvalue;
]
</block>

// three "sub-blocks"
<list b_sub>
/ items = (block.b1, block.b2, block.b3)
</list>

<block b1>
/ onblockbegin = [
    values.b_blockcount += 1;
]
/ trials = [1=mytrial]
/ branch = [
    // if we stil have further sub-blocks to run, select the next one at random
    if (values.b_blockcount < 3) {
        list.b_sub.nextvalue;
    }
]
</block>

<block b2>
/ onblockbegin = [
    values.b_blockcount += 1;
]
/ trials = [1=mytrial]
/ branch = [
    // if we stil have further sub-blocks to run, select the next one at random
    if (values.b_blockcount < 3) {
        list.b_sub.nextvalue;
    }
]
</block>

<block b3>
/ onblockbegin = [
    values.b_blockcount += 1;
]
/ trials = [1=mytrial]
/ branch = [
    // if we stil have further sub-blocks to run, select the next one at random
    if (values.b_blockcount < 3) {
        list.b_sub.nextvalue;
    }
]
</block>

<block c>
/ branch = [
    //select a random sub-block
    list.c_sub.nextvalue;
]
</block>

// three "sub-blocks"
<list c_sub>
/ items = (block.c1, block.c2, block.c3)
</list>

<block c1>
/ onblockbegin = [
    values.c_blockcount += 1;
]
/ trials = [1=mytrial]
/ branch = [
    // if we stil have further sub-blocks to run, select the next one at random
    if (values.c_blockcount < 3) {
        list.c_sub.nextvalue;
    }
]
</block>

<block c2>
/ onblockbegin = [
    values.c_blockcount += 1;
]
/ trials = [1=mytrial]
/ branch = [
    // if we stil have further sub-blocks to run, select the next one at random
    if (values.c_blockcount < 3) {
        list.c_sub.nextvalue;
    }
]
</block>

<block c3>
/ onblockbegin = [
    values.c_blockcount += 1;
]
/ trials = [1=mytrial]
/ branch = [
    // if we stil have further sub-blocks to run, select the next one at random
    if (values.c_blockcount < 3) {
        list.c_sub.nextvalue;
    }
]
</block>

<trial mytrial>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = ("This is block <%script.currentblock%>.")
</text>



Thank you very much, Dave!
That helps alot!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search