Variable Trial Number


Author
Message
mrg4
mrg4
Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)
Group: Forum Members
Posts: 19, Visits: 218
Hi,
I am currently working on creating templates for some standard procedures which only vary in their stimulus material and a few parameters.
One of those parameters is the number of trials within a specific block.
Is there any chance of using values within a block's trial-attribute?
Here is a example of how I imagine the ideal sultion:

<block Test>
/trials = [1-values.NumTrials = noreplace(trialA, trialB)
/...
</block>

Is this possible somehow?
Thanks in advance!

Dominik

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: 12K, Visits: 83K
mrg4 - Tuesday, November 7, 2017
Hi,
I am currently working on creating templates for some standard procedures which only vary in their stimulus material and a few parameters.
One of those parameters is the number of trials within a specific block.
Is there any chance of using values within a block's trial-attribute?
Here is a example of how I imagine the ideal sultion:

<block Test>
/trials = [1-values.NumTrials = noreplace(trialA, trialB)
/...
</block>

Is this possible somehow?
Thanks in advance!

Dominik

You can achieve this by performing trial selection via a <list> and setting the <list>'s /poolsize via <parameters>:

<parameters>
/ ntrials = 10
</parameters>

<block myblock>
/ stop = [
    block.myblock.trialcount >= parameters.ntrials
]

/ trials = [1=list.triallist]
</block>

<list triallist>
/ items = (trial.a, trial.b)
/ poolsize = parameters.ntrials

</list>


<trial a>
/ validresponse = (0)
/ trialduration = 10
/ branch = [
    list.triallist.nextvalue;
]

</trial>

<trial b>
/ validresponse = (0)
/ trialduration = 10
/ branch = [
    list.triallist.nextvalue;
]

</trial>

The above will run 10 trials (5 x a; 5 x b).

Change the ntrials parameter to 20, and you'll get 10 x a and 10 x b:

<parameters>
/ ntrials = 20
</parameters>

<block myblock>
/ stop = [
    block.myblock.trialcount >= parameters.ntrials
]
/ trials = [1=list.triallist]
</block>

<list triallist>
/ items = (trial.a, trial.b)
/ poolsize = parameters.ntrials
</list>


<trial a>
/ validresponse = (0)
/ trialduration = 10
/ branch = [
    list.triallist.nextvalue;
]
</trial>

<trial b>
/ validresponse = (0)
/ trialduration = 10
/ branch = [
    list.triallist.nextvalue;
]
</trial>

Hope this helps.

mrg4
mrg4
Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)
Group: Forum Members
Posts: 19, Visits: 218
Dave - Tuesday, November 7, 2017
mrg4 - Tuesday, November 7, 2017
Hi,
I am currently working on creating templates for some standard procedures which only vary in their stimulus material and a few parameters.
One of those parameters is the number of trials within a specific block.
Is there any chance of using values within a block's trial-attribute?
Here is a example of how I imagine the ideal sultion:

<block Test>
/trials = [1-values.NumTrials = noreplace(trialA, trialB)
/...
</block>

Is this possible somehow?
Thanks in advance!

Dominik

You can achieve this by performing trial selection via a <list> and setting the <list>'s /poolsize via <parameters>:

<parameters>
/ ntrials = 10
</parameters>

<block myblock>
/ stop = [
    block.myblock.trialcount >= parameters.ntrials
]

/ trials = [1=list.triallist]
</block>

<list triallist>
/ items = (trial.a, trial.b)
/ poolsize = parameters.ntrials

</list>


<trial a>
/ validresponse = (0)
/ trialduration = 10
/ branch = [
    list.triallist.nextvalue;
]

</trial>

<trial b>
/ validresponse = (0)
/ trialduration = 10
/ branch = [
    list.triallist.nextvalue;
]

</trial>

The above will run 10 trials (5 x a; 5 x b).

Change the ntrials parameter to 20, and you'll get 10 x a and 10 x b:

<parameters>
/ ntrials = 20
</parameters>

<block myblock>
/ stop = [
    block.myblock.trialcount >= parameters.ntrials
]
/ trials = [1=list.triallist]
</block>

<list triallist>
/ items = (trial.a, trial.b)
/ poolsize = parameters.ntrials
</list>


<trial a>
/ validresponse = (0)
/ trialduration = 10
/ branch = [
    list.triallist.nextvalue;
]
</trial>

<trial b>
/ validresponse = (0)
/ trialduration = 10
/ branch = [
    list.triallist.nextvalue;
]
</trial>

Hope this helps.

Thank you so much for your quick response! That's the solution I was looking for! :)
Best regards.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search