[FieldTrip] granger causality: model order

Carina Oehrn nenga at gmx.net
Thu Aug 2 18:51:28 CEST 2012


Hey Jan-Mathijs,

thank you very much for your response and your advise on the length of time windows! 
TF-resolved Granger works fine with fieldtrip now. 

I still have my questions regarding the choice of model order and yes, sorry, my descriptions were not detailed enough.

1) what I meant was that I have problems using the aic_test function of the bsmart toolbox to calculate the most appropriate model order. When I am trying to use maximal model orders above 15 (I have 3000 data points and I tried various different time windows), I always get the error message:

??? Error using ==> aic_test at 47
Cannot compute AIC with 'opssaic'!

But I can not find the reason. Others using this function seemed to have the same problem. However, as my data was sampled at a rate of 1000 Hz and as I do not downsample in my analysis, I would like to use orders above 15 (which to my knowledge most people use- who however mostly have smaller sampling rates) to include a time period longer than 15 ms.

2) What range of model orders were you talking about when stating:
> For the model order: higher one. Some people seem to get nice results when taking a relatively high model order.

Or does anybody else have some experience with higher model orders? How far up do you go to include a sufficient time interval but still avoid overparameterization?

Thank you very much for your help!
All the best,
Carina





-------- Original-Nachricht --------
> Datum: Thu, 2 Aug 2012 09:16:26 +0200
> Von: jan-mathijs schoffelen <jan.schoffelen at donders.ru.nl>
> An: FieldTrip discussion list <fieldtrip at science.ru.nl>
> Betreff: Re: [FieldTrip] granger causality

> Hi Carina,
> 
> > 1.) I know that I can calculate the appropriate model order and window
> length with the bsmart toolbox. But from the documentation I somehow do not
> get the format of data I should use for this calculation. 
> > When I enter the time-frequency data (which I want to use to estimate
> granger causality) (size: 2 x 2 x freq x time points), it doesn't work.
> 
> The 'it doesn't work' statement is typically not enough for us to diagnose
> where the problem lies (at least at which step it goes wrong). At the
> moment I can only assume that you use an outdated version of FieldTrip, because
> when I try to do TF-resolved Granger using AR-models it works. It is good
> that you pasted the script below, but an error message may be informative
> too.
> 
> > Any advise? I have a sampling rate of 1000. What sort of time window and
> maximal model order would make sense do you think?
> 
> I think that the time window is rather short: I'd rather go for 0.4 or 0.5
> to begin with, but this is an empirical question. Also, shifting the
> windows one time step at a time does not really make sense to me, 0.01 or even
> 0.05 is much more memory friendly. For the model order: higher one. Some
> people seem to get nice results when taking a relatively high model order. Of
> course, for a high model order you also need longer time-windows.
> 
> > 2)I would like to keep the time domain analyzing my data. What do you
> think would be an appropriate sliding time window using the 'ft_mvaranalysis'
> function? And what does it mean exactly? By choosing the model order, I am
> already determining the maximal time lag between the two functions. Are
> the values then estimated for the whole time window?
> 
> No. The time window determines the length of the data segment which is
> used to fit an AR-model (of order X) of the data at time point Y (as defined
> in your toi)
> 
> > 3)What do you think about statistics? Would it makes sense to use the
> non-parametric cluster approach to shuffle within patients and do a group
> analysis that way?
> 
> This depends on your experimental question and you null-hypothesis.
> 
> Best,
> Jan-Mathijs
> 
> > 
> > Thank you so much in advance!
> > Best,
> > Carina
> > 
> > 
> > As a summary,I am doing following steps with field trip:
> > 
> > 
> > cfg = [];
> > cfg.dftfilter ='yes'
> > prep_cond1{subj} = ft_preprocessing(cfg, data);
> > 
> > 
> > cfg         = [];
> > cfg.order   = 5;
> > cfg.toolbox = 'bsmart';
> > cfg.t_ftimwin = 0.05
> > cfg.toi       = -1:0.001:3.5;
> > mdata_cond1{subj}= ft_mvaranalysis(cfg, prep_cond1{subj});
> > 
> > 
> > cfg = [];
> > cfg.method = 'mvar';
> > cfg.foi        = 4:100;
> > cond1_freq{subj}=  ft_freqanalysis_mvar(cfg,mdata_cond1{subj});
> > 
> > 
> > cfg           = [];
> > cfg.method    = 'granger';
> > cond1_granger{subj}  = ft_connectivityanalysis(cfg, cond1_freq{subj});
> > 
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> 
> Jan-Mathijs Schoffelen, MD PhD 
> 
> Donders Institute for Brain, Cognition and Behaviour, 
> Centre for Cognitive Neuroimaging,
> Radboud University Nijmegen, The Netherlands
> 
> Max Planck Institute for Psycholinguistics,
> Nijmegen, The Netherlands
> 
> J.Schoffelen at donders.ru.nl
> Telephone: +31-24-3614793
> 



More information about the fieldtrip mailing list