Randomizing presentation of groups of blocks


Author
Message
mindwanderingjeremy
mindwanderingjeremy
Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)
Group: Forum Members
Posts: 18, Visits: 43
Hi again! 

I am having trouble with my n-back task code again. It is nearly complete but I am attempting to randomise the presentation of my survey pages which is proving difficult.
The way I have attempted to do this is I have created a <survey thoughtprobes> function which presents each of the survey pages in a random order. However, I need this survey page to be shown after every one of my experimental blocks. To do this I need to be able to randomly select groups of block1 + survey.thoughtprobes, block 2 + survey.thoughprobes, block3 + survey.thoughtprobes, etc in my <experiment> function. Is there an easy way to do this?

So far I have attempted to use a method I found on a 10 year old thread in this forum which uses lists to achieve this like so:
<list blockselector>
/items = (list.q0b1, list.q0b2, list.q0b3, list.m0b1, list.m0b2, list.m0b3, list.l0b1, list.l0b2, list.l0b3,
list.q1b1, list.q1b2, list.q1b3, list.m1b1, list.m1b2, list.m1b3, list.l1b1, list.l1b2, list.l1b3,)
/selectionmode = random
/replace = false
</list>
<list q0b1>
/items = (block.quick0back1, survey.thoughtprobe)
/selectionmode = sequence
</list>
*** multiple lists for each block type ***
<expt>
/ preinstructions = (intro)
/ postinstructions = (end)
/ blocks = [1-2 = list.blockselector; 3-4 = list.blockselector; 5-6 = list.blockselector; 7-8 = list.blockselector; 9-10 = list.blockselector;
11-12 = list.blockselector; 13-14 = list.blockselector; 15-16 = list.blockselector; 17-18 = list.blockselector; 19-20 = list.blockselector;
21-22 = list.blockselector; 23-24 = list.blockselector; 25-26 = list.blockselector; 27-28 = list.blockselector; 29-30 = list.blockselector;
31-32 = list.blockselector; 33-34 = list.blockselector; 35-36 = list.blockselector]
/onexptend = [values.completed = 1]
</expt>

However this does not work. Any ideas on how I can randomly present blocks with the survey at the end?
I have included my code and stimuli below if you would like to look at the whole thing.
Thank you!

Attachments
NBack1.iqx (244 views, 68.00 KB)
blueCircle.gif (255 views, 61.00 KB)
blueSquare.gif (245 views, 5.00 KB)
blueTriangle.gif (252 views, 6.00 KB)
Instructions1.png (283 views, 155.00 KB)
Instructions2.png (261 views, 184.00 KB)
redCircle.gif (265 views, 100.00 KB)
redSquare.gif (247 views, 3.00 KB)
redTriangle.gif (257 views, 77.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
mindwanderingjeremy - 2/11/2021
Hi again! 

I am having trouble with my n-back task code again. It is nearly complete but I am attempting to randomise the presentation of my survey pages which is proving difficult.
The way I have attempted to do this is I have created a <survey thoughtprobes> function which presents each of the survey pages in a random order. However, I need this survey page to be shown after every one of my experimental blocks. To do this I need to be able to randomly select groups of block1 + survey.thoughtprobes, block 2 + survey.thoughprobes, block3 + survey.thoughtprobes, etc in my <experiment> function. Is there an easy way to do this?

So far I have attempted to use a method I found on a 10 year old thread in this forum which uses lists to achieve this like so:
<list blockselector>
/items = (list.q0b1, list.q0b2, list.q0b3, list.m0b1, list.m0b2, list.m0b3, list.l0b1, list.l0b2, list.l0b3,
list.q1b1, list.q1b2, list.q1b3, list.m1b1, list.m1b2, list.m1b3, list.l1b1, list.l1b2, list.l1b3,)
/selectionmode = random
/replace = false
</list>
<list q0b1>
/items = (block.quick0back1, survey.thoughtprobe)
/selectionmode = sequence
</list>
*** multiple lists for each block type ***
<expt>
/ preinstructions = (intro)
/ postinstructions = (end)
/ blocks = [1-2 = list.blockselector; 3-4 = list.blockselector; 5-6 = list.blockselector; 7-8 = list.blockselector; 9-10 = list.blockselector;
11-12 = list.blockselector; 13-14 = list.blockselector; 15-16 = list.blockselector; 17-18 = list.blockselector; 19-20 = list.blockselector;
21-22 = list.blockselector; 23-24 = list.blockselector; 25-26 = list.blockselector; 27-28 = list.blockselector; 29-30 = list.blockselector;
31-32 = list.blockselector; 33-34 = list.blockselector; 35-36 = list.blockselector]
/onexptend = [values.completed = 1]
</expt>

However this does not work. Any ideas on how I can randomly present blocks with the survey at the end?
I have included my code and stimuli below if you would like to look at the whole thing.
Thank you!

Why don't you just /branch to the survey block from each of the nback blocks? That is:

Sample your nback blocks randomly at the <expt> level per

<expt>
...
/ blocks = [1-18 = noreplace(quick0back1, ...)]
...
</expt>

and in each nback block have

<block quick0back1>
...
/ branch = [survey.thoughtprobe]
</block>

mindwanderingjeremy
mindwanderingjeremy
Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)
Group: Forum Members
Posts: 18, Visits: 43
Dave - 2/11/2021
mindwanderingjeremy - 2/11/2021
Hi again! 

I am having trouble with my n-back task code again. It is nearly complete but I am attempting to randomise the presentation of my survey pages which is proving difficult.
The way I have attempted to do this is I have created a <survey thoughtprobes> function which presents each of the survey pages in a random order. However, I need this survey page to be shown after every one of my experimental blocks. To do this I need to be able to randomly select groups of block1 + survey.thoughtprobes, block 2 + survey.thoughprobes, block3 + survey.thoughtprobes, etc in my <experiment> function. Is there an easy way to do this?

So far I have attempted to use a method I found on a 10 year old thread in this forum which uses lists to achieve this like so:
<list blockselector>
/items = (list.q0b1, list.q0b2, list.q0b3, list.m0b1, list.m0b2, list.m0b3, list.l0b1, list.l0b2, list.l0b3,
list.q1b1, list.q1b2, list.q1b3, list.m1b1, list.m1b2, list.m1b3, list.l1b1, list.l1b2, list.l1b3,)
/selectionmode = random
/replace = false
</list>
<list q0b1>
/items = (block.quick0back1, survey.thoughtprobe)
/selectionmode = sequence
</list>
*** multiple lists for each block type ***
<expt>
/ preinstructions = (intro)
/ postinstructions = (end)
/ blocks = [1-2 = list.blockselector; 3-4 = list.blockselector; 5-6 = list.blockselector; 7-8 = list.blockselector; 9-10 = list.blockselector;
11-12 = list.blockselector; 13-14 = list.blockselector; 15-16 = list.blockselector; 17-18 = list.blockselector; 19-20 = list.blockselector;
21-22 = list.blockselector; 23-24 = list.blockselector; 25-26 = list.blockselector; 27-28 = list.blockselector; 29-30 = list.blockselector;
31-32 = list.blockselector; 33-34 = list.blockselector; 35-36 = list.blockselector]
/onexptend = [values.completed = 1]
</expt>

However this does not work. Any ideas on how I can randomly present blocks with the survey at the end?
I have included my code and stimuli below if you would like to look at the whole thing.
Thank you!

Why don't you just /branch to the survey block from each of the nback blocks? That is:

Sample your nback blocks randomly at the <expt> level per

<expt>
...
/ blocks = [1-18 = noreplace(quick0back1, ...)]
...
</expt>

and in each nback block have

<block quick0back1>
...
/ branch = [survey.thoughtprobe]
</block>

I tried doing this but it doesnt work for some reason. It just goes past skips the thought probes and goes to the next block. 
mindwanderingjeremy
mindwanderingjeremy
Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)
Group: Forum Members
Posts: 18, Visits: 43
mindwanderingjeremy - 2/11/2021
Dave - 2/11/2021
mindwanderingjeremy - 2/11/2021
Hi again! 

I am having trouble with my n-back task code again. It is nearly complete but I am attempting to randomise the presentation of my survey pages which is proving difficult.
The way I have attempted to do this is I have created a <survey thoughtprobes> function which presents each of the survey pages in a random order. However, I need this survey page to be shown after every one of my experimental blocks. To do this I need to be able to randomly select groups of block1 + survey.thoughtprobes, block 2 + survey.thoughprobes, block3 + survey.thoughtprobes, etc in my <experiment> function. Is there an easy way to do this?

So far I have attempted to use a method I found on a 10 year old thread in this forum which uses lists to achieve this like so:
<list blockselector>
/items = (list.q0b1, list.q0b2, list.q0b3, list.m0b1, list.m0b2, list.m0b3, list.l0b1, list.l0b2, list.l0b3,
list.q1b1, list.q1b2, list.q1b3, list.m1b1, list.m1b2, list.m1b3, list.l1b1, list.l1b2, list.l1b3,)
/selectionmode = random
/replace = false
</list>
<list q0b1>
/items = (block.quick0back1, survey.thoughtprobe)
/selectionmode = sequence
</list>
*** multiple lists for each block type ***
<expt>
/ preinstructions = (intro)
/ postinstructions = (end)
/ blocks = [1-2 = list.blockselector; 3-4 = list.blockselector; 5-6 = list.blockselector; 7-8 = list.blockselector; 9-10 = list.blockselector;
11-12 = list.blockselector; 13-14 = list.blockselector; 15-16 = list.blockselector; 17-18 = list.blockselector; 19-20 = list.blockselector;
21-22 = list.blockselector; 23-24 = list.blockselector; 25-26 = list.blockselector; 27-28 = list.blockselector; 29-30 = list.blockselector;
31-32 = list.blockselector; 33-34 = list.blockselector; 35-36 = list.blockselector]
/onexptend = [values.completed = 1]
</expt>

However this does not work. Any ideas on how I can randomly present blocks with the survey at the end?
I have included my code and stimuli below if you would like to look at the whole thing.
Thank you!

Why don't you just /branch to the survey block from each of the nback blocks? That is:

Sample your nback blocks randomly at the <expt> level per

<expt>
...
/ blocks = [1-18 = noreplace(quick0back1, ...)]
...
</expt>

and in each nback block have

<block quick0back1>
...
/ branch = [survey.thoughtprobe]
</block>

I tried doing this but it doesnt work for some reason. It just goes past skips the thought probes and goes to the next block. 

Here is the scripted coded like you suggest. It doesnt branch to the survey for some reason.
Attachments
NBack1.iqx (259 views, 67.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
mindwanderingjeremy - 2/11/2021
mindwanderingjeremy - 2/11/2021
Dave - 2/11/2021
mindwanderingjeremy - 2/11/2021
Hi again! 

I am having trouble with my n-back task code again. It is nearly complete but I am attempting to randomise the presentation of my survey pages which is proving difficult.
The way I have attempted to do this is I have created a <survey thoughtprobes> function which presents each of the survey pages in a random order. However, I need this survey page to be shown after every one of my experimental blocks. To do this I need to be able to randomly select groups of block1 + survey.thoughtprobes, block 2 + survey.thoughprobes, block3 + survey.thoughtprobes, etc in my <experiment> function. Is there an easy way to do this?

So far I have attempted to use a method I found on a 10 year old thread in this forum which uses lists to achieve this like so:
<list blockselector>
/items = (list.q0b1, list.q0b2, list.q0b3, list.m0b1, list.m0b2, list.m0b3, list.l0b1, list.l0b2, list.l0b3,
list.q1b1, list.q1b2, list.q1b3, list.m1b1, list.m1b2, list.m1b3, list.l1b1, list.l1b2, list.l1b3,)
/selectionmode = random
/replace = false
</list>
<list q0b1>
/items = (block.quick0back1, survey.thoughtprobe)
/selectionmode = sequence
</list>
*** multiple lists for each block type ***
<expt>
/ preinstructions = (intro)
/ postinstructions = (end)
/ blocks = [1-2 = list.blockselector; 3-4 = list.blockselector; 5-6 = list.blockselector; 7-8 = list.blockselector; 9-10 = list.blockselector;
11-12 = list.blockselector; 13-14 = list.blockselector; 15-16 = list.blockselector; 17-18 = list.blockselector; 19-20 = list.blockselector;
21-22 = list.blockselector; 23-24 = list.blockselector; 25-26 = list.blockselector; 27-28 = list.blockselector; 29-30 = list.blockselector;
31-32 = list.blockselector; 33-34 = list.blockselector; 35-36 = list.blockselector]
/onexptend = [values.completed = 1]
</expt>

However this does not work. Any ideas on how I can randomly present blocks with the survey at the end?
I have included my code and stimuli below if you would like to look at the whole thing.
Thank you!

Why don't you just /branch to the survey block from each of the nback blocks? That is:

Sample your nback blocks randomly at the <expt> level per

<expt>
...
/ blocks = [1-18 = noreplace(quick0back1, ...)]
...
</expt>

and in each nback block have

<block quick0back1>
...
/ branch = [survey.thoughtprobe]
</block>

I tried doing this but it doesnt work for some reason. It just goes past skips the thought probes and goes to the next block. 

Here is the scripted coded like you suggest. It doesnt branch to the survey for some reason.

It branches to the survey just fine. You're probably just confused, expecting the branch to occur whenever you see your "stop" trial, but that's because your blocks' /trials syntax is faulty (in all blocks).

/ trials = [1 = 0backready; 2 -9 = noreplace(0backNT, 0backNT, 0backNT, 0backtarget); 10-14 = 0backtarget, 0backNT, 0backNT, 0backNT, stop]

I'm not sure what you intend the bolded part above to do, but I can tell you what it does do: It runs the sequence of trials

0backtarget -> 0backNT -> 0backNT -> 0backNT -> stop

five times.

If you want that sequence of five trials to run only once, the proper specification is


/ trials = [1 = 0backready; 2 -9 = noreplace(0backNT, 0backNT, 0backNT, 0backtarget); 10 = sequence(0backtarget, 0backNT, 0backNT, 0backNT, stop)]

mindwanderingjeremy
mindwanderingjeremy
Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)
Group: Forum Members
Posts: 18, Visits: 43
Dave - 2/12/2021
mindwanderingjeremy - 2/11/2021
mindwanderingjeremy - 2/11/2021
Dave - 2/11/2021
mindwanderingjeremy - 2/11/2021
Hi again! 

I am having trouble with my n-back task code again. It is nearly complete but I am attempting to randomise the presentation of my survey pages which is proving difficult.
The way I have attempted to do this is I have created a <survey thoughtprobes> function which presents each of the survey pages in a random order. However, I need this survey page to be shown after every one of my experimental blocks. To do this I need to be able to randomly select groups of block1 + survey.thoughtprobes, block 2 + survey.thoughprobes, block3 + survey.thoughtprobes, etc in my <experiment> function. Is there an easy way to do this?

So far I have attempted to use a method I found on a 10 year old thread in this forum which uses lists to achieve this like so:
<list blockselector>
/items = (list.q0b1, list.q0b2, list.q0b3, list.m0b1, list.m0b2, list.m0b3, list.l0b1, list.l0b2, list.l0b3,
list.q1b1, list.q1b2, list.q1b3, list.m1b1, list.m1b2, list.m1b3, list.l1b1, list.l1b2, list.l1b3,)
/selectionmode = random
/replace = false
</list>
<list q0b1>
/items = (block.quick0back1, survey.thoughtprobe)
/selectionmode = sequence
</list>
*** multiple lists for each block type ***
<expt>
/ preinstructions = (intro)
/ postinstructions = (end)
/ blocks = [1-2 = list.blockselector; 3-4 = list.blockselector; 5-6 = list.blockselector; 7-8 = list.blockselector; 9-10 = list.blockselector;
11-12 = list.blockselector; 13-14 = list.blockselector; 15-16 = list.blockselector; 17-18 = list.blockselector; 19-20 = list.blockselector;
21-22 = list.blockselector; 23-24 = list.blockselector; 25-26 = list.blockselector; 27-28 = list.blockselector; 29-30 = list.blockselector;
31-32 = list.blockselector; 33-34 = list.blockselector; 35-36 = list.blockselector]
/onexptend = [values.completed = 1]
</expt>

However this does not work. Any ideas on how I can randomly present blocks with the survey at the end?
I have included my code and stimuli below if you would like to look at the whole thing.
Thank you!

Why don't you just /branch to the survey block from each of the nback blocks? That is:

Sample your nback blocks randomly at the <expt> level per

<expt>
...
/ blocks = [1-18 = noreplace(quick0back1, ...)]
...
</expt>

and in each nback block have

<block quick0back1>
...
/ branch = [survey.thoughtprobe]
</block>

I tried doing this but it doesnt work for some reason. It just goes past skips the thought probes and goes to the next block. 

Here is the scripted coded like you suggest. It doesnt branch to the survey for some reason.

It branches to the survey just fine. You're probably just confused, expecting the branch to occur whenever you see your "stop" trial, but that's because your blocks' /trials syntax is faulty (in all blocks).

/ trials = [1 = 0backready; 2 -9 = noreplace(0backNT, 0backNT, 0backNT, 0backtarget); 10-14 = 0backtarget, 0backNT, 0backNT, 0backNT, stop]

I'm not sure what you intend the bolded part above to do, but I can tell you what it does do: It runs the sequence of trials

0backtarget -> 0backNT -> 0backNT -> 0backNT -> stop

five times.

If you want that sequence of five trials to run only once, the proper specification is


/ trials = [1 = 0backready; 2 -9 = noreplace(0backNT, 0backNT, 0backNT, 0backtarget); 10 = sequence(0backtarget, 0backNT, 0backNT, 0backNT, stop)]

Ahh right I understand! yes thank you I did want it to only run once so I appreciate this clarification. I will change this syntax thank you
mindwanderingjeremy
mindwanderingjeremy
Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)Associate Member (226 reputation)
Group: Forum Members
Posts: 18, Visits: 43
Is it the same for the expt /blocks syntax? If I only want it to run through noreplace(block1, block2, block3, etc.) once I list it as 1 = noreplace(block1, block2, block3, etc.)?
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
mindwanderingjeremy - 2/12/2021
Is it the same for the expt /blocks syntax? If I only want it to run through noreplace(block1, block2, block3, etc.) once I list it as 1 = noreplace(block1, block2, block3, etc.)?

This applies to sequence() only. A sequence is treated as a single unit.

When sampling randomly from some pool, it's 1-3 = noreplace(a,b,c) if you want each element in the pool run once, in random order.

2 -9 = noreplace(0backNT, 0backNT, 0backNT, 0backtarget);

will give you 6 0backNT trials and 2 0backtarget trials, in random order.

Edited 3 Years Ago by Dave
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search