[FieldTrip] Statistics on ratio frequencies
Marco Rotonda
marco.rotonda at gmail.com
Wed Apr 2 12:52:18 CEST 2014
Sorry guys I attach the script I used:
cfg = [];
cfg.method = 'mtmfft';
cfg.taper = 'hanning';
cfg.foi = [4:1:8];
freqmw1theta = ft_freqanalysis(cfg, mw1);
freqmw2theta = ft_freqanalysis(cfg, mw2);
freqmw3theta = ft_freqanalysis(cfg, mw3);
freqmw4theta = ft_freqanalysis(cfg, mw4);
freqmw5theta = ft_freqanalysis(cfg, mw5);
freqmw6theta = ft_freqanalysis(cfg, mw6);
freqmw7theta = ft_freqanalysis(cfg, mw7);
freqmwe1theta = ft_freqanalysis(cfg, mwe1);
freqmwe2theta = ft_freqanalysis(cfg, mwe2);
freqmwe3theta = ft_freqanalysis(cfg, mwe3);
freqmwe4theta = ft_freqanalysis(cfg, mwe4);
freqmwe5theta = ft_freqanalysis(cfg, mwe5);
freqmwe6theta = ft_freqanalysis(cfg, mwe6);
freqmwe7theta = ft_freqanalysis(cfg, mwe7);
cfg = [];
cfg.method = 'mtmfft';
cfg.taper = 'hanning';
cfg.foi = [8:1:12];
freqmw1alpha = ft_freqanalysis(cfg, mw1);
freqmw2alpha = ft_freqanalysis(cfg, mw2);
freqmw3alpha = ft_freqanalysis(cfg, mw3);
freqmw4alpha = ft_freqanalysis(cfg, mw4);
freqmw5alpha = ft_freqanalysis(cfg, mw5);
freqmw6alpha = ft_freqanalysis(cfg, mw6);
freqmw7alpha = ft_freqanalysis(cfg, mw7);
freqmwe1alpha = ft_freqanalysis(cfg, mwe1);
freqmwe2alpha = ft_freqanalysis(cfg, mwe2);
freqmwe3alpha = ft_freqanalysis(cfg, mwe3);
freqmwe4alpha = ft_freqanalysis(cfg, mwe4);
freqmwe5alpha = ft_freqanalysis(cfg, mwe5);
freqmwe6alpha = ft_freqanalysis(cfg, mwe6);
freqmwe7alpha = ft_freqanalysis(cfg, mwe7);
cfg = [ ];
cfg.parameter = 'powspctrm';
cfg.avgoverfreq = 'yes';
amw1 = ft_selectdata_new(cfg, freqmw1alpha);
amw2 = ft_selectdata_new(cfg, freqmw2alpha);
amw3 = ft_selectdata_new(cfg, freqmw3alpha);
amw4 = ft_selectdata_new(cfg, freqmw4alpha);
amw5 = ft_selectdata_new(cfg, freqmw5alpha);
amw6 = ft_selectdata_new(cfg, freqmw6alpha);
amw7 = ft_selectdata_new(cfg, freqmw7alpha);
amwe1 = ft_selectdata_new(cfg, freqmwe1alpha);
amwe2 = ft_selectdata_new(cfg, freqmwe2alpha);
amwe3 = ft_selectdata_new(cfg, freqmwe3alpha);
amwe4 = ft_selectdata_new(cfg, freqmwe4alpha);
amwe5 = ft_selectdata_new(cfg, freqmwe5alpha);
amwe6 = ft_selectdata_new(cfg, freqmwe6alpha);
amwe7 = ft_selectdata_new(cfg, freqmwe7alpha);
tmw1 = ft_selectdata_new(cfg, freqmw1theta);
tmw2 = ft_selectdata_new(cfg, freqmw2theta);
tmw3 = ft_selectdata_new(cfg, freqmw3theta);
tmw4 = ft_selectdata_new(cfg, freqmw4theta);
tmw5 = ft_selectdata_new(cfg, freqmw5theta);
tmw6 = ft_selectdata_new(cfg, freqmw6theta);
tmw7 = ft_selectdata_new(cfg, freqmw7theta);
tmwe1 = ft_selectdata_new(cfg, freqmwe1theta);
tmwe2 = ft_selectdata_new(cfg, freqmwe2theta);
tmwe3 = ft_selectdata_new(cfg, freqmwe3theta);
tmwe4 = ft_selectdata_new(cfg, freqmwe4theta);
tmwe5 = ft_selectdata_new(cfg, freqmwe5theta);
tmwe6 = ft_selectdata_new(cfg, freqmwe6theta);
tmwe7 = ft_selectdata_new(cfg, freqmwe7theta);
atmw1 = amw1;
atmw2 = amw2;
atmw3 = amw3;
atmw4 = amw4;
atmw5 = amw5;
atmw6 = amw6;
atmw7 = amw7;
atmwe1 = amwe1;
atmwe2 = amwe2;
atmwe3 = amwe3;
atmwe4 = amwe4;
atmwe5 = amwe5;
atmwe6 = amwe6;
atmwe7 = amwe7;
atmw1.powspctrm = amw1.powspctrm./tmw1.powspctrm;
atmw2.powspctrm = amw2.powspctrm./tmw2.powspctrm;
atmw3.powspctrm = amw3.powspctrm./tmw3.powspctrm;
atmw4.powspctrm = amw4.powspctrm./tmw4.powspctrm;
atmw5.powspctrm = amw5.powspctrm./tmw5.powspctrm;
atmw6.powspctrm = amw6.powspctrm./tmw6.powspctrm;
atmw7.powspctrm = amw7.powspctrm./tmw7.powspctrm;
atmwe1.powspctrm = amwe1.powspctrm./tmwe1.powspctrm;
atmwe2.powspctrm = amwe2.powspctrm./tmwe2.powspctrm;
atmwe3.powspctrm = amwe3.powspctrm./tmwe3.powspctrm;
atmwe4.powspctrm = amwe4.powspctrm./tmwe4.powspctrm;
atmwe5.powspctrm = amwe5.powspctrm./tmwe5.powspctrm;
atmwe6.powspctrm = amwe6.powspctrm./tmwe6.powspctrm;
atmwe7.powspctrm = amwe7.powspctrm./tmwe7.powspctrm;
cfg_neighb = [];
cfg_neighb.method = 'distance';
neighbours = ft_prepare_neighbours(cfg_neighb, mwe1);
ntrials = 7;
cfg = [];
cfg.method = 'montecarlo';
cfg.statistic = 'depsamplesT';
cfg.parameter = 'powspctrm';
cfg.correctm = 'cluster';
cfg.template = 'easycapM11_neighb.mat';
cfg.neighbours = neighbours;
cfg.numrandomization = 5000;
cfg.avgoverfreq = 'yes';
cfg.alpha = 0.05;
cfg.tail = 0;
design = [ones(1,ntrials) ones(1,ntrials)*2];
cfg.design = design;
cfg.uvar = 1;
cfg.ivar = 2;
statat = ft_freqstatistics(cfg, atmwe1, atmwe2, atmwe3, atmwe4, atmwe5,...
atmwe6, atmwe7, atmw1, atmw2, atmw3, atmw4, atmw5,...
atmw6, atmw7);
the error I have is:
Undefined function or variable "param".
Error in seloverdim (line 57)
for i = 1:numel(param)
Error in ft_selectdata_old (line 601)
if selectfoi, data = seloverdim(data, 'freq', selfoi, fb); end
Error in ft_selectdata (line 45)
[varargout{1:nargout}] = ft_selectdata_old(varargin{:});
Error in ft_freqstatistics (line 245)
data = ft_selectdata(data, 'param', cfg.parameter, 'avgoverrpt', false,
...
hope is more clear
On 2 April 2014 12:42, jan-mathijs schoffelen
<jan.schoffelen at donders.ru.nl>wrote:
> Not if you don't provide us with some more input.
> Jan-Mathijs
>
> On Apr 2, 2014, at 12:31 PM, Marco Rotonda wrote:
>
> Hi all,
> I would like to compute a simple alpha-theta ratio and do some statistics
> on it.
> I had my data from freqanalysis.
> Then I averaged with selectdata_new to have the mean for a band.
> Then the simple ratio for each channel.
> If now I call freqstatistics I have an error.
> Any suggestion?
>
> Thanks
>
> Marco
> _______________________________________________
> 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
>
> http://www.hettaligebrein.nl
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140402/cd64e183/attachment-0001.html>
More information about the fieldtrip
mailing list