Skip to content
Heiko Schütt edited this page Feb 5, 2016 · 4 revisions

Psignifit comes with an automatic pooling utility, which can pool trials of very similar stimulus levels into blocks to reduce the time required for fitting, to profit from the beta-binomial model and to improve interpretability of data-plots.

By default this utility is invoked if you provide more than 25 blocks of data or all your blocks contain only one trial. Psignifit pools all trials with exactly equal stimulus levels. This behaviour is coded in the following option struct fields:

options.nblocks        = 25;   % number of blocks required to start pooling
options.poolMaxGap     = inf;  % maximal number of trials with other stimulus levels between pooled trials
options.poolMaxLength  = inf;  % maximal number of trials per block
options.poolxTol       = 0;    % maximal difference in stimulus level from the first trial in a block

Setting these fields will change the pooling behaviour accordingly.

This way of pooling data is presumably acceptable for many datasets, but pooling by hand is probably more exact.


For illustration we will use a dataset obtained from running a Quest run with 400 trials, which comes with the toolbox in demo_008

First we fit this dataset using the settings for a 2AFC experiment and a normal distribution. See Priors for arguments why we pass a stimulusRange here.

options = struct;
options.expType = '2AFC';
options.sigmoidName = 'norm';
options.stimulusRange = [.25,1.75];
res = psignifit(data,options);

Note that this takes a bit longer than usual. Let's have a look at what psignifit did automatically here:

plotPsych(res)

Each block contains only very few trials Thus the beta-binomial model cannot help much to correct for overdispersion. Furthermore the many lines of data slow psignifit down.

By default psignifit pooled only trials collected at the exact same stimulus level, but all of them.

We can allow psignifit to pool trials which differ by um to 0.01 to reach more pooling and plot the result:

options.poolxTol = 0.01;
resPool1 = psignifit(data,options);
plotPsych(resPool1)

Now we pooled quite strongly

The other two options allow us to restrict which trials should be pooled again. For example we could restrict the number of trials to 25 per block:

options.poolMaxLength = 25;
resPool2 = psignifit(data,options);
plotPsych(resPool2)

This brakes the large blocks up again allowing us to notice if there was more variability over time than expected.

The last option gives us a different rule to achieve something in a similar direction: We can enforce that a block must be collected en bloc like this:

options.poolMaxLength = inf;
options.poolMaxGap = 0;
resPool3 = psignifit(data,options);
plotPsych(resPool3)

Values between 0 and infinity will allow "gaps" of maximally options.poolMaxGap trials which are not included into the block (because their stimulus level differs to much).

Of course all pooling options can be combined.

Clone this wiki locally