From lsbarbosa at gmail.com Tue Feb 1 03:05:59 2011
From: lsbarbosa at gmail.com (Leonardo Barbosa)
Date: Tue, 1 Feb 2011 00:05:59 -0200
Subject: [FieldTrip] Forward model for dipoles with fixed position and
orientation
Message-ID:
Dear Fieldtrip users,
I'm trying to create a forward model for a fixed number of dipoles with
fixed positions and orientations (extracted from a MRI image using
freesurfer and a downsampling algorithm) so I can use it with my inverse
algorithm.
I read this tutorial , a
few examplesand
function
headers , but I
still didn't find exactly what I'm trying to do.
Is it possible to have as a result of *ft_compute_leadfield*,
(and*ft_prepare_leadfield
*?,* ft_prepare_sourcemodel*?) a leadfield that depends only on the
*intensity* of the dipole? Because it has a fixed orientation, and the idea
is exactly reduce the number of unknowns. I noticed that SPM creates what
I'm trying to do (as copied below), but I'm trying to stay within fieldtrip
definitions so I can use it's inverse solutions to compare with mine,
although I only found examples for beamformers inverse solutions, and not
sparse methods. So this is the second question: is there any example of
source-space based sparse methods inverse solutions?
Thanks in advance for any help,
Best Regards
Leonardo Barbosa
Here is the SPM code (inside *spm_eeg_lgainmat*)
% Forward computation
%--------------------------------------------------------------------------
[vol, sens] = forwinv_prepare_vol_sens(vol, sens, 'channel',
forward(ind).channels);
nvert = size(vert, 1);
spm('Pointer', 'Watch');drawnow;
spm_progress_bar('Init', nvert, ['Computing ' modality '
leadfields']); drawnow;
if nvert > 100, Ibar = floor(linspace(1, nvert,100));
else Ibar = [1:nvert]; end
Gxyz = zeros(length(forward(ind).channels), 3*nvert);
for i = 1:nvert
Gxyz(:, (3*i- 2):(3*i)) = forwinv_compute_leadfield(vert(i, :),
sens, vol);
if ismember(i, Ibar)
spm_progress_bar('Set', i); drawnow;
end
end
spm_progress_bar('Clear');
spm_progress_bar('Init', nvert, ['Orienting ' modality '
leadfields']); drawnow;
G{ind} = zeros(size(Gxyz, 1), size(Gxyz, 2)/3);
for i = 1:nvert
G{ind}(:, i) = Gxyz(:, (3*i- 2):(3*i))*norm(i, :)';
if ismember(i, Ibar)
spm_progress_bar('Set', i); drawnow;
end
end
spm_progress_bar('Clear');
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From inbalots at gmail.com Tue Feb 1 14:09:08 2011
From: inbalots at gmail.com (Inbal Lots)
Date: Tue, 1 Feb 2011 15:09:08 +0200
Subject: [FieldTrip] question about using ft_multiplot for my own needs
Message-ID:
Hello
I have a data matrix (in Matlab, at size of [channel num X 30 X 8] ) that
holds some values I calculated for *each channel*.
Is it possible to use your ft_multiplot (or any other function) to display
the plots of *all channels* in their original layout? similar to the
ft_multiplotER ?
My aim is to plot (for each channel) 8 plots on the same axes (similar to
using hold on, or plot([x1,y1],[x2,y2] ,...[x8,y8]) where each xi and yi
have 30 indexes
and to display it all in the layout of all channels together (similar to the
ft_multiplotER, with cfg.layout='4D248.lay';).
Is it possible? how can I do that?
can I "zoom in" or display a selected channels- similar to the
cfg.interactive='yes'; option?
thanks
Inbal
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From Patricia.Wollstadt at gmx.de Tue Feb 1 16:34:04 2011
From: Patricia.Wollstadt at gmx.de (Patricia Wollstadt)
Date: Tue, 01 Feb 2011 16:34:04 +0100
Subject: [FieldTrip] ft_freqstatistics and FDR-correction
In-Reply-To: <1367146600.2032784.1296032931966.JavaMail.fmail@mwmweb056>
References: <20110124164726.247880@gmx.net> <20110125170838.254600@gmx.net>,
<1C530F16-9067-4FDF-A526-20513EE05C79@donders.ru.nl>
<1367146600.2032784.1296032931966.JavaMail.fmail@mwmweb056>
Message-ID: <20110201153404.267000@gmx.net>
Hi Michael, Hi Jan-Mathijs,
thank you very much for the advice/clarification. Everything seems to run fine now (with the corrected design).
Thank you very much,
Best
Patricia
-------- Original-Nachricht --------
> Datum: Wed, 26 Jan 2011 10:08:51 +0100 (CET)
> Von: "Michael Wibral"
> An: "Email discussion list for the FieldTrip project"
> Betreff: Re: [FieldTrip] ft_freqstatistics and FDR-correction
> Hi Patricia,
>
> I also would have thought your design to be correct. Maybe the
> unneccessary specification of the uvar screws thinsg up??
>
> However, you really do not have any repeated measures in your design -
> here the output of FT is correct. I interpret it in the following way: You
> specified cfg.uvar - indicating to FT the possibility that this might be a
> repeated measures design. FT identified the units of observation as being 80
> (correct), and then checked how many repeated measures you ran in each UO
> and found just 1 - which is also correct. I agree that naming the units of
> observation (UO) as 'levels' of the UO variable is a bit odd, should rather
> be 'units of observation'.
>
> The concept of repeated measures is also very often misunderstood: in
> repated measures you do not actually repeat anything, rather you perform
> different measurements (treatments) WITHIN a unit of observation - so a repated
> measures design is a within UO design. Your subjects just have one age, so
> there are no different treatments (levels of the indep variable) per
> subjects and, hence, no 'repeated measures'.
>
> Hope this clarifies terminology for further discussion.
>
> Michael
>
>
> -----Ursprüngliche Nachricht-----
> Von: "jan-mathijs schoffelen"
> Gesendet: Jan 25, 2011 8:57:03 PM
> An: "Email discussion list for the FieldTrip project"
>
> Betreff: Re: [FieldTrip] ft_freqstatistics and FDR-correction
>
> >Hi Patricia,
> >
> >I don't really understand what is going on, but could you try to
> >specify your design only in a single row (design = design(2,:) in your
> >case), specify cfg.ivar = 1; and cfg=rmfield(cfg,'uvar'), and see how
> >it runs? As such the uvar row is not relevant in an independent
> >samples design.
> >
> >Best,
> >
> >Jan-Mathijs
> >
> >
> >
> >On Jan 25, 2011, at 6:08 PM, Patricia Wollstadt wrote:
> >
> >> Dear all,
> >>
> >> I'm still trying to identify the underlying reason for the issue
> >> described below. I ran the analysis in debug mode (I'm using
> >> Matlab2008b and the Fieldtrip-release from the 16th of January 2011)
> >> and found that the matrix 'resample', that is generated in
> >> 'statistics_montecarlo', line 187:
> >>
> >> resample = resampledesign(cfg, design);
> >>
> >> doesn't contain actual permutations of my initial design, but rather
> >> sorted rowvectors from 1 to 80 (no of subjects). So (since there is
> >> no permutation of the units of observation) the 'randstat' that is
> >> subsequently calculated for each row of the resample-matrix is
> >> always the same.
> >> Is this maybe due to my design and my units of observations
> >> respectively? I am looking at age-dependent variations in resting-
> >> state data, so my UO are 80 subjects, divided into four age groups.
> >> The commandline-output of the 'resampledesign'-function is as follows:
> >>
> >> total number of measurements = 80
> >> total number of variables = 2
> >> number of independent variables = 1
> >> number of unit variables = 1
> >> number of within-cell variables = 0
> >> number of control variables = 0
> >> using a permutation resampling approach
> >> repeated measurement in variable 1 over 80 levels
> >> number of repeated measurements in each level is 1 1 1 1 1 1 1 1 1 1
> >> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
> >> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
> >> 1 1
> >>
> >>
> >> Is this correct? Shouldn't this read 'repeated measurement in
> >> variable 2 over 4 levels' with the number of subjects per group as
> >> repeated measurements within a condition? Still I am pretty sure
> >> about my design matrix, which contains the indices 1 to 80 (for all
> >> subjects) in the first row (this is my cfg.uvar) with the
> >> corresponding age groups (1 to 4) in the second row (cfg.ivar, see
> >> my previous email below). I use an 'indepsamplesF'-statistic, since
> >> I am comparing between four groups of different subjects (averaged
> >> over trials).
> >>
> >> I hope, I got the settings and my design right. Any suggestions,
> >> whether this is a problem due to wrong configurations in my script
> >> are very welcome.
> >>
> >> Right now I work around this issue by replacing line 279 in
> >> 'statistics_montecarlo':
> >>
> >> tmpdesign = design(:,resample(i,:));
> >>
> >> with:
> >>
> >> tmpdesign = design(:,randperm(size(design,2)));
> >>
> >> creating permutations of my design 'by hand'. Is this acceptable or
> >> is there anything I'm maybe missing.
> >>
> >> Thank you very much, kind regards,
> >>
> >> Patricia
> >>
> >>
> >>
> >>
> >> -------- Original-Nachricht --------
> >>> Datum: Mon, 24 Jan 2011 17:47:26 +0100
> >>> Von: "Patricia Wollstadt"
> >>> An: fieldtrip at donders.ru.nl
> >>> Betreff: [FieldTrip] ft_freqstatistics and FDR-correction
> >>
> >>> Dear Fieldtrip-users,
> >>>
> >>> I'm currently trying to calculate freqstatistics for four
> >>> experimental
> >>> groups, using the following options:
> >>>
> >>> groupSize=[length(subjects{1}) length(subjects{2})
> >>> length(subjects{3})
> >>> length(subjects{4})];
> >>>
> >>> design = [1:groupSize(1)+groupSize(2)+groupSize(3)+groupSize(4)];
> >>> % 1 to N subjects
> >>> design(2,:) = [ones(1,groupSize(1)) 2*ones(1,groupSize(2))
> >>> 3*ones(1,groupSize(3)) 4*ones(1,groupSize(4))]; % indep var ->
> >>> group membership
> >>>
> >>>
> >>> cfg=[];
> >>> cfg.design=design;
> >>> cfg.uvar = 1;
> >>> cfg.ivar = 2;
> >>> cfg.method = 'montecarlo';
> >>> cfg.statistic = 'indepsamplesF';
> >>> cfg.correctm = 'fdr';
> >>> cfg.numrandomization = 180000;
> >>> cfg.alpha = 0.01/7;
> >>> cfg.tail = 1;
> >>> cfg.design = design;
> >>> cfg.channels = myChannels;
> >>> cfg.avgovertime = 'yes';
> >>> cfg.avgoverfreq = 'yes';
> >>> cfg.frequency = [1 3];
> >>>
> >>> stat = ft_freqstatistics(cfg, group1avg, group2avg, group3avg,
> >>> group4avg);
> >>>
> >>> With these settings, the coputation itself runs fine, but the
> >>> resulting
> >>> 'prob'-matrix contains only zeros (accordingly the 'mask'-matrix
> >>> consists of
> >>> only ones). This would mean, that I found significant effects for all
> >>> channels. Is this possible or rather due to an error somewhere in
> >>> my script? Is
> >>> it likely, that these are 'real' zeroes or rather very small
> >>> values, close
> >>> to zero?
> >>> Any hints and suggestions are very welcome, thank you in advance,
> >>>
> >>> Kind regards
> >>>
> >>> Patricia Wollstadt
> >>>
> >>>
> >>> --
> >>> GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
> >>> gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
> >>> _______________________________________________
> >>> fieldtrip mailing list
> >>> fieldtrip at donders.ru.nl
> >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >>
> >> --
> >> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> >> belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
> >> _______________________________________________
> >> fieldtrip mailing list
> >> fieldtrip at donders.ru.nl
> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >
> >Dr. J.M. (Jan-Mathijs) Schoffelen
> >Donders Institute for Brain, Cognition and Behaviour,
> >Centre for Cognitive Neuroimaging,
> >Radboud University Nijmegen, The Netherlands
> >J.Schoffelen at donders.ru.nl
> >Telephone: 0031-24-3614793
> >
> >_______________________________________________
> >fieldtrip mailing list
> >fieldtrip at donders.ru.nl
> >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
--
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
From michael.wibral at web.de Tue Feb 1 18:29:57 2011
From: michael.wibral at web.de (Michael Wibral)
Date: Tue, 1 Feb 2011 18:29:57 +0100 (CET)
Subject: [FieldTrip] ft_freqstatistics and FDR-correction
In-Reply-To: <20110201153404.267000@gmx.net>
References: <20110124164726.247880@gmx.net> <20110125170838.254600@gmx.net>,
<1C530F16-9067-4FDF-A526-20513EE05C79@donders.ru.nl>
<1367146600.2032784.1296032931966.JavaMail.fmail@mwmweb056>,
<20110201153404.267000@gmx.net>
Message-ID: <1161827061.5251946.1296581397869.JavaMail.fmail@mwmweb053>
Hi Patricia,
it seems that things are clarified now. I just do not know what was actually wrong with your code Was it the superfluous specification of cfg.uvar??
Could you let us know? Thanks.
Michael
-----Ursprüngliche Nachricht-----
Von: "Patricia Wollstadt"
Gesendet: Feb 1, 2011 4:34:04 PM
An: "Email discussion list for the FieldTrip project"
Betreff: Re: [FieldTrip] ft_freqstatistics and FDR-correction
>Hi Michael, Hi Jan-Mathijs,
>
>thank you very much for the advice/clarification. Everything seems to run fine now (with the corrected design).
>
>Thank you very much,
>
>Best
>
>Patricia
>
>
>-------- Original-Nachricht --------
>> Datum: Wed, 26 Jan 2011 10:08:51 +0100 (CET)
>> Von: "Michael Wibral"
>> An: "Email discussion list for the FieldTrip project"
>> Betreff: Re: [FieldTrip] ft_freqstatistics and FDR-correction
>
>> Hi Patricia,
>>
>> I also would have thought your design to be correct. Maybe the
>> unneccessary specification of the uvar screws thinsg up??
>>
>> However, you really do not have any repeated measures in your design -
>> here the output of FT is correct. I interpret it in the following way: You
>> specified cfg.uvar - indicating to FT the possibility that this might be a
>> repeated measures design. FT identified the units of observation as being 80
>> (correct), and then checked how many repeated measures you ran in each UO
>> and found just 1 - which is also correct. I agree that naming the units of
>> observation (UO) as 'levels' of the UO variable is a bit odd, should rather
>> be 'units of observation'.
>>
>> The concept of repeated measures is also very often misunderstood: in
>> repated measures you do not actually repeat anything, rather you perform
>> different measurements (treatments) WITHIN a unit of observation - so a repated
>> measures design is a within UO design. Your subjects just have one age, so
>> there are no different treatments (levels of the indep variable) per
>> subjects and, hence, no 'repeated measures'.
>>
>> Hope this clarifies terminology for further discussion.
>>
>> Michael
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: "jan-mathijs schoffelen"
>> Gesendet: Jan 25, 2011 8:57:03 PM
>> An: "Email discussion list for the FieldTrip project"
>>
>> Betreff: Re: [FieldTrip] ft_freqstatistics and FDR-correction
>>
>> >Hi Patricia,
>> >
>> >I don't really understand what is going on, but could you try to
>> >specify your design only in a single row (design = design(2,:) in your
>> >case), specify cfg.ivar = 1; and cfg=rmfield(cfg,'uvar'), and see how
>> >it runs? As such the uvar row is not relevant in an independent
>> >samples design.
>> >
>> >Best,
>> >
>> >Jan-Mathijs
>> >
>> >
>> >
>> >On Jan 25, 2011, at 6:08 PM, Patricia Wollstadt wrote:
>> >
>> >> Dear all,
>> >>
>> >> I'm still trying to identify the underlying reason for the issue
>> >> described below. I ran the analysis in debug mode (I'm using
>> >> Matlab2008b and the Fieldtrip-release from the 16th of January 2011)
>> >> and found that the matrix 'resample', that is generated in
>> >> 'statistics_montecarlo', line 187:
>> >>
>> >> resample = resampledesign(cfg, design);
>> >>
>> >> doesn't contain actual permutations of my initial design, but rather
>> >> sorted rowvectors from 1 to 80 (no of subjects). So (since there is
>> >> no permutation of the units of observation) the 'randstat' that is
>> >> subsequently calculated for each row of the resample-matrix is
>> >> always the same.
>> >> Is this maybe due to my design and my units of observations
>> >> respectively? I am looking at age-dependent variations in resting-
>> >> state data, so my UO are 80 subjects, divided into four age groups.
>> >> The commandline-output of the 'resampledesign'-function is as follows:
>> >>
>> >> total number of measurements = 80
>> >> total number of variables = 2
>> >> number of independent variables = 1
>> >> number of unit variables = 1
>> >> number of within-cell variables = 0
>> >> number of control variables = 0
>> >> using a permutation resampling approach
>> >> repeated measurement in variable 1 over 80 levels
>> >> number of repeated measurements in each level is 1 1 1 1 1 1 1 1 1 1
>> >> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
>> >> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
>> >> 1 1
>> >>
>> >>
>> >> Is this correct? Shouldn't this read 'repeated measurement in
>> >> variable 2 over 4 levels' with the number of subjects per group as
>> >> repeated measurements within a condition? Still I am pretty sure
>> >> about my design matrix, which contains the indices 1 to 80 (for all
>> >> subjects) in the first row (this is my cfg.uvar) with the
>> >> corresponding age groups (1 to 4) in the second row (cfg.ivar, see
>> >> my previous email below). I use an 'indepsamplesF'-statistic, since
>> >> I am comparing between four groups of different subjects (averaged
>> >> over trials).
>> >>
>> >> I hope, I got the settings and my design right. Any suggestions,
>> >> whether this is a problem due to wrong configurations in my script
>> >> are very welcome.
>> >>
>> >> Right now I work around this issue by replacing line 279 in
>> >> 'statistics_montecarlo':
>> >>
>> >> tmpdesign = design(:,resample(i,:));
>> >>
>> >> with:
>> >>
>> >> tmpdesign = design(:,randperm(size(design,2)));
>> >>
>> >> creating permutations of my design 'by hand'. Is this acceptable or
>> >> is there anything I'm maybe missing.
>> >>
>> >> Thank you very much, kind regards,
>> >>
>> >> Patricia
>> >>
>> >>
>> >>
>> >>
>> >> -------- Original-Nachricht --------
>> >>> Datum: Mon, 24 Jan 2011 17:47:26 +0100
>> >>> Von: "Patricia Wollstadt"
>> >>> An: fieldtrip at donders.ru.nl
>> >>> Betreff: [FieldTrip] ft_freqstatistics and FDR-correction
>> >>
>> >>> Dear Fieldtrip-users,
>> >>>
>> >>> I'm currently trying to calculate freqstatistics for four
>> >>> experimental
>> >>> groups, using the following options:
>> >>>
>> >>> groupSize=[length(subjects{1}) length(subjects{2})
>> >>> length(subjects{3})
>> >>> length(subjects{4})];
>> >>>
>> >>> design = [1:groupSize(1)+groupSize(2)+groupSize(3)+groupSize(4)];
>> >>> % 1 to N subjects
>> >>> design(2,:) = [ones(1,groupSize(1)) 2*ones(1,groupSize(2))
>> >>> 3*ones(1,groupSize(3)) 4*ones(1,groupSize(4))]; % indep var ->
>> >>> group membership
>> >>>
>> >>>
>> >>> cfg=[];
>> >>> cfg.design=design;
>> >>> cfg.uvar = 1;
>> >>> cfg.ivar = 2;
>> >>> cfg.method = 'montecarlo';
>> >>> cfg.statistic = 'indepsamplesF';
>> >>> cfg.correctm = 'fdr';
>> >>> cfg.numrandomization = 180000;
>> >>> cfg.alpha = 0.01/7;
>> >>> cfg.tail = 1;
>> >>> cfg.design = design;
>> >>> cfg.channels = myChannels;
>> >>> cfg.avgovertime = 'yes';
>> >>> cfg.avgoverfreq = 'yes';
>> >>> cfg.frequency = [1 3];
>> >>>
>> >>> stat = ft_freqstatistics(cfg, group1avg, group2avg, group3avg,
>> >>> group4avg);
>> >>>
>> >>> With these settings, the coputation itself runs fine, but the
>> >>> resulting
>> >>> 'prob'-matrix contains only zeros (accordingly the 'mask'-matrix
>> >>> consists of
>> >>> only ones). This would mean, that I found significant effects for all
>> >>> channels. Is this possible or rather due to an error somewhere in
>> >>> my script? Is
>> >>> it likely, that these are 'real' zeroes or rather very small
>> >>> values, close
>> >>> to zero?
>> >>> Any hints and suggestions are very welcome, thank you in advance,
>> >>>
>> >>> Kind regards
>> >>>
>> >>> Patricia Wollstadt
>> >>>
>> >>>
>> >>> --
>> >>> GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
>> >>> gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
>> >>> _______________________________________________
>> >>> fieldtrip mailing list
>> >>> fieldtrip at donders.ru.nl
>> >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>> >>
>> >> --
>> >> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
>> >> belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
>> >> _______________________________________________
>> >> fieldtrip mailing list
>> >> fieldtrip at donders.ru.nl
>> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>> >
>> >Dr. J.M. (Jan-Mathijs) Schoffelen
>> >Donders Institute for Brain, Cognition and Behaviour,
>> >Centre for Cognitive Neuroimaging,
>> >Radboud University Nijmegen, The Netherlands
>> >J.Schoffelen at donders.ru.nl
>> >Telephone: 0031-24-3614793
>> >
>> >_______________________________________________
>> >fieldtrip mailing list
>> >fieldtrip at donders.ru.nl
>> >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>--
>GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
>gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
>_______________________________________________
>fieldtrip mailing list
>fieldtrip at donders.ru.nl
>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 637 bytes
Desc: not available
URL:
From batrod at gmail.com Tue Feb 1 18:38:26 2011
From: batrod at gmail.com (Rodolphe Nenert)
Date: Tue, 1 Feb 2011 11:38:26 -0600
Subject: [FieldTrip] ft_freqstatistics and FDR-correction
In-Reply-To: <1161827061.5251946.1296581397869.JavaMail.fmail@mwmweb053>
References: <20110124164726.247880@gmx.net> <20110125170838.254600@gmx.net>
<1C530F16-9067-4FDF-A526-20513EE05C79@donders.ru.nl>
<1367146600.2032784.1296032931966.JavaMail.fmail@mwmweb056>
<20110201153404.267000@gmx.net>
<1161827061.5251946.1296581397869.JavaMail.fmail@mwmweb053>
Message-ID:
Dear Patricia and others that participated to this discussion.
I had recently the same problem, using ft_freqstatistics with Montecarlo to
correlate Time-frequency power values and behavioral results.
All my p-values were first found to be 0, resulting in a mask full of 1.
By removing the useless cfg.uvar, the script made the correct analysis and
reported good correlation values.
Hope this helps,
Rodolphe.
On Tue, Feb 1, 2011 at 11:29 AM, Michael Wibral wrote:
> Hi Patricia,
>
> it seems that things are clarified now. I just do not know what was
> actually wrong with your code Was it the superfluous specification of
> cfg.uvar??
> Could you let us know? Thanks.
>
> Michael
> -----Ursprüngliche Nachricht-----
> Von: "Patricia Wollstadt"
> Gesendet: Feb 1, 2011 4:34:04 PM
> An: "Email discussion list for the FieldTrip project" <
> fieldtrip at donders.ru.nl>
> Betreff: Re: [FieldTrip] ft_freqstatistics and FDR-correction
>
> >Hi Michael, Hi Jan-Mathijs,
> >
> >thank you very much for the advice/clarification. Everything seems to run
> fine now (with the corrected design).
> >
> >Thank you very much,
> >
> >Best
> >
> >Patricia
> >
> >
> >-------- Original-Nachricht --------
> >> Datum: Wed, 26 Jan 2011 10:08:51 +0100 (CET)
> >> Von: "Michael Wibral"
> >> An: "Email discussion list for the FieldTrip project" <
> fieldtrip at donders.ru.nl>
> >> Betreff: Re: [FieldTrip] ft_freqstatistics and FDR-correction
> >
> >> Hi Patricia,
> >>
> >> I also would have thought your design to be correct. Maybe the
> >> unneccessary specification of the uvar screws thinsg up??
> >>
> >> However, you really do not have any repeated measures in your design -
> >> here the output of FT is correct. I interpret it in the following way:
> You
> >> specified cfg.uvar - indicating to FT the possibility that this might be
> a
> >> repeated measures design. FT identified the units of observation as
> being 80
> >> (correct), and then checked how many repeated measures you ran in each
> UO
> >> and found just 1 - which is also correct. I agree that naming the units
> of
> >> observation (UO) as 'levels' of the UO variable is a bit odd, should
> rather
> >> be 'units of observation'.
> >>
> >> The concept of repeated measures is also very often misunderstood: in
> >> repated measures you do not actually repeat anything, rather you perform
> >> different measurements (treatments) WITHIN a unit of observation - so a
> repated
> >> measures design is a within UO design. Your subjects just have one age,
> so
> >> there are no different treatments (levels of the indep variable) per
> >> subjects and, hence, no 'repeated measures'.
> >>
> >> Hope this clarifies terminology for further discussion.
> >>
> >> Michael
> >>
> >>
> >> -----Ursprüngliche Nachricht-----
> >> Von: "jan-mathijs schoffelen"
> >> Gesendet: Jan 25, 2011 8:57:03 PM
> >> An: "Email discussion list for the FieldTrip project"
> >>
> >> Betreff: Re: [FieldTrip] ft_freqstatistics and FDR-correction
> >>
> >> >Hi Patricia,
> >> >
> >> >I don't really understand what is going on, but could you try to
> >> >specify your design only in a single row (design = design(2,:) in your
> >> >case), specify cfg.ivar = 1; and cfg=rmfield(cfg,'uvar'), and see how
> >> >it runs? As such the uvar row is not relevant in an independent
> >> >samples design.
> >> >
> >> >Best,
> >> >
> >> >Jan-Mathijs
> >> >
> >> >
> >> >
> >> >On Jan 25, 2011, at 6:08 PM, Patricia Wollstadt wrote:
> >> >
> >> >> Dear all,
> >> >>
> >> >> I'm still trying to identify the underlying reason for the issue
> >> >> described below. I ran the analysis in debug mode (I'm using
> >> >> Matlab2008b and the Fieldtrip-release from the 16th of January 2011)
> >> >> and found that the matrix 'resample', that is generated in
> >> >> 'statistics_montecarlo', line 187:
> >> >>
> >> >> resample = resampledesign(cfg, design);
> >> >>
> >> >> doesn't contain actual permutations of my initial design, but rather
> >> >> sorted rowvectors from 1 to 80 (no of subjects). So (since there is
> >> >> no permutation of the units of observation) the 'randstat' that is
> >> >> subsequently calculated for each row of the resample-matrix is
> >> >> always the same.
> >> >> Is this maybe due to my design and my units of observations
> >> >> respectively? I am looking at age-dependent variations in resting-
> >> >> state data, so my UO are 80 subjects, divided into four age groups.
> >> >> The commandline-output of the 'resampledesign'-function is as
> follows:
> >> >>
> >> >> total number of measurements = 80
> >> >> total number of variables = 2
> >> >> number of independent variables = 1
> >> >> number of unit variables = 1
> >> >> number of within-cell variables = 0
> >> >> number of control variables = 0
> >> >> using a permutation resampling approach
> >> >> repeated measurement in variable 1 over 80 levels
> >> >> number of repeated measurements in each level is 1 1 1 1 1 1 1 1 1 1
> >> >> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
> >> >> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
> >> >> 1 1
> >> >>
> >> >>
> >> >> Is this correct? Shouldn't this read 'repeated measurement in
> >> >> variable 2 over 4 levels' with the number of subjects per group as
> >> >> repeated measurements within a condition? Still I am pretty sure
> >> >> about my design matrix, which contains the indices 1 to 80 (for all
> >> >> subjects) in the first row (this is my cfg.uvar) with the
> >> >> corresponding age groups (1 to 4) in the second row (cfg.ivar, see
> >> >> my previous email below). I use an 'indepsamplesF'-statistic, since
> >> >> I am comparing between four groups of different subjects (averaged
> >> >> over trials).
> >> >>
> >> >> I hope, I got the settings and my design right. Any suggestions,
> >> >> whether this is a problem due to wrong configurations in my script
> >> >> are very welcome.
> >> >>
> >> >> Right now I work around this issue by replacing line 279 in
> >> >> 'statistics_montecarlo':
> >> >>
> >> >> tmpdesign = design(:,resample(i,:));
> >> >>
> >> >> with:
> >> >>
> >> >> tmpdesign = design(:,randperm(size(design,2)));
> >> >>
> >> >> creating permutations of my design 'by hand'. Is this acceptable or
> >> >> is there anything I'm maybe missing.
> >> >>
> >> >> Thank you very much, kind regards,
> >> >>
> >> >> Patricia
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> -------- Original-Nachricht --------
> >> >>> Datum: Mon, 24 Jan 2011 17:47:26 +0100
> >> >>> Von: "Patricia Wollstadt"
> >> >>> An: fieldtrip at donders.ru.nl
> >> >>> Betreff: [FieldTrip] ft_freqstatistics and FDR-correction
> >> >>
> >> >>> Dear Fieldtrip-users,
> >> >>>
> >> >>> I'm currently trying to calculate freqstatistics for four
> >> >>> experimental
> >> >>> groups, using the following options:
> >> >>>
> >> >>> groupSize=[length(subjects{1}) length(subjects{2})
> >> >>> length(subjects{3})
> >> >>> length(subjects{4})];
> >> >>>
> >> >>> design = [1:groupSize(1)+groupSize(2)+groupSize(3)+groupSize(4)];
> >> >>> % 1 to N subjects
> >> >>> design(2,:) = [ones(1,groupSize(1)) 2*ones(1,groupSize(2))
> >> >>> 3*ones(1,groupSize(3)) 4*ones(1,groupSize(4))]; % indep var ->
> >> >>> group membership
> >> >>>
> >> >>>
> >> >>> cfg=[];
> >> >>> cfg.design=design;
> >> >>> cfg.uvar = 1;
> >> >>> cfg.ivar = 2;
> >> >>> cfg.method = 'montecarlo';
> >> >>> cfg.statistic = 'indepsamplesF';
> >> >>> cfg.correctm = 'fdr';
> >> >>> cfg.numrandomization = 180000;
> >> >>> cfg.alpha = 0.01/7;
> >> >>> cfg.tail = 1;
> >> >>> cfg.design = design;
> >> >>> cfg.channels = myChannels;
> >> >>> cfg.avgovertime = 'yes';
> >> >>> cfg.avgoverfreq = 'yes';
> >> >>> cfg.frequency = [1 3];
> >> >>>
> >> >>> stat = ft_freqstatistics(cfg, group1avg, group2avg, group3avg,
> >> >>> group4avg);
> >> >>>
> >> >>> With these settings, the coputation itself runs fine, but the
> >> >>> resulting
> >> >>> 'prob'-matrix contains only zeros (accordingly the 'mask'-matrix
> >> >>> consists of
> >> >>> only ones). This would mean, that I found significant effects for
> all
> >> >>> channels. Is this possible or rather due to an error somewhere in
> >> >>> my script? Is
> >> >>> it likely, that these are 'real' zeroes or rather very small
> >> >>> values, close
> >> >>> to zero?
> >> >>> Any hints and suggestions are very welcome, thank you in advance,
> >> >>>
> >> >>> Kind regards
> >> >>>
> >> >>> Patricia Wollstadt
> >> >>>
> >> >>>
> >> >>> --
> >> >>> GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
> >> >>> gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
> >> >>> _______________________________________________
> >> >>> fieldtrip mailing list
> >> >>> fieldtrip at donders.ru.nl
> >> >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >> >>
> >> >> --
> >> >> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> >> >> belohnen Sie mit bis zu 50,- Euro!
> https://freundschaftswerbung.gmx.de
> >> >> _______________________________________________
> >> >> fieldtrip mailing list
> >> >> fieldtrip at donders.ru.nl
> >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >> >
> >> >Dr. J.M. (Jan-Mathijs) Schoffelen
> >> >Donders Institute for Brain, Cognition and Behaviour,
> >> >Centre for Cognitive Neuroimaging,
> >> >Radboud University Nijmegen, The Netherlands
> >> >J.Schoffelen at donders.ru.nl
> >> >Telephone: 0031-24-3614793
> >> >
> >> >_______________________________________________
> >> >fieldtrip mailing list
> >> >fieldtrip at donders.ru.nl
> >> >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >
> >--
> >GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
> >gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
> >_______________________________________________
> >fieldtrip mailing list
> >fieldtrip at donders.ru.nl
> >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From ekanal at cmu.edu Tue Feb 1 19:16:23 2011
From: ekanal at cmu.edu (Kanal Eliezer)
Date: Tue, 1 Feb 2011 13:16:23 -0500
Subject: [FieldTrip] using planar gradiometer data with ft_combineplanar
Message-ID: <3F013D5F-0A1C-4A63-A365-FFD87F9233F9@cmu.edu>
Hello folks -
We have a Neuromag 306 system here, which has two planar gradiometers at each sensor location (x and y directions). Is there a way I can use ft_combineplanar with the data from these sensors? From what I can tell, I shouldn't need to use ft_megplanar, but I don't know how to format the data so that ft_combineplanar knows what to do. Thanks -
Elli Kanal
--------------------
Eliezer Kanal, Ph.D.
Postdoctoral Fellow
Center for the Neural Basis of Cognition
Carnegie Mellon University
4400 Fifth Ave, Suite 115
Pittsburgh PA 15213
P: 412-268-4115
F: 412-268-5060
From Patricia.Wollstadt at gmx.de Tue Feb 1 22:26:51 2011
From: Patricia.Wollstadt at gmx.de (Patricia Wollstadt)
Date: Tue, 01 Feb 2011 22:26:51 +0100
Subject: [FieldTrip] ft_freqstatistics and FDR-correction
In-Reply-To:
References: <20110124164726.247880@gmx.net> <20110125170838.254600@gmx.net>
<1C530F16-9067-4FDF-A526-20513EE05C79@donders.ru.nl>
<1367146600.2032784.1296032931966.JavaMail.fmail@mwmweb056>
<20110201153404.267000@gmx.net>
<1161827061.5251946.1296581397869.JavaMail.fmail@mwmweb053>
Message-ID: <20110201212651.47820@gmx.net>
Dear all,
the problem was caused by the wrong design matrix (and thus the superfluous cfg.uvar), sorry for not making this clear. So actually I just need a vector that specifies the group for each subject,
Best
Patricia
-------- Original-Nachricht --------
> Datum: Tue, 1 Feb 2011 11:38:26 -0600
> Von: Rodolphe Nenert
> An: Email discussion list for the FieldTrip project
> Betreff: Re: [FieldTrip] ft_freqstatistics and FDR-correction
> Dear Patricia and others that participated to this discussion.
>
> I had recently the same problem, using ft_freqstatistics with Montecarlo
> to
> correlate Time-frequency power values and behavioral results.
> All my p-values were first found to be 0, resulting in a mask full of 1.
> By removing the useless cfg.uvar, the script made the correct analysis and
> reported good correlation values.
>
> Hope this helps,
>
> Rodolphe.
>
> On Tue, Feb 1, 2011 at 11:29 AM, Michael Wibral
> wrote:
>
> > Hi Patricia,
> >
> > it seems that things are clarified now. I just do not know what was
> > actually wrong with your code Was it the superfluous specification of
> > cfg.uvar??
> > Could you let us know? Thanks.
> >
> > Michael
> > -----Ursprüngliche Nachricht-----
> > Von: "Patricia Wollstadt"
> > Gesendet: Feb 1, 2011 4:34:04 PM
> > An: "Email discussion list for the FieldTrip project" <
> > fieldtrip at donders.ru.nl>
> > Betreff: Re: [FieldTrip] ft_freqstatistics and FDR-correction
> >
> > >Hi Michael, Hi Jan-Mathijs,
> > >
> > >thank you very much for the advice/clarification. Everything seems to
> run
> > fine now (with the corrected design).
> > >
> > >Thank you very much,
> > >
> > >Best
> > >
> > >Patricia
> > >
> > >
> > >-------- Original-Nachricht --------
> > >> Datum: Wed, 26 Jan 2011 10:08:51 +0100 (CET)
> > >> Von: "Michael Wibral"
> > >> An: "Email discussion list for the FieldTrip project" <
> > fieldtrip at donders.ru.nl>
> > >> Betreff: Re: [FieldTrip] ft_freqstatistics and FDR-correction
> > >
> > >> Hi Patricia,
> > >>
> > >> I also would have thought your design to be correct. Maybe the
> > >> unneccessary specification of the uvar screws thinsg up??
> > >>
> > >> However, you really do not have any repeated measures in your design
> -
> > >> here the output of FT is correct. I interpret it in the following
> way:
> > You
> > >> specified cfg.uvar - indicating to FT the possibility that this might
> be
> > a
> > >> repeated measures design. FT identified the units of observation as
> > being 80
> > >> (correct), and then checked how many repeated measures you ran in
> each
> > UO
> > >> and found just 1 - which is also correct. I agree that naming the
> units
> > of
> > >> observation (UO) as 'levels' of the UO variable is a bit odd, should
> > rather
> > >> be 'units of observation'.
> > >>
> > >> The concept of repeated measures is also very often misunderstood: in
> > >> repated measures you do not actually repeat anything, rather you
> perform
> > >> different measurements (treatments) WITHIN a unit of observation - so
> a
> > repated
> > >> measures design is a within UO design. Your subjects just have one
> age,
> > so
> > >> there are no different treatments (levels of the indep variable) per
> > >> subjects and, hence, no 'repeated measures'.
> > >>
> > >> Hope this clarifies terminology for further discussion.
> > >>
> > >> Michael
> > >>
> > >>
> > >> -----Ursprüngliche Nachricht-----
> > >> Von: "jan-mathijs schoffelen"
> > >> Gesendet: Jan 25, 2011 8:57:03 PM
> > >> An: "Email discussion list for the FieldTrip project"
> > >>
> > >> Betreff: Re: [FieldTrip] ft_freqstatistics and FDR-correction
> > >>
> > >> >Hi Patricia,
> > >> >
> > >> >I don't really understand what is going on, but could you try to
> > >> >specify your design only in a single row (design = design(2,:) in
> your
> > >> >case), specify cfg.ivar = 1; and cfg=rmfield(cfg,'uvar'), and see
> how
> > >> >it runs? As such the uvar row is not relevant in an independent
> > >> >samples design.
> > >> >
> > >> >Best,
> > >> >
> > >> >Jan-Mathijs
> > >> >
> > >> >
> > >> >
> > >> >On Jan 25, 2011, at 6:08 PM, Patricia Wollstadt wrote:
> > >> >
> > >> >> Dear all,
> > >> >>
> > >> >> I'm still trying to identify the underlying reason for the issue
> > >> >> described below. I ran the analysis in debug mode (I'm using
> > >> >> Matlab2008b and the Fieldtrip-release from the 16th of January
> 2011)
> > >> >> and found that the matrix 'resample', that is generated in
> > >> >> 'statistics_montecarlo', line 187:
> > >> >>
> > >> >> resample = resampledesign(cfg, design);
> > >> >>
> > >> >> doesn't contain actual permutations of my initial design, but
> rather
> > >> >> sorted rowvectors from 1 to 80 (no of subjects). So (since there
> is
> > >> >> no permutation of the units of observation) the 'randstat' that is
> > >> >> subsequently calculated for each row of the resample-matrix is
> > >> >> always the same.
> > >> >> Is this maybe due to my design and my units of observations
> > >> >> respectively? I am looking at age-dependent variations in resting-
> > >> >> state data, so my UO are 80 subjects, divided into four age
> groups.
> > >> >> The commandline-output of the 'resampledesign'-function is as
> > follows:
> > >> >>
> > >> >> total number of measurements = 80
> > >> >> total number of variables = 2
> > >> >> number of independent variables = 1
> > >> >> number of unit variables = 1
> > >> >> number of within-cell variables = 0
> > >> >> number of control variables = 0
> > >> >> using a permutation resampling approach
> > >> >> repeated measurement in variable 1 over 80 levels
> > >> >> number of repeated measurements in each level is 1 1 1 1 1 1 1 1 1
> 1
> > >> >> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
> 1
> > >> >> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
> 1
> > >> >> 1 1
> > >> >>
> > >> >>
> > >> >> Is this correct? Shouldn't this read 'repeated measurement in
> > >> >> variable 2 over 4 levels' with the number of subjects per group as
> > >> >> repeated measurements within a condition? Still I am pretty sure
> > >> >> about my design matrix, which contains the indices 1 to 80 (for
> all
> > >> >> subjects) in the first row (this is my cfg.uvar) with the
> > >> >> corresponding age groups (1 to 4) in the second row (cfg.ivar, see
> > >> >> my previous email below). I use an 'indepsamplesF'-statistic,
> since
> > >> >> I am comparing between four groups of different subjects (averaged
> > >> >> over trials).
> > >> >>
> > >> >> I hope, I got the settings and my design right. Any suggestions,
> > >> >> whether this is a problem due to wrong configurations in my script
> > >> >> are very welcome.
> > >> >>
> > >> >> Right now I work around this issue by replacing line 279 in
> > >> >> 'statistics_montecarlo':
> > >> >>
> > >> >> tmpdesign = design(:,resample(i,:));
> > >> >>
> > >> >> with:
> > >> >>
> > >> >> tmpdesign = design(:,randperm(size(design,2)));
> > >> >>
> > >> >> creating permutations of my design 'by hand'. Is this acceptable
> or
> > >> >> is there anything I'm maybe missing.
> > >> >>
> > >> >> Thank you very much, kind regards,
> > >> >>
> > >> >> Patricia
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >> -------- Original-Nachricht --------
> > >> >>> Datum: Mon, 24 Jan 2011 17:47:26 +0100
> > >> >>> Von: "Patricia Wollstadt"
> > >> >>> An: fieldtrip at donders.ru.nl
> > >> >>> Betreff: [FieldTrip] ft_freqstatistics and FDR-correction
> > >> >>
> > >> >>> Dear Fieldtrip-users,
> > >> >>>
> > >> >>> I'm currently trying to calculate freqstatistics for four
> > >> >>> experimental
> > >> >>> groups, using the following options:
> > >> >>>
> > >> >>> groupSize=[length(subjects{1}) length(subjects{2})
> > >> >>> length(subjects{3})
> > >> >>> length(subjects{4})];
> > >> >>>
> > >> >>> design = [1:groupSize(1)+groupSize(2)+groupSize(3)+groupSize(4)];
> > >> >>> % 1 to N subjects
> > >> >>> design(2,:) = [ones(1,groupSize(1)) 2*ones(1,groupSize(2))
> > >> >>> 3*ones(1,groupSize(3)) 4*ones(1,groupSize(4))]; % indep var ->
> > >> >>> group membership
> > >> >>>
> > >> >>>
> > >> >>> cfg=[];
> > >> >>> cfg.design=design;
> > >> >>> cfg.uvar = 1;
> > >> >>> cfg.ivar = 2;
> > >> >>> cfg.method = 'montecarlo';
> > >> >>> cfg.statistic = 'indepsamplesF';
> > >> >>> cfg.correctm = 'fdr';
> > >> >>> cfg.numrandomization = 180000;
> > >> >>> cfg.alpha = 0.01/7;
> > >> >>> cfg.tail = 1;
> > >> >>> cfg.design = design;
> > >> >>> cfg.channels = myChannels;
> > >> >>> cfg.avgovertime = 'yes';
> > >> >>> cfg.avgoverfreq = 'yes';
> > >> >>> cfg.frequency = [1 3];
> > >> >>>
> > >> >>> stat = ft_freqstatistics(cfg, group1avg, group2avg, group3avg,
> > >> >>> group4avg);
> > >> >>>
> > >> >>> With these settings, the coputation itself runs fine, but the
> > >> >>> resulting
> > >> >>> 'prob'-matrix contains only zeros (accordingly the 'mask'-matrix
> > >> >>> consists of
> > >> >>> only ones). This would mean, that I found significant effects for
> > all
> > >> >>> channels. Is this possible or rather due to an error somewhere in
> > >> >>> my script? Is
> > >> >>> it likely, that these are 'real' zeroes or rather very small
> > >> >>> values, close
> > >> >>> to zero?
> > >> >>> Any hints and suggestions are very welcome, thank you in advance,
> > >> >>>
> > >> >>> Kind regards
> > >> >>>
> > >> >>> Patricia Wollstadt
> > >> >>>
> > >> >>>
> > >> >>> --
> > >> >>> GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
> > >> >>> gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
> > >> >>> _______________________________________________
> > >> >>> fieldtrip mailing list
> > >> >>> fieldtrip at donders.ru.nl
> > >> >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> > >> >>
> > >> >> --
> > >> >> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> > >> >> belohnen Sie mit bis zu 50,- Euro!
> > https://freundschaftswerbung.gmx.de
> > >> >> _______________________________________________
> > >> >> fieldtrip mailing list
> > >> >> fieldtrip at donders.ru.nl
> > >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> > >> >
> > >> >Dr. J.M. (Jan-Mathijs) Schoffelen
> > >> >Donders Institute for Brain, Cognition and Behaviour,
> > >> >Centre for Cognitive Neuroimaging,
> > >> >Radboud University Nijmegen, The Netherlands
> > >> >J.Schoffelen at donders.ru.nl
> > >> >Telephone: 0031-24-3614793
> > >> >
> > >> >_______________________________________________
> > >> >fieldtrip mailing list
> > >> >fieldtrip at donders.ru.nl
> > >> >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> > >
> > >--
> > >GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
> > >gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
> > >_______________________________________________
> > >fieldtrip mailing list
> > >fieldtrip at donders.ru.nl
> > >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >
--
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
From r.oostenveld at donders.ru.nl Wed Feb 2 10:39:50 2011
From: r.oostenveld at donders.ru.nl (Robert Oostenveld)
Date: Wed, 2 Feb 2011 10:39:50 +0100
Subject: [FieldTrip] toolkit course for MEG and EEG data analysis at the
Donders Institute
Message-ID:
Dear MEG/EEG researchers,
(appologies for multiple postings)
I would like to announce the yearly toolkit course for MEG and EEG
data analysis at the Donders Institute.
This year's toolkit will take place from April 18 to April 21.
Registration is now open. Have a look at http://www.ru.nl/donders/agenda-events/courses/toolkits-2011
for the preliminary programme and to register. Please note that the
number of seats is limited and that participants will be selected
based on the time of registration and on their research background and
motivation.
best regards,
Robert
-----------------------------------------------------------
Robert Oostenveld, PhD
Senior Researcher & MEG Physicist
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Postal Address:
PO Box 9101
6500 HB NIJMEGEN
The Netherlands
Visiting address:
Kapittelweg 29
route: 210, room: 0.88
6525 EN NIJMEGEN
tel.: +31 (0)24 3619695
e-mail: r.oostenveld at donders.ru.nl
web: http://www.ru.nl/neuroimaging
skype: r.oostenveld
-----------------------------------------------------------
From michael.wibral at web.de Thu Feb 3 10:18:17 2011
From: michael.wibral at web.de (Michael Wibral)
Date: Thu, 3 Feb 2011 10:18:17 +0100 (CET)
Subject: [FieldTrip] Problem with permutation testing and FDR correction
Message-ID: <75316985.6251067.1296724697449.JavaMail.fmail@mwmweb054>
Dear Fieldtrip users,
I think we detected an error with FDR correction and permutation testing. When increasing the number of permutations, the number of significant voxels goes DOWN, on the other hand when decreasing the number of permutations the number of significant voxels goes up. In my opinion the relationship should be the other way round. The theoretical background is as follows:
With FDR correction, the best p-value should survive bonferroni correction (if I am not completely mistaken here), the threshold for the other p-values is then decreased successively.
Hence, the p-value assigned to the best (most significant) statistical result plays a crucial role here. This best p-value in permutation tests can never be better than 1/numpermutations, i.e. when I do ten permutations, the best p I can possibly get is 0.1 EVEN IF ALL PERMUTED VALUES ARE LESS EXTREME. So to test with FDR at 275 sensors and 1 timepoint at a threshold of 0.05 we need for anything to get significant a p-value of 0.05/275 = 0.000181818.... to be able to reach this in the best case (remebering that p-values can never be better than 1/numpermutations) we need at least (0.000181818....)^-1 = 5500 permutations. In other words with anything less than this number of permutations we should not be able to get any significances. However, we do in fact get alot of significant values at least in the fieldtrip versions tested up to 16th of January, e.g. in a freqstatistics test on 275 sensors, 50 frequencies and 26 timepoints I get 20760 significant voxels using only 10 permutations (!!). I assume that in the stats module the p-value is simply taken as the fraction of permutations that was more extreme than the actual value. This is correct as long as this fraction is not 0. In the case of a 0 fraction, however, this "0" should be replaced by "1/numpermutations", otherwise you get everything signifcant by just using 10 permutations. An alternative would be to issue an ERROR that the number of permutations is insufficient to perform the desired test with fdr correction.
Example: for 4300 source points at 0.05 the number of permutations should at least be (0.05/4300)^-1=86000.
For now one should compute the p-value for a bonferroni correction manually, invert this value and take the resulting number as the number of permutations to be at least mathematically on the safe side (practically it seems to be advisable to multiply by another factor of 100 to have stable results, e.g 2000 permutations for uncorrceted testing at 0.05)
Please disregard this mail if you are sure that this behaviour has been fixed in the latest fieldtrip (past 16th of January) versions.
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 637 bytes
Desc: not available
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 637 bytes
Desc: not available
URL:
From e.maris at donders.ru.nl Thu Feb 3 11:24:18 2011
From: e.maris at donders.ru.nl (Eric Maris)
Date: Thu, 3 Feb 2011 11:24:18 +0100
Subject: [FieldTrip] Problem with permutation testing and FDR correction
In-Reply-To: <75316985.6251067.1296724697449.JavaMail.fmail@mwmweb054>
References: <75316985.6251067.1296724697449.JavaMail.fmail@mwmweb054>
Message-ID: <018d01cbc38c$869a7ba0$93cf72e0$@maris@donders.ru.nl>
Dear Michael,
Thank you for pointing this out. The origin of the problem is that FT calculates Monte Carlo estimates of the p-values. In practice there is no other way, except for very small studies where enumeration is possible. However, Monte Carlo estimates are useless if the number of draws from the permutation distribution (numpermutations) is very small, because in that case their Monte Carlo confidence interval is very large.
I propose that we add a Monte Carlo confidence interval for all Monte Carlo p-values that FT calculates. This is actually very easy, and I have described it in a paper together with Jan-Matthijs Schoffelen and Pascal Fries (JNeuroMeth, 2007). It just hasn't found its way into FT yet. I will discuss with Robert how to implement this.
Best,
Eric Maris
dr. Eric Maris
Donders Institute for Brain, Cognition and Behavior
Radboud University
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
T:+31 24 3612651
Mobile: 06 39584581
F:+31 24 3616066
mailto:e.maris at donders.ru.nl
http://www.nphyscog.com/
> -----Original Message-----
> From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-
> bounces at donders.ru.nl] On Behalf Of Michael Wibral
> Sent: donderdag 3 februari 2011 10:18
> To: fieldtrip at donders.ru.nl
> Subject: [FieldTrip] Problem with permutation testing and FDR
> correction
>
> Dear Fieldtrip users,
>
> I think we detected an error with FDR correction and permutation
> testing. When increasing the number of permutations, the number of
> significant voxels goes DOWN, on the other hand when decreasing the
> number of permutations the number of significant voxels goes up. In my
> opinion the relationship should be the other way round. The theoretical
> background is as follows:
>
> With FDR correction, the best p-value should survive bonferroni
> correction (if I am not completely mistaken here), the threshold for
> the other p-values is then decreased successively.
> Hence, the p-value assigned to the best (most significant) statistical
> result plays a crucial role here. This best p-value in permutation
> tests can never be better than 1/numpermutations, i.e. when I do ten
> permutations, the best p I can possibly get is 0.1 EVEN IF ALL PERMUTED
> VALUES ARE LESS EXTREME. So to test with FDR at 275 sensors and 1
> timepoint at a threshold of 0.05 we need for anything to get
> significant a p-value of 0.05/275 = 0.000181818.... to be able to reach
> this in the best case (remebering that p-values can never be better
> than 1/numpermutations) we need at least (0.000181818....)^-1 = 5500
> permutations. In other words with anything less than this number of
> permutations we should not be able to get any significances. However,
> we do in fact get alot of significant values at least in the fieldtrip
> versions tested up to 16th of January, e.g. in a freqstatistics test on
> 275 sensors, 50 frequencies and 26 timepoints I get 20760 significant
> voxels using only 10 permutations (!!). I assume that in the stats
> module the p-value is simply taken as the fraction of permutations that
> was more extreme than the actual value. This is correct as long as this
> fraction is not 0. In the case of a 0 fraction, however, this "0"
> should be replaced by "1/numpermutations", otherwise you get everything
> signifcant by just using 10 permutations. An alternative would be to
> issue an ERROR that the number of permutations is insufficient to
> perform the desired test with fdr correction.
>
>
> Example: for 4300 source points at 0.05 the number of permutations
> should at least be (0.05/4300)^-1=86000.
>
> For now one should compute the p-value for a bonferroni correction
> manually, invert this value and take the resulting number as the number
> of permutations to be at least mathematically on the safe side
> (practically it seems to be advisable to multiply by another factor of
> 100 to have stable results, e.g 2000 permutations for uncorrceted
> testing at 0.05)
>
> Please disregard this mail if you are sure that this behaviour has been
> fixed in the latest fieldtrip (past 16th of January) versions.
>
> Michael
From H.Rossiter at ion.ucl.ac.uk Thu Feb 3 15:25:59 2011
From: H.Rossiter at ion.ucl.ac.uk (Holly Rossiter)
Date: Thu, 3 Feb 2011 14:25:59 -0000
Subject: [FieldTrip] EMG data
Message-ID: <002601cbc3ae$47118f10$d534ad30$@Rossiter@ion.ucl.ac.uk>
Dear Fieldtrip,
I am new to fieldtrip and am using it to look at MEG-EMG coherence. I am
trying to load in my EMG data which is in a separate data file to the MEG.
It is made up of 3 files (.eeg, .vhdr and .vmrk). I am trying to follow the
coherence tutorial I previously downloaded from your website but I'm not
able to define trials despite there being triggers present.
Here are my attempts to load in the data with the following error...
cfg = [];
cfg.trialfun = 'trialfun_general';
cfg.trialdef.eventtype = '1';
cfg.trialdef.eventvalue = [1 1];
cfg.trialdef.prestim = 1;
cfg.trialdef.poststim = 2;
cfg.dataset = 'sf_EMG.eeg';
cfg = ft_definetrial(cfg);
evaluating trialfunction 'trialfun_general'
reading the events from 'sf_EMG.vhdr'
??? Error using ==> ft_definetrial at 136
no trials were defined, see DEFINETRIAL for help
What do you suggest is the problem? Is it not reading the triggers
correctly?
Thanks,
Holly
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jan.schoffelen at donders.ru.nl Thu Feb 3 16:09:16 2011
From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen)
Date: Thu, 3 Feb 2011 16:09:16 +0100
Subject: [FieldTrip] EMG data
In-Reply-To: <002601cbc3ae$47118f10$d534ad30$%Rossiter@ion.ucl.ac.uk>
References: <002601cbc3ae$47118f10$d534ad30$%Rossiter@ion.ucl.ac.uk>
Message-ID:
Dear Holly
You may want to have a look at:
http://fieldtrip.fcdonders.nl/example/getting_started_with_reading_raw_eeg_or_meg_data?s
[]=event
To me it sounds as if you have an incorrect specification of your cfg.
Good luck,
Jan-Mathijs
On Feb 3, 2011, at 3:25 PM, Holly Rossiter wrote:
> Dear Fieldtrip,
>
> I am new to fieldtrip and am using it to look at MEG-EMG coherence.
> I am trying to load in my EMG data which is in a separate data file
> to the MEG. It is made up of 3 files (.eeg, .vhdr and .vmrk). I am
> trying to follow the coherence tutorial I previously downloaded from
> your website but I’m not able to define trials despite there being
> triggers present.
>
> Here are my attempts to load in the data with the following error...
>
> cfg = [];
> cfg.trialfun = 'trialfun_general';
> cfg.trialdef.eventtype = '1';
> cfg.trialdef.eventvalue = [1 1];
> cfg.trialdef.prestim = 1;
> cfg.trialdef.poststim = 2;
> cfg.dataset = 'sf_EMG.eeg';
> cfg = ft_definetrial(cfg);
> evaluating trialfunction 'trialfun_general'
> reading the events from 'sf_EMG.vhdr'
> ??? Error using ==> ft_definetrial at 136
> no trials were defined, see DEFINETRIAL for help
>
> What do you suggest is the problem? Is it not reading the triggers
> correctly?
>
> Thanks,
>
> Holly
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
Dr. J.M. (Jan-Mathijs) Schoffelen
Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
Telephone: 0031-24-3614793
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From l.frei at psy.gla.ac.uk Thu Feb 3 19:07:44 2011
From: l.frei at psy.gla.ac.uk (Luisa Frei)
Date: Thu, 3 Feb 2011 18:07:44 +0000
Subject: [FieldTrip] =?utf-8?q?problem_with_ft=5Fmultiplot_and_planar_grad?=
=?utf-8?b?aWVudCAg77+8?=
In-Reply-To: <002601cbc3ae$47118f10$d534ad30$@Rossiter@ion.ucl.ac.uk>
References: <002601cbc3ae$47118f10$d534ad30$@Rossiter@ion.ucl.ac.uk>
Message-ID: <9342E823-7571-408D-89AB-FF826DF77CF4@psy.gla.ac.uk>
Hi everybody,
I have a problem that impacts several analysis steps and I'm hoping
someone can point me to the right direction.
I have 13 recording sessions, that I want to average, and then I want
to compute the planar gradients of the average. I first average the
sessions with ft_timelockanalysis for each session. Then I use
ft_timelockgrandaverage to combine the sessions.
Then, just to check the data, I plot the ERFs with ft_multiplotER.
This is when the first problem arises. The x and y axes of the plots
are shifted in space somehow (see picture 3.png).
Next, I compute the planar gradients. When I plot the topographies
for the planar gradient, I get a very strange activation pattern,
that has nothing to do with the ERF topography (which, btw has no
obvious flaws) and I also get several warnings when I make the plot
(Picture4.png).
I also know for a fact that the grand average planar gradient should
look different, as I computed it once before by hand, and it looked
much more sensible.
If anyone has ever seen this before and can give me a hint as to
where to look for the error, I would be very grateful.
Luisa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture 4.png
Type: application/applefile
Size: 73 bytes
Desc: not available
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture 4.png
Type: image/png
Size: 8160 bytes
Desc: not available
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture 3.png
Type: application/applefile
Size: 73 bytes
Desc: not available
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture 3.png
Type: image/png
Size: 43112 bytes
Desc: not available
URL:
-------------- next part --------------
From jan.schoffelen at donders.ru.nl Thu Feb 3 20:29:04 2011
From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen)
Date: Thu, 3 Feb 2011 20:29:04 +0100
Subject: [FieldTrip]
=?utf-8?q?problem_with_ft=5Fmultiplot_and_planar_grad?=
=?utf-8?b?aWVudCAg77+8?=
In-Reply-To: <9342E823-7571-408D-89AB-FF826DF77CF4@psy.gla.ac.uk>
References: <002601cbc3ae$47118f10$d534ad30$%Rossiter@ion.ucl.ac.uk>
<9342E823-7571-408D-89AB-FF826DF77CF4@psy.gla.ac.uk>
Message-ID:
Dear Luisa,
Could you please specify whether this is a new problem that didn't
occur before? If you didn't have problems before, approximately when
did it stop working the way you expected it to work?
As to the multiplot problem: To me, it seems as if the y-axis is
plotted at time point 0, which is indeed far away from your latency of
interest, which is (surprise) between 0.14 and 0.18 s. This is a
property of multiplotER, which by default plots the x and y axes.
Should be possible to switch it off.
As to the topoplot problem: difficult to say without additional info /
data to reproduce the problem. I assume you have used ft_combineplanar
first before attempting to plot the planar gradient representation?
Did everything go well in the previous steps, i.e. proper baseline
correction etc, prior to timelockanalysis? Be sure also to not use the
baseline-correction option for the plotting in ft_topoplotER.
Best wishes,
Jan-Mathijs
On Feb 3, 2011, at 7:07 PM, Luisa Frei wrote:
> Hi everybody,
> I have a problem that impacts several analysis steps and I'm hoping
> someone can point me to the right direction.
>
> I have 13 recording sessions, that I want to average, and then I
> want to compute the planar gradients of the average. I first average
> the sessions with ft_timelockanalysis for each session. Then I use
> ft_timelockgrandaverage to combine the sessions.
> Then, just to check the data, I plot the ERFs with ft_multiplotER.
> This is when the first problem arises. The x and y axes of the plots
> are shifted in space somehow (see picture 3.png).
> Next, I compute the planar gradients. When I plot the topographies
> for the planar gradient, I get a very strange activation pattern,
> that has nothing to do with the ERF topography (which, btw has no
> obvious flaws) and I also get several warnings when I make the plot
> (Picture4.png).
>
> I also know for a fact that the grand average planar gradient should
> look different, as I computed it once before by hand, and it looked
> much more sensible.
>
> If anyone has ever seen this before and can give me a hint as to
> where to look for the error, I would be very grateful.
>
> Luisa
>
>
>
>
>