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

Kate Stone katemsto at gmail.com
Wed Oct 24 10:49:10 CEST 2018


Hello, one last email just in case anyone is following my series of very
silly questions or ever searches the following warnings when trying to run
ft_timelockstatistics:

Warning: timelock structure contains field with and without repetitions

Error: the length of the design matrix does not match the number of
observations in the data

In my case, it was because, in the previous step where I averaged ERPs over
trials using ft_timelockanalysis, I had set cfg.keeptrials = 'yes' . It
should be left at the default 'no' (for a within-subjects design at least),
otherwise ft_timelockstatistics will go looking for observations in the
wrong spot (trial) and will discard the ones it really needs (avg, var,
dof).

Thanks and apologies for over-posting,
Kate

On Tue, Oct 23, 2018 at 5:21 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
>


-- 
Kate Stone
PhD candidate
Vasishth Lab | Department of Linguistics
Potsdam University, 14467 Potsdam, Germany
https://auskate.github.io
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20181024/2d9816c4/attachment.html>


More information about the fieldtrip mailing list