trentool / TRENTOOL3

Open-Source MATLAB toolbox for transfer entropy estimation
http://trentool.github.io/TRENTOOL3/
GNU General Public License v3.0
56 stars 26 forks source link

Trouble with analyzing precise timewindows #8

Closed goocy closed 9 years ago

goocy commented 9 years ago

I have some issues with the interaction analysis of MEG data. I'd like to compare two datasets from 18 subjects, 150 trials each, at exactly the same timewindow (for example, 1000 to 1200 samples after data onset). The current Trentool implementation apparently computes an embedding interval, and uses a pre-set number of points after the embedding interval for the analysis.

My issue is that the embedding interval depends on tau, which in turn relies on ACT, which changes across datasets. So I essentially get a floating timewindow for the analysis, with no way to bolt it down to a fixed interval. And ACT can vary wildly (in my case, between 3 and 60ms), so the temporal uncertainty of the underlying data is really big. There's no way I can report my results like that.

Is there any quick way to set fixed timewindows?

Currently, I'm attempting to fix this issue with this insertion in transferentropy.m, line 332: timeindices(1) = timeindices(1) - (max(cfg.dim)-1) * max(cfg.tau) * multiplyact-max(dimu); Am I on the right track here? Of course I'm adapting the preparation procedure accordingly.

mwibral commented 9 years ago

Dear goocy,

the fact that ACT varies across the datasets is just that - a fact. If you want to compare data, you also need a fixed number of points, as basically all information theoretic estimators that I know of have a bias that depends on the number of data points- so there are good reasons that TRENTOOL makes these things difficult.

I don't think it's as problematic as it seems at first, though. This is because you should still be able to figure out how to chose the parameters such that all your current target samples lie exactly in the same interval, only their embedding reaches more or less far into the past. At the moment this will require setting some things by hand in TRENTOOL I'm afraid, e.g. running one separate round per channel combination nd dataset, with an individual time interval. All these intervals should end at the same time point but begin earlier or later, depending on tau/ACT. I is also very important to note that the dimension must be the same for TE values that you want to compare - again because of the unavoidable bias problems related to dimensions.

Best, Michael

On 06/02/2015 06:03 PM, goocy wrote:

I have some issues with the interaction analysis of MEG data. I'd like to compare two datasets, 150 trials each, at exactly the same timewindow (1000 to 1200 samples after file onset). The current Trentool implementation computes an embedding interval, and uses a pre-set number of points after the embedding interval for the analysis.

My issue is that the embedding interval depends on tau, which in turn relies on ACT, which changes across datasets. So I essentially get a floating timewindow for the analysis, with no way to bolt it down to a fixed interval. And ACT can vary wildly (in my case, between 3 and 60ms), so the temporal uncertainty of the underlying data is really big. There's no way I can report my results like that.

Is there any quick way to set fixed timewindows?

— Reply to this email directly or view it on GitHub https://github.com/trentool/TRENTOOL3/issues/8.Web Bug from https://github.com/notifications/beacon/AIqYGk9NmDNkVHG54g8Ir-iNkTeydAdiks5oPctAgaJpZM4E02qg.gif

goocy commented 9 years ago

Thanks for the advice!