[FieldTrip] Design matrix for using ft_statfun_actvsblT

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Thu Mar 4 09:18:04 CET 2021


Hi Paul,

Related to the specific error message (which does not seem to have anything to do with the actual test-statistic that you specified): Are you sure that the input into ft_timelockstatistics is correctly formatted? The error message suggests that there is no ‘observation’ dimension, i.e. that the individual subjects are not ‘available’.

Unrelated to this, are you sure that you want to use the ‘actvsblT’ for the statistical comparison? I have never used this function myself, but reading the low-level code, line 85 ft_statfun_actvsblT throws an error if the input data is not a time-frequency representation, i.e. it suggests that this function has been written to be only applied to spectral data. You mention that you want to do a(n as of yet underspecified statistical inferential test - e.g. what’s the null hypothesis to be tested) on ERP data.

 Good luck,

Jan-Mathijs


On 4 Mar 2021, at 02:47, Paul Dhami <pdhami06 at gmail.com<mailto:pdhami06 at gmail.com>> wrote:

Dear FieldTrip community,

I have 30 participants who conducted an ERP study with one condition.

Accordingly, I first averaged the trials within each participant, and now would like to use the ft_statfun_actvsblT to compare the baseline versus post ERP modulation.

However, I am having trouble creating the design matrix.

As I have 30 participants, I used the following code:

cfg.ivar = 1;
cfg.uvar = 2;
cfg.design(1,:) = [ones(1,30) ones(1,30)*2];
cfg.design(2,:) = [1:30 1:30];

But I get the following error:

Error using ft_timelockstatistics (line 171)
the length of the design matrix (2) does not match the number of observations in the data
(30)

Could anyone provide help as to how to appropriately create a design matrix when using ft_statfun_actvsblT?

Thank you,
Paul
_______________________________________________
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/20210304/714a7004/attachment.htm>


More information about the fieldtrip mailing list