Within-subject coherence statististics for virtual sources

Lorina Naci lorina_naci at YAHOO.CO.UK
Fri Nov 10 18:41:24 CET 2006


Hi Robert,
  Thank you very much for your help, I was wondering whether I could trouble you with a couple more questions. I converted my besa data to fieldtrip format and this seemed to work fine. I got no error messages and the data structures look like they contain all my data in them (I am attaching an example mat file with the output structures from a few subjects). However, I am still having problems with running freqstatistics. The cfg options are defined OK but the matlab script crushes when it comes to calling statistics_wrapper. The error message I get is as follows:
  "Could not determine type of input data" which leads me to believe there is a problem with the converted data.

I am also attaching my script for freqstatistics in case you need to see this file.
  Very many thanks for your help,
  Lorina


Robert Oostenveld <r.oostenveld at FCDONDERS.RU.NL> wrote:
  Hi Lorina

On 8 Nov 2006, at 20:00, Lorina Naci wrote:
> I tried to run the script as you suggested but it did not work. The
> error message I get is to do with
> [stat] = statistics_wrapper(cfg, varargin{:}). It just gives me an
> error message pointing to this line,saying: error using
> fieldtrip-20061003/private/statistics_wrapper, could not determine
> the type of input data.

Then it means that the data structure that you have obtained from
besa2fieldtrip is not recognized. It is also not clear to me how your
data looks like (i.e. as a Matlab structure). It is virtual channel
data, time-frequency analyzed, and then single trial coherences
computed?

Could you show the output that you get on screen after

dataA = besa2fieldtrip('filenameA.tfc') % i.e. without semicolon,
to show the output on screen
dataB = besa2fieldtrip('filenameB.tfc') % i.e. without semicolon,
to show the output on screen

> Also, the function 'cfg.numrandomization' requires a number, but I
> am not sure what the choice of the number depends on? I've inputed
> 500 as in the documentation example.

That is the number of resamplings that is used to construct the
reference distribution, 500 should be fine.

> Finally, at risk making my ignorance of how Fieldtrip works
> entirely transparent, I am not quite sure how the function you send
> me 'statfun_diff.m' links with the 'freqstatistics.m,' and whether
> I do need to use it?

You just have to put it on your Matlab path somewhere, and you specify
cfg.statistic ='diff'
in freqstatistics. In general by specifying cfg.statistic='xxx', the
function statfun_xxx will be called. Please look in the function
statfun_diff.m to see how the statistic for each sample (=time-
frequency-channel point) is computed.

best regards,
Robert


 Send instant messages to your online friends http://uk.messenger.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061110/6e608a34/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: allsubjects.mat
Type: application/octet-stream
Size: 769060 bytes
Desc: 2990736193-allsubjects.mat
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061110/6e608a34/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freqstatistics_test.m
Type: application/octet-stream
Size: 3768 bytes
Desc: 669505844-freqstatistics_test.m
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061110/6e608a34/attachment-0001.obj>


More information about the fieldtrip mailing list