[FieldTrip] Permutation test design matrix for grand-averaged ERPs

Mariya Manahova m.manahova at gmail.com
Wed Oct 24 09:41:43 CEST 2018

Hi Kate,

Clearly, there's a problem with the way you're defining your design matrix.
Can you tell me what cfg.design looks like when you define it?

With the code I sent you, the design matrix is a 2x58 matrix (the number of
participants is 29). There are two rows, one for the independent variable
(condition 1 or 2) and one for the participant number. The first row
consists of 29 1's and 29 2's because I have two conditions (1 and 2), and
this denotes that each participant is on the one hand in condition 1 and on
the other hand in condition 2. The second row is 1:29 and then again 1:29,
referring to the participant number per condition. Does this make sense?

In this case, the length of my design matrix is 58 because I have 2
observations (1 for each condition) per participant. Why do you end up
having 694?

Can you paste the output of your cfg.design? Here's mine:
[image: image.png]
All the best,

On Tue, Oct 23, 2018 at 6:35 PM Kate Stone <katemsto at gmail.com> wrote:

> Hi again,
> Further to the below, what I would actually prefer to do is use the
> depsamplesT test on my data structure containing averages over trials for
> each subject (i.e. the output of ft_timelockanalysis).
> But every time I try, I get the message "length of the design matrix (2)
> doesn't equal the number of observations (694)" - no matter what the
> dimensions of the design matrix are. I've set up the matrix exactly as
> specified in the tutorial (relevant to my data of course). Any idea what
> this error is about?
> Thanks again,
> Kate
> On Tue, Oct 23, 2018 at 2:04 PM Kate Stone <katemsto at gmail.com> wrote:
>> Hi all,
>> I've been following the tutorial here to do a time-locked perm test on
>> ERP data: www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock
>> I have computed grand averages for my two conditions and am using
>> indepsamplesT with ft_timelockstatistics(cfg, GA_1, GA_2).
>> But what should the design matrix be? The example in the tutorial doesn't
>> apply as I am using grand averages and the reference for
>> ft_timelockstatistics doesn't mention the design matrix, although it is
>> definitely required. I have tried design = [1,2], but this doesn't seem to
>> give sensible results.
>> Thanks in advance,
>> Kate
> --
> Kate Stone
> PhD candidate
> Vasishth Lab | Department of Linguistics
> Potsdam University, 14467 Potsdam, Germany
> https://auskate.github.io
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20181024/f8a785c6/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 15551 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20181024/f8a785c6/attachment-0002.png>

More information about the fieldtrip mailing list