[FieldTrip] Design matrix for using ft_statfun_actvsblT

Paul Dhami pdhami06 at gmail.com
Thu Mar 4 02:47:28 CET 2021


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210303/2952ec04/attachment.htm>


More information about the fieldtrip mailing list