From dimitri.papadopoulos at CEA.FR Tue Sep 1 01:36:49 2009 From: dimitri.papadopoulos at CEA.FR (Dimitri Papadopoulos-Orfanos) Date: Tue, 1 Sep 2009 01:36:49 +0200 Subject: fileio/README Message-ID: Hi, From fieldtrip-20090831/fileio/README: The following files were downloaded from http://www.koders.com/ base64.c base64.h I cannot find these files anywhere. Have they been removed? Has the source code been integrated elsewhere? Regards, -- Dimitri Papadopoulos CEA, I2BM, NeuroSpin 91191 Gif-sur-Yvette cedex, France ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4743 bytes Desc: S/MIME Cryptographic Signature URL: From dimitri.papadopoulos at CEA.FR Tue Sep 1 01:55:48 2009 From: dimitri.papadopoulos at CEA.FR (Dimitri Papadopoulos-Orfanos) Date: Tue, 1 Sep 2009 01:55:48 +0200 Subject: 64-bit Linux Message-ID: Hi, I'm planning the deployment of Fieldtrip on 64-bit Linux machines. I have compared the availability of 32-bit and 64-bit Linux MEX files. Some MEX files are 32-bit only, for example: external/biosig/mexSLOAD.mexglx external/eeprobe/read_eep_avr.mexglx external/eeprobe/read_eep_cnt.mexglx private/ltrisect.mexglx private/ptriproj.mexglx classification/toolboxes/gerven/bayesbrain/utilities/myrepmat.mexglx classification/toolboxes/gerven/gmrflab/fastinv.mexglx classification/toolboxes/gerven/gmrflab/fastinvex.mexglx [...] classification/toolboxes/external/gpml-matlab/gpml/sq_dist.mexglx classification/toolboxes/external/libsvm-mat-2.87-1/read_sparse.mexglx [...] Then some MEX files are 64-bit only, some probably on purpose: @uint64/abs.mexa64 fileio/@uint64/abs.mexa64 and some probably not: external/bci2000/load_bcidat.mexa64 fileio/private/mxDeserialize.mexa64 Might the 64-bit (or 32-bit) version miss functionality? Should we compile 64-bit (or 32-bit) MEX files when source files are available? Regards, -- Dimitri Papadopoulos CEA, I2BM, NeuroSpin 91191 Gif-sur-Yvette cedex, France ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4743 bytes Desc: S/MIME Cryptographic Signature URL: From dimitri.papadopoulos at CEA.FR Tue Sep 1 03:00:36 2009 From: dimitri.papadopoulos at CEA.FR (Dimitri Papadopoulos-Orfanos) Date: Tue, 1 Sep 2009 03:00:36 +0200 Subject: compile the mex file on the fly Message-ID: Hi, I see a few FieldTrip files attempt to compile MEX files on the fly. For example @uint64/abs.m: % determine the name and full path of this function funname = mfilename('fullpath'); mexsrc = [funname '.c']; [mexdir, mexname] = fileparts(funname); try % try to compile the mex file on the fly warning('trying to compile MEX file from %s', mexsrc); cd(mexdir); mex(mexsrc); I fear this may fail when FieldTrip is installed on an application server and run by users who cannot write into the FieldTrip directory. I understand this is a reasonable fallback for exotic platforms which lack the proper MEX file. It is also a good way to always have the MEX file rebuilt after a change in the associated C file. Unfortunately it also breaks FieldTrip installations on application servers - quite common on 32-bit or 64-bit Linux using NFS. Making MEX files available for such common platforms would fix this issue, wouldn't it? Also see my previous "64-bit Linux" message. I hope I'm not completely misunderstanding the issue at hand. Here is a list of Matlab files which call mex() and their associated C and MEX files: @uint64/max.m @uint64/max.c @uint64/max.mexa64 @uint64/max.mexglx @uint64/max.mexmac @uint64/max.mexmaci @uint64/max.mexw32 @uint64/min.m @uint64/min.c @uint64/min.mexa64 @uint64/min.mexglx @uint64/min.mexmac @uint64/min.mexmaci @uint64/min.mexw32 @uint64/minus.m @uint64/minus.c @uint64/minus.mexa64 @uint64/minus.mexglx @uint64/minus.mexmac @uint64/minus.mexmaci @uint64/minus.mexw32 @uint64/plus.m @uint64/plus.c @uint64/plus.mexa64 @uint64/plus.mexglx @uint64/plus.mexmac @uint64/plus.mexmaci @uint64/plus.mexw32 @uint64/rdivide.m @uint64/rdivide.c @uint64/rdivide.mexa64 @uint64/rdivide.mexglx @uint64/rdivide.mexmac @uint64/rdivide.mexmaci @uint64/rdivide.mexw32 @uint64/times.m @uint64/times.c @uint64/times.mexa64 @uint64/times.mexglx @uint64/times.mexmac @uint64/times.mexmaci @uint64/times.mexw32 @uint64/abs.m @uint64/abs.c @uint64/abs.mexa64 @uint64/abs.mexmaci fileio/private/mxDeserialize.m fileio/private/mxDeserialize.c fileio/private/mxDeserialize.mexa64 fileio/private/mxDeserialize.mexmac fileio/private/mxDeserialize.mexw32 fileio/private/mxSerialize.m fileio/private/mxSerialize.c fileio/private/mxSerialize.mexa64 fileio/private/mxSerialize.mexglx fileio/private/mxSerialize.mexmac fileio/private/mxSerialize.mexw32 fileio/private/read_24bit.m fileio/private/read_24bit.c fileio/private/read_24bit.mexa64 fileio/private/read_24bit.mexglx fileio/private/read_24bit.mexmac fileio/private/read_24bit.mexmaci fileio/private/read_24bit.mexw32 fileio/private/read_ctf_shm.m fileio/private/read_ctf_shm.c fileio/private/read_ctf_shm.mexa64 fileio/private/read_ctf_shm.mexglx fileio/private/read_ctf_shm.mexmaci fileio/private/write_ctf_shm.m fileio/private/write_ctf_shm.c fileio/private/write_ctf_shm.mexa64 fileio/private/write_ctf_shm.mexglx fileio/private/write_ctf_shm.mexmaci forwinv/private/meg_leadfield1.m forwinv/private/meg_leadfield1.c forwinv/private/meg_leadfield1.mexa64 forwinv/private/meg_leadfield1.mexglx forwinv/private/meg_leadfield1.mexmac forwinv/private/meg_leadfield1.mexmaci forwinv/private/meg_leadfield1.mexw32 forwinv/private/plgndr.m forwinv/private/plgndr.c forwinv/private/plgndr.mexa64 forwinv/private/plgndr.mexglx forwinv/private/plgndr.mexmac forwinv/private/plgndr.mexmaci forwinv/private/plgndr.mexw32 private/write_ctf_shm.m private/read_ctf_shm.m private/meg_leadfield1.m private/meg_leadfield1.c private/meg_leadfield1.mexa64 private/meg_leadfield1.mexglx private/meg_leadfield1.mexmac private/meg_leadfield1.mexmaci private/meg_leadfield1.mexw32 private/splint_gh.m private/splint_gh.c private/splint_gh.mexa64 private/splint_gh.mexglx private/splint_gh.mexmac private/splint_gh.mexmaci private/splint_gh.mexw32 private/read_24bit.m private/read_24bit.c private/read_24bit.mexa64 private/read_24bit.mexglx private/read_24bit.mexmac private/read_24bit.mexmaci private/read_24bit.mexw32 private/plgndr.m private/plgndr.c private/plgndr.mexa64 private/plgndr.mexglx private/plgndr.mexmac private/plgndr.mexmaci private/plgndr.mexw32 classification/utilities/repop/repop.m classification/utilities/repop/repop.c classification/utilities/repop/repop.mexglx classification/utilities/tprod/tprod.m classification/utilities/tprod/tprod.c classification/utilities/tprod/tprod.mexglx @config/private/deepcopy.m @config/private/deepcopy.c @config/private/deepcopy.mexa64 @config/private/deepcopy.mexglx @config/private/deepcopy.mexmac @config/private/deepcopy.mexmaci @config/private/increment.m @config/private/increment.c @config/private/increment.mexa64 @config/private/increment.mexglx @config/private/increment.mexmac @config/private/increment.mexmaci @config/private/reset.m @config/private/reset.c @config/private/reset.mexa64 @config/private/reset.mexglx @config/private/reset.mexmac @config/private/reset.mexmaci A few remarks: 1. Files private/write_ctf_shm.m and private/read_ctf_shm.m are duplicates of fileio/private/read_ctf_shm.m and fileio/private/read_ctf_shm.m and they are missing associated C files. They are therefore broken. Shouldn't they be deleted? 2. I've left out all files in fileio/@uint64/ since they directory is identical to: @uint64/ 3. When a *.c file is changed, does your distribution process rebuild relevant MEX files before distribution? I guess not... In which case all users using FieldTrip from an application server may be using outdated MEX files. Regards, -- Dimitri Papadopoulos CEA, I2BM, NeuroSpin 91191 Gif-sur-Yvette cedex, France ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4743 bytes Desc: S/MIME Cryptographic Signature URL: From j.schoffelen at PSY.GLA.AC.UK Tue Sep 1 11:09:53 2009 From: j.schoffelen at PSY.GLA.AC.UK (Jan-Mathijs Schoffelen) Date: Tue, 1 Sep 2009 09:09:53 +0000 Subject: freqdescriptives/statistics Message-ID: Dear Dahlia, Hemant Bokil indeed uses the jackknife to obtain variance estimates of power (and coherence), see also for example his 2007 paper in J.Neurosci.Methods. More specifically, if your data is 'well-behaved', he has shown that by applying a specific correction to the power estimate, in combination of the jackknife, generates a test-statistic from a differential (i.e. contrast) power spectrum which has a standard normal distribution (i.e. the jackknife estimate of the variance is expected to be 1 and the estimate of the mean 0). Unfortunately, MEG data is hardly ever well-behaved, so we prefer to use non-parametric techniques to do statistical inference. Freqdescriptives in this respect still historically has the option of computing a jackknife estimate of the SEM of the powerspectrum/ coherencespectrum, which can be used to compute a T-statistic across two conditions for example. However, I you would choose this path, you have to write some code which does this, because it is not in fieldtrip. The biascorrect option has been taken out altogether as far as I can see, (and had been designed only to correct the bias in the coherence spectra, and not in the power spectra if I remember correctly), and any reference in the documentation should be removed. Unfortunately, we did not yet have time to considerably clean up freqdescriptives, but this is quite high on the developer's to do list. The bottom line is: ignore biascorrect, and if you use the jackknife estimate of the SEM, you have to come up with some code of your own. Alternatively, you could look into freqstatistics and use cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do statistical inference. Best, Jan-Mathijs On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > Hi all, > > Is there a more detailed explanation of usage for the jackknife and > biascorrect options for freqdescriptives than the one in the > freqdescriptives reference page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? > > More specifically, are these options related to Bokil et al NeuroIm > 2007? How should they be employed to determine significance of > difference between conditions? (Is there somewhere a tutorial for > the use of these options analogous to the one about cluster-based > permutation testing?) > > Also, for the permutation analysis of TFRs (http://fieldtrip.fcdonders.nl/tutorial/statistics?s > []=freqstatistics), if I don't want to employ the planar gradient > step (what exactly IS combineplanar? sorry I couldn't find it), can > I simply skip it and calculate the TFRs of the raw sensor data? > > Many thanks! > Dahlia. > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gsudre at POBOX.COM Tue Sep 1 21:16:13 2009 From: gsudre at POBOX.COM (Gustavo Sudre) Date: Tue, 1 Sep 2009 15:16:13 -0400 Subject: Neuromag coordinate frames Message-ID: Hello, I have a question about the transformation matrix used when reading in Neuromag FIF MRI files. Looking at the read_mri function, the matrix stored in hdr.trans.trans by MNE toolbox is copied to mri.transform. The fieldtrip wiki says that the matrix in mri.transform transforms from the native voxel-coordinate system of the MRI to the head coordinate system. However, the matrix stored in hdr.trans.trans goes from 4 to 5 (as seen in mri.hdr.trans), which means from head to MRI. So, shouldn't mri.transform = inv(hdr.trans.trans)? Please let me know if I'm mistaken on how the coordinate systems interact in these toolboxes. Thank you, Gus ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From dahliash at STANFORD.EDU Wed Sep 2 00:40:24 2009 From: dahliash at STANFORD.EDU (Dahlia Sharon) Date: Wed, 2 Sep 2009 00:40:24 +0200 Subject: freqdescriptives/statistics Message-ID: Thanks Jan-Mathijs for that useful reply. Regarding permutation analysis, we're running into some difficulty understanding what the code does. Could you clarify these points? 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate layout file (all channels). Does fieldtrip take into account which channels are gradiometers and which magnetometers when it calculates adjacency for clustering? 2. How does fieldtrip calculate adjacency for channels? (time and frequency are obvious...) 3. How is the clustering performed? We're getting a significant cluster but it doesn't look like a single blob in the time-frequency domain (averaging over sensors) but like two very distant blobs, which is very strange... On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen wrote: >Dear Dahlia, > >Hemant Bokil indeed uses the jackknife to obtain variance estimates of >power (and coherence), see also for example his 2007 paper in >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', >he has shown that by applying a specific correction to the power >estimate, in combination of the jackknife, generates a test-statistic >from a differential (i.e. contrast) power spectrum which has a >standard normal distribution (i.e. the jackknife estimate of the >variance is expected to be 1 and the estimate of the mean 0). >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to >use non-parametric techniques to do statistical inference. >Freqdescriptives in this respect still historically has the option of >computing a jackknife estimate of the SEM of the powerspectrum/ >coherencespectrum, which can be used to compute a T-statistic across >two conditions for example. However, I you would choose this path, you >have to write some code which does this, because it is not in >fieldtrip. The biascorrect option has been taken out altogether as far >as I can see, (and had been designed only to correct the bias in the >coherence spectra, and not in the power spectra if I remember >correctly), and any reference in the documentation should be removed. >Unfortunately, we did not yet have time to considerably clean up >freqdescriptives, but this is quite high on the developer's to do list. >The bottom line is: ignore biascorrect, and if you use the jackknife >estimate of the SEM, you have to come up with some code of your own. >Alternatively, you could look into freqstatistics and use >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do >statistical inference. > >Best, > >Jan-Mathijs > > >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > >> Hi all, >> >> Is there a more detailed explanation of usage for the jackknife and >> biascorrect options for freqdescriptives than the one in the >> freqdescriptives reference page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? >> >> More specifically, are these options related to Bokil et al NeuroIm >> 2007? How should they be employed to determine significance of >> difference between conditions? (Is there somewhere a tutorial for >> the use of these options analogous to the one about cluster-based >> permutation testing?) >> >> Also, for the permutation analysis of TFRs (http://fieldtrip.fcdonders.nl/tutorial/statistics?s >> []=freqstatistics), if I don't want to employ the planar gradient >> step (what exactly IS combineplanar? sorry I couldn't find it), can >> I simply skip it and calculate the TFRs of the raw sensor data? >> >> Many thanks! >> Dahlia. >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> http://listserv.surfnet.nl/archives/fieldtrip.html >> http://www.ru.nl/fcdonders/fieldtrip/ > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of >the FieldTrip toolbox, to share experiences and to discuss new ideas >for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ > > > > > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Wed Sep 2 09:47:33 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 2 Sep 2009 09:47:33 +0200 Subject: freqdescriptives/statistics (spatial clustering for planar gradiometers and magnetometers __ Neuromag) In-Reply-To: Message-ID: Hi Dahlia, My name is Eric Maris and, together with Robert Oostenveld, I implemented the permutation statistics in Fieldtrip. > 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate > layout file (all channels). Does fieldtrip take into account which channels > are gradiometers and which magnetometers when it calculates adjacency for > clustering? > > 2. How does fieldtrip calculate adjacency for channels? (time and frequency > are obvious...) > > 3. How is the clustering performed? > > We're getting a significant cluster but it doesn't look like a single blob > in the time-frequency domain (averaging over sensors) but like two very > distant blobs, which is very strange... These are important points. As far as I know, you are the first to use the cluster-based permutation tests on Neuromag data. This means that you have to do some more work than the people who work with a system that only has axial gradiometers (like the CTF system). For axial gradiometers, Fieldtrip can calculate the adjacency in a straightforward way, using the positions of the coils in the helmet. Working with planar gradiometers and magnetometers, you have to define yourself the adjacency structure for the channels in your system (both gradiometers and magnetomers). Fieldtrip doesn't care about the way you define adjacency. You can give Fieldtrip any adjacency structure via the configuration field cfg.neighbours. (Type "help neighbourselection" to get info about how to define and adjacency structure.) Defining adjacency on planar gradiometers requires some thinking. Things become easier if you (1) ignore the magnetometers, and (2) sum the power at the pairs of orthogonal planar gradiometers. This maps the data on a new set of channels for which adjacency is defined in a straightforward way. (Of course, you may also decide to retain the orientation information in your original planar gradiometers, but than you have to come up with a sensible definition of adjacency that takes this orientation information into account.) Finally, a minor point, do not start with cluster-based permutation tests with both time and frequency resolution. If you are interested in oscillations, only keep the frequency resolution in you first analyses. You can later add the time axis if you want to know how the effect develops over time. Good luck, Eric dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 E: e.maris at donders.ru.nl MSc Cognitive Neuroscience: www.ru.nl/master/cns/ > > On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen > wrote: > > >Dear Dahlia, > > > >Hemant Bokil indeed uses the jackknife to obtain variance estimates of > >power (and coherence), see also for example his 2007 paper in > >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', > >he has shown that by applying a specific correction to the power > >estimate, in combination of the jackknife, generates a test-statistic > >from a differential (i.e. contrast) power spectrum which has a > >standard normal distribution (i.e. the jackknife estimate of the > >variance is expected to be 1 and the estimate of the mean 0). > >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to > >use non-parametric techniques to do statistical inference. > >Freqdescriptives in this respect still historically has the option of > >computing a jackknife estimate of the SEM of the powerspectrum/ > >coherencespectrum, which can be used to compute a T-statistic across > >two conditions for example. However, I you would choose this path, you > >have to write some code which does this, because it is not in > >fieldtrip. The biascorrect option has been taken out altogether as far > >as I can see, (and had been designed only to correct the bias in the > >coherence spectra, and not in the power spectra if I remember > >correctly), and any reference in the documentation should be removed. > >Unfortunately, we did not yet have time to considerably clean up > >freqdescriptives, but this is quite high on the developer's to do list. > >The bottom line is: ignore biascorrect, and if you use the jackknife > >estimate of the SEM, you have to come up with some code of your own. > >Alternatively, you could look into freqstatistics and use > >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do > >statistical inference. > > > >Best, > > > >Jan-Mathijs > > > > > >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > > > >> Hi all, > >> > >> Is there a more detailed explanation of usage for the jackknife and > >> biascorrect options for freqdescriptives than the one in the > >> freqdescriptives reference > page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? > >> > >> More specifically, are these options related to Bokil et al NeuroIm > >> 2007? How should they be employed to determine significance of > >> difference between conditions? (Is there somewhere a tutorial for > >> the use of these options analogous to the one about cluster-based > >> permutation testing?) > >> > >> Also, for the permutation analysis of TFRs > (http://fieldtrip.fcdonders.nl/tutorial/statistics?s > >> []=freqstatistics), if I don't want to employ the planar gradient > >> step (what exactly IS combineplanar? sorry I couldn't find it), can > >> I simply skip it and calculate the TFRs of the raw sensor data? > >> > >> Many thanks! > >> Dahlia. > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > >> of the FieldTrip toolbox, to share experiences and to discuss new > >> ideas for MEG and EEG analysis. > >> http://listserv.surfnet.nl/archives/fieldtrip.html > >> http://www.ru.nl/fcdonders/fieldtrip/ > > > >---------------------------------- > > > >The aim of this list is to facilitate the discussion between users of > >the FieldTrip toolbox, to share experiences and to discuss new ideas > >for MEG and EEG analysis. > > > >http://listserv.surfnet.nl/archives/fieldtrip.html > > > >http://www.ru.nl/fcdonders/fieldtrip/ > > > > > > > > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Wed Sep 2 10:56:27 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Wed, 2 Sep 2009 10:56:27 +0200 Subject: megpalnar.m and statistical testing Message-ID: Dear Fieldtrip developers & users, I have some questions regarding planar gradiometers and averaging / statistical testing in fieldtrip and in general: Computing the vector valued gradient of the field is a linear operation and - as such - fully exchangeable with any kind of other linear operation such as averaging over trials, subjects and computing differences between conditions. This obviously does not hold for the pythagoras-like computation of the gradient vector's magnitude, because this is a non-linear operation. As an example think of to sources in two subjects that are (roughly) in the same spot (sulcus) but, say, on opposing walls of this said sulcus. Therefore, the fields in these two subjects will have opposing signs. As a consequence their fileds will cancel in the average over subjects - as it should be, perhaps, because they are not the same source but represent individual variance. If I now take the planar gradient magnitude using megplanar and combineplanar in each subject these two sources will be in the same spot on the scalp and with the same sign (because magnitude is confined between 0 and +INF) and will not cancel. This is different from taking the planar gradient's magnitude after averaging - this latter planar gradient amplitude will be close to zero. So far this is not surprising as taking the magnitude is a nonlinear operation and not permuatble with linear operations. My question is whether there any advice on where an when combineplanar should be used? Or would recommend it just for visualization purposes? Thanks you very much for your help, Michael > -----Ursprüngliche Nachricht----- > Von: "Eric Maris" > Gesendet: 02.09.09 09:52:37 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] freqdescriptives/statistics (spatial clustering for planar gradiometers and magnetometers __ Neuromag) > Hi Dahlia, > > > My name is Eric Maris and, together with Robert Oostenveld, I implemented > the permutation statistics in Fieldtrip. > > > 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate > > layout file (all channels). Does fieldtrip take into account which > channels > > are gradiometers and which magnetometers when it calculates adjacency for > > clustering? > > > > 2. How does fieldtrip calculate adjacency for channels? (time and > frequency > > are obvious...) > > > > 3. How is the clustering performed? > > > > We're getting a significant cluster but it doesn't look like a single blob > > in the time-frequency domain (averaging over sensors) but like two very > > distant blobs, which is very strange... > > These are important points. As far as I know, you are the first to use the > cluster-based permutation tests on Neuromag data. This means that you have > to do some more work than the people who work with a system that only has > axial gradiometers (like the CTF system). For axial gradiometers, Fieldtrip > can calculate the adjacency in a straightforward way, using the positions of > the coils in the helmet. Working with planar gradiometers and magnetometers, > you have to define yourself the adjacency structure for the channels in your > system (both gradiometers and magnetomers). Fieldtrip doesn't care about the > way you define adjacency. You can give Fieldtrip any adjacency structure via > the configuration field cfg.neighbours. (Type "help neighbourselection" to > get info about how to define and adjacency structure.) > > Defining adjacency on planar gradiometers requires some thinking. Things > become easier if you (1) ignore the magnetometers, and (2) sum the power at > the pairs of orthogonal planar gradiometers. This maps the data on a new set > of channels for which adjacency is defined in a straightforward way. (Of > course, you may also decide to retain the orientation information in your > original planar gradiometers, but than you have to come up with a sensible > definition of adjacency that takes this orientation information into > account.) > > Finally, a minor point, do not start with cluster-based permutation tests > with both time and frequency resolution. If you are interested in > oscillations, only keep the frequency resolution in you first analyses. You > can later add the time axis if you want to know how the effect develops over > time. > > > Good luck, > > Eric > > > dr. Eric Maris > Donders Institute for Brain, Cognition and Behavior > Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging > Radboud University > P.O. Box 9104 > 6500 HE Nijmegen > The Netherlands > T:+31 24 3612651 > Mobile: 06 39584581 > F:+31 24 3616066 > E: e.maris at donders.ru.nl > > MSc Cognitive Neuroscience: www.ru.nl/master/cns/ > > > > > > > > On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen > > wrote: > > > > >Dear Dahlia, > > > > > >Hemant Bokil indeed uses the jackknife to obtain variance estimates of > > >power (and coherence), see also for example his 2007 paper in > > >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', > > >he has shown that by applying a specific correction to the power > > >estimate, in combination of the jackknife, generates a test-statistic > > >from a differential (i.e. contrast) power spectrum which has a > > >standard normal distribution (i.e. the jackknife estimate of the > > >variance is expected to be 1 and the estimate of the mean 0). > > >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to > > >use non-parametric techniques to do statistical inference. > > >Freqdescriptives in this respect still historically has the option of > > >computing a jackknife estimate of the SEM of the powerspectrum/ > > >coherencespectrum, which can be used to compute a T-statistic across > > >two conditions for example. However, I you would choose this path, you > > >have to write some code which does this, because it is not in > > >fieldtrip. The biascorrect option has been taken out altogether as far > > >as I can see, (and had been designed only to correct the bias in the > > >coherence spectra, and not in the power spectra if I remember > > >correctly), and any reference in the documentation should be removed. > > >Unfortunately, we did not yet have time to considerably clean up > > >freqdescriptives, but this is quite high on the developer's to do list. > > >The bottom line is: ignore biascorrect, and if you use the jackknife > > >estimate of the SEM, you have to come up with some code of your own. > > >Alternatively, you could look into freqstatistics and use > > >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do > > >statistical inference. > > > > > >Best, > > > > > >Jan-Mathijs > > > > > > > > >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > > > > > >> Hi all, > > >> > > >> Is there a more detailed explanation of usage for the jackknife and > > >> biascorrect options for freqdescriptives than the one in the > > >> freqdescriptives reference > > page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? > > >> > > >> More specifically, are these options related to Bokil et al NeuroIm > > >> 2007? How should they be employed to determine significance of > > >> difference between conditions? (Is there somewhere a tutorial for > > >> the use of these options analogous to the one about cluster-based > > >> permutation testing?) > > >> > > >> Also, for the permutation analysis of TFRs > > (http://fieldtrip.fcdonders.nl/tutorial/statistics?s > > >> []=freqstatistics), if I don't want to employ the planar gradient > > >> step (what exactly IS combineplanar? sorry I couldn't find it), can > > >> I simply skip it and calculate the TFRs of the raw sensor data? > > >> > > >> Many thanks! > > >> Dahlia. > > >> ---------------------------------- > > >> The aim of this list is to facilitate the discussion between users > > >> of the FieldTrip toolbox, to share experiences and to discuss new > > >> ideas for MEG and EEG analysis. > > >> http://listserv.surfnet.nl/archives/fieldtrip.html > > >> http://www.ru.nl/fcdonders/fieldtrip/ > > > > > >---------------------------------- > > > > > >The aim of this list is to facilitate the discussion between users of > > >the FieldTrip toolbox, to share experiences and to discuss new ideas > > >for MEG and EEG analysis. > > > > > >http://listserv.surfnet.nl/archives/fieldtrip.html > > > > > >http://www.ru.nl/fcdonders/fieldtrip/ > > > > > > > > > > > > > > > > > >---------------------------------- > > >The aim of this list is to facilitate the discussion between users of the > > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > > and EEG analysis. See also > > http://listserv.surfnet.nl/archives/fieldtrip.html and > > http://www.ru.nl/neuroimaging/fieldtrip. > > > > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip > > toolbox, to share experiences and to discuss new ideas for MEG and EEG > analysis. > > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Wed Sep 2 13:25:49 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 2 Sep 2009 13:25:49 +0200 Subject: megpalnar.m and statistical testing In-Reply-To: <1050813170@web.de> Message-ID: Dear Michael, > I have some questions regarding planar gradiometers and averaging / statistical > testing in fieldtrip and in general: > > Computing the vector valued gradient of the field is a linear operation and - as such > - fully exchangeable with any kind of other linear operation such as averaging over > trials, subjects and computing differences between conditions. > > This obviously does not hold for the pythagoras-like computation of the gradient > vector's magnitude, because this is a non-linear operation. > > As an example think of to sources in two subjects that are (roughly) in the same > spot (sulcus) but, say, on opposing walls of this said sulcus. Therefore, the fields in > these two subjects will have opposing signs. As a consequence their fileds will cancel > in the average over subjects - as it should be, perhaps, because they are not the > same source but represent individual variance. If I now take the planar gradient > magnitude using megplanar and combineplanar in each subject these two sources > will be in the same spot on the scalp and with the same sign (because magnitude is > confined between 0 and +INF) and will not cancel. This is different from taking the > planar gradient's magnitude after averaging - this latter planar gradient amplitude > will be close to zero. So far this is not surprising as taking the magnitude is a > nonlinear operation and not permuatble with linear operations. > > My question is whether there any advice on where an when combineplanar should > be used? Or would recommend it just for visualization purposes? I think you already gave the answer in the previous paragraph. In my opinion, one should use megplanar-followed-by-combineplanar whenever the sources of different subjects have clearly different orientations. This holds for visualization as well as for statistics. Best, Eric Maris > > Thanks you very much for your help, > Michael > > > > > > > -----Ursprüngliche Nachricht----- > > Von: "Eric Maris" > > Gesendet: 02.09.09 09:52:37 > > An: FIELDTRIP at NIC.SURFNET.NL > > Betreff: Re: [FIELDTRIP] freqdescriptives/statistics (spatial clustering for planar > gradiometers and magnetometers __ Neuromag) > > > > Hi Dahlia, > > > > > > My name is Eric Maris and, together with Robert Oostenveld, I implemented > > the permutation statistics in Fieldtrip. > > > > > 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate > > > layout file (all channels). Does fieldtrip take into account which > > channels > > > are gradiometers and which magnetometers when it calculates adjacency for > > > clustering? > > > > > > 2. How does fieldtrip calculate adjacency for channels? (time and > > frequency > > > are obvious...) > > > > > > 3. How is the clustering performed? > > > > > > We're getting a significant cluster but it doesn't look like a single blob > > > in the time-frequency domain (averaging over sensors) but like two very > > > distant blobs, which is very strange... > > > > These are important points. As far as I know, you are the first to use the > > cluster-based permutation tests on Neuromag data. This means that you have > > to do some more work than the people who work with a system that only has > > axial gradiometers (like the CTF system). For axial gradiometers, Fieldtrip > > can calculate the adjacency in a straightforward way, using the positions of > > the coils in the helmet. Working with planar gradiometers and magnetometers, > > you have to define yourself the adjacency structure for the channels in your > > system (both gradiometers and magnetomers). Fieldtrip doesn't care about the > > way you define adjacency. You can give Fieldtrip any adjacency structure via > > the configuration field cfg.neighbours. (Type "help neighbourselection" to > > get info about how to define and adjacency structure.) > > > > Defining adjacency on planar gradiometers requires some thinking. Things > > become easier if you (1) ignore the magnetometers, and (2) sum the power at > > the pairs of orthogonal planar gradiometers. This maps the data on a new set > > of channels for which adjacency is defined in a straightforward way. (Of > > course, you may also decide to retain the orientation information in your > > original planar gradiometers, but than you have to come up with a sensible > > definition of adjacency that takes this orientation information into > > account.) > > > > Finally, a minor point, do not start with cluster-based permutation tests > > with both time and frequency resolution. If you are interested in > > oscillations, only keep the frequency resolution in you first analyses. You > > can later add the time axis if you want to know how the effect develops over > > time. > > > > > > Good luck, > > > > Eric > > > > > > dr. Eric Maris > > Donders Institute for Brain, Cognition and Behavior > > Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging > > Radboud University > > P.O. Box 9104 > > 6500 HE Nijmegen > > The Netherlands > > T:+31 24 3612651 > > Mobile: 06 39584581 > > F:+31 24 3616066 > > E: e.maris at donders.ru.nl > > > > MSc Cognitive Neuroscience: www.ru.nl/master/cns/ > > > > > > > > > > > > > > On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen > > > wrote: > > > > > > >Dear Dahlia, > > > > > > > >Hemant Bokil indeed uses the jackknife to obtain variance estimates of > > > >power (and coherence), see also for example his 2007 paper in > > > >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', > > > >he has shown that by applying a specific correction to the power > > > >estimate, in combination of the jackknife, generates a test-statistic > > > >from a differential (i.e. contrast) power spectrum which has a > > > >standard normal distribution (i.e. the jackknife estimate of the > > > >variance is expected to be 1 and the estimate of the mean 0). > > > >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to > > > >use non-parametric techniques to do statistical inference. > > > >Freqdescriptives in this respect still historically has the option of > > > >computing a jackknife estimate of the SEM of the powerspectrum/ > > > >coherencespectrum, which can be used to compute a T-statistic across > > > >two conditions for example. However, I you would choose this path, you > > > >have to write some code which does this, because it is not in > > > >fieldtrip. The biascorrect option has been taken out altogether as far > > > >as I can see, (and had been designed only to correct the bias in the > > > >coherence spectra, and not in the power spectra if I remember > > > >correctly), and any reference in the documentation should be removed. > > > >Unfortunately, we did not yet have time to considerably clean up > > > >freqdescriptives, but this is quite high on the developer's to do list. > > > >The bottom line is: ignore biascorrect, and if you use the jackknife > > > >estimate of the SEM, you have to come up with some code of your own. > > > >Alternatively, you could look into freqstatistics and use > > > >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do > > > >statistical inference. > > > > > > > >Best, > > > > > > > >Jan-Mathijs > > > > > > > > > > > >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > > > > > > > >> Hi all, > > > >> > > > >> Is there a more detailed explanation of usage for the jackknife and > > > >> biascorrect options for freqdescriptives than the one in the > > > >> freqdescriptives reference > > > page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? > > > >> > > > >> More specifically, are these options related to Bokil et al NeuroIm > > > >> 2007? How should they be employed to determine significance of > > > >> difference between conditions? (Is there somewhere a tutorial for > > > >> the use of these options analogous to the one about cluster-based > > > >> permutation testing?) > > > >> > > > >> Also, for the permutation analysis of TFRs > > > (http://fieldtrip.fcdonders.nl/tutorial/statistics?s > > > >> []=freqstatistics), if I don't want to employ the planar gradient > > > >> step (what exactly IS combineplanar? sorry I couldn't find it), can > > > >> I simply skip it and calculate the TFRs of the raw sensor data? > > > >> > > > >> Many thanks! > > > >> Dahlia. > > > >> ---------------------------------- > > > >> The aim of this list is to facilitate the discussion between users > > > >> of the FieldTrip toolbox, to share experiences and to discuss new > > > >> ideas for MEG and EEG analysis. > > > >> http://listserv.surfnet.nl/archives/fieldtrip.html > > > >> http://www.ru.nl/fcdonders/fieldtrip/ > > > > > > > >---------------------------------- > > > > > > > >The aim of this list is to facilitate the discussion between users of > > > >the FieldTrip toolbox, to share experiences and to discuss new ideas > > > >for MEG and EEG analysis. > > > > > > > >http://listserv.surfnet.nl/archives/fieldtrip.html > > > > > > > >http://www.ru.nl/fcdonders/fieldtrip/ > > > > > > > > > > > > > > > > > > > > > > > >---------------------------------- > > > >The aim of this list is to facilitate the discussion between users of the > > > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > > > and EEG analysis. See also > > > http://listserv.surfnet.nl/archives/fieldtrip.html and > > > http://www.ru.nl/neuroimaging/fieldtrip. > > > > > > > > > > ---------------------------------- > > > The aim of this list is to facilitate the discussion between users of the > > FieldTrip > > > toolbox, to share experiences and to discuss new ideas for MEG and EEG > > analysis. > > > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > > > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From dahliash at STANFORD.EDU Thu Sep 3 00:17:48 2009 From: dahliash at STANFORD.EDU (Dahlia Sharon) Date: Thu, 3 Sep 2009 00:17:48 +0200 Subject: freqdescriptives/statistics (spatial clustering for planar gradiometers and magnetometers __ Neuromag) Message-ID: Thanks Eric for this helpful reply. We will look into summing the power over grad pairs and ignoring mags. My problem with collapsing over time is that if there is a transient difference between conditions then it might not reach significance this way. Or do you have experience to the contrary? On Wed, 2 Sep 2009 09:47:33 +0200, Eric Maris wrote: >Hi Dahlia, > > >My name is Eric Maris and, together with Robert Oostenveld, I implemented >the permutation statistics in Fieldtrip. > >> 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate >> layout file (all channels). Does fieldtrip take into account which >channels >> are gradiometers and which magnetometers when it calculates adjacency for >> clustering? >> >> 2. How does fieldtrip calculate adjacency for channels? (time and >frequency >> are obvious...) >> >> 3. How is the clustering performed? >> >> We're getting a significant cluster but it doesn't look like a single blob >> in the time-frequency domain (averaging over sensors) but like two very >> distant blobs, which is very strange... > >These are important points. As far as I know, you are the first to use the >cluster-based permutation tests on Neuromag data. This means that you have >to do some more work than the people who work with a system that only has >axial gradiometers (like the CTF system). For axial gradiometers, Fieldtrip >can calculate the adjacency in a straightforward way, using the positions of >the coils in the helmet. Working with planar gradiometers and magnetometers, >you have to define yourself the adjacency structure for the channels in your >system (both gradiometers and magnetomers). Fieldtrip doesn't care about the >way you define adjacency. You can give Fieldtrip any adjacency structure via >the configuration field cfg.neighbours. (Type "help neighbourselection" to >get info about how to define and adjacency structure.) > >Defining adjacency on planar gradiometers requires some thinking. Things >become easier if you (1) ignore the magnetometers, and (2) sum the power at >the pairs of orthogonal planar gradiometers. This maps the data on a new set >of channels for which adjacency is defined in a straightforward way. (Of >course, you may also decide to retain the orientation information in your >original planar gradiometers, but than you have to come up with a sensible >definition of adjacency that takes this orientation information into >account.) > >Finally, a minor point, do not start with cluster-based permutation tests >with both time and frequency resolution. If you are interested in >oscillations, only keep the frequency resolution in you first analyses. You >can later add the time axis if you want to know how the effect develops over >time. > > >Good luck, > >Eric > > >dr. Eric Maris >Donders Institute for Brain, Cognition and Behavior >Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging >Radboud University >P.O. Box 9104 >6500 HE Nijmegen >The Netherlands >T:+31 24 3612651 >Mobile: 06 39584581 >F:+31 24 3616066 >E: e.maris at donders.ru.nl > >MSc Cognitive Neuroscience: www.ru.nl/master/cns/ > > > > >> >> On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen >> wrote: >> >> >Dear Dahlia, >> > >> >Hemant Bokil indeed uses the jackknife to obtain variance estimates of >> >power (and coherence), see also for example his 2007 paper in >> >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', >> >he has shown that by applying a specific correction to the power >> >estimate, in combination of the jackknife, generates a test-statistic >> >from a differential (i.e. contrast) power spectrum which has a >> >standard normal distribution (i.e. the jackknife estimate of the >> >variance is expected to be 1 and the estimate of the mean 0). >> >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to >> >use non-parametric techniques to do statistical inference. >> >Freqdescriptives in this respect still historically has the option of >> >computing a jackknife estimate of the SEM of the powerspectrum/ >> >coherencespectrum, which can be used to compute a T-statistic across >> >two conditions for example. However, I you would choose this path, you >> >have to write some code which does this, because it is not in >> >fieldtrip. The biascorrect option has been taken out altogether as far >> >as I can see, (and had been designed only to correct the bias in the >> >coherence spectra, and not in the power spectra if I remember >> >correctly), and any reference in the documentation should be removed. >> >Unfortunately, we did not yet have time to considerably clean up >> >freqdescriptives, but this is quite high on the developer's to do list. >> >The bottom line is: ignore biascorrect, and if you use the jackknife >> >estimate of the SEM, you have to come up with some code of your own. >> >Alternatively, you could look into freqstatistics and use >> >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do >> >statistical inference. >> > >> >Best, >> > >> >Jan-Mathijs >> > >> > >> >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: >> > >> >> Hi all, >> >> >> >> Is there a more detailed explanation of usage for the jackknife and >> >> biascorrect options for freqdescriptives than the one in the >> >> freqdescriptives reference >> page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? >> >> >> >> More specifically, are these options related to Bokil et al NeuroIm >> >> 2007? How should they be employed to determine significance of >> >> difference between conditions? (Is there somewhere a tutorial for >> >> the use of these options analogous to the one about cluster-based >> >> permutation testing?) >> >> >> >> Also, for the permutation analysis of TFRs >> (http://fieldtrip.fcdonders.nl/tutorial/statistics?s >> >> []=freqstatistics), if I don't want to employ the planar gradient >> >> step (what exactly IS combineplanar? sorry I couldn't find it), can >> >> I simply skip it and calculate the TFRs of the raw sensor data? >> >> >> >> Many thanks! >> >> Dahlia. >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> >> of the FieldTrip toolbox, to share experiences and to discuss new >> >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> > >> >---------------------------------- >> > >> >The aim of this list is to facilitate the discussion between users of >> >the FieldTrip toolbox, to share experiences and to discuss new ideas >> >for MEG and EEG analysis. >> > >> >http://listserv.surfnet.nl/archives/fieldtrip.html >> > >> >http://www.ru.nl/fcdonders/fieldtrip/ >> > >> > >> > >> > >> > >> >---------------------------------- >> >The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. >> > >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >FieldTrip >> toolbox, to share experiences and to discuss new ideas for MEG and EEG >analysis. >> See also http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Thu Sep 3 07:26:47 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Thu, 3 Sep 2009 07:26:47 +0200 Subject: freqdescriptives/statistics (spatial clustering for planar gradiometers and magnetometers __ Neuromag) In-Reply-To: Message-ID: > My problem with collapsing over time is that if there is a transient > difference between conditions then it might not reach significance this way. My advice is intended to makd life easy in your first cluster-based permutation analyses. Clustering in space, frequency AND time sometimes produces nonfocal 3D clusters. Best, Eric > > On Wed, 2 Sep 2009 09:47:33 +0200, Eric Maris > wrote: > > >Hi Dahlia, > > > > > >My name is Eric Maris and, together with Robert Oostenveld, I implemented > >the permutation statistics in Fieldtrip. > > > >> 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate > >> layout file (all channels). Does fieldtrip take into account which > >channels > >> are gradiometers and which magnetometers when it calculates adjacency for > >> clustering? > >> > >> 2. How does fieldtrip calculate adjacency for channels? (time and > >frequency > >> are obvious...) > >> > >> 3. How is the clustering performed? > >> > >> We're getting a significant cluster but it doesn't look like a single blob > >> in the time-frequency domain (averaging over sensors) but like two very > >> distant blobs, which is very strange... > > > >These are important points. As far as I know, you are the first to use the > >cluster-based permutation tests on Neuromag data. This means that you have > >to do some more work than the people who work with a system that only has > >axial gradiometers (like the CTF system). For axial gradiometers, Fieldtrip > >can calculate the adjacency in a straightforward way, using the positions of > >the coils in the helmet. Working with planar gradiometers and magnetometers, > >you have to define yourself the adjacency structure for the channels in your > >system (both gradiometers and magnetomers). Fieldtrip doesn't care about the > >way you define adjacency. You can give Fieldtrip any adjacency structure via > >the configuration field cfg.neighbours. (Type "help neighbourselection" to > >get info about how to define and adjacency structure.) > > > >Defining adjacency on planar gradiometers requires some thinking. Things > >become easier if you (1) ignore the magnetometers, and (2) sum the power at > >the pairs of orthogonal planar gradiometers. This maps the data on a new set > >of channels for which adjacency is defined in a straightforward way. (Of > >course, you may also decide to retain the orientation information in your > >original planar gradiometers, but than you have to come up with a sensible > >definition of adjacency that takes this orientation information into > >account.) > > > >Finally, a minor point, do not start with cluster-based permutation tests > >with both time and frequency resolution. If you are interested in > >oscillations, only keep the frequency resolution in you first analyses. You > >can later add the time axis if you want to know how the effect develops over > >time. > > > > > >Good luck, > > > >Eric > > > > > >dr. Eric Maris > >Donders Institute for Brain, Cognition and Behavior > >Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging > >Radboud University > >P.O. Box 9104 > >6500 HE Nijmegen > >The Netherlands > >T:+31 24 3612651 > >Mobile: 06 39584581 > >F:+31 24 3616066 > >E: e.maris at donders.ru.nl > > > >MSc Cognitive Neuroscience: www.ru.nl/master/cns/ > > > > > > > > > >> > >> On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen > >> wrote: > >> > >> >Dear Dahlia, > >> > > >> >Hemant Bokil indeed uses the jackknife to obtain variance estimates of > >> >power (and coherence), see also for example his 2007 paper in > >> >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', > >> >he has shown that by applying a specific correction to the power > >> >estimate, in combination of the jackknife, generates a test-statistic > >> >from a differential (i.e. contrast) power spectrum which has a > >> >standard normal distribution (i.e. the jackknife estimate of the > >> >variance is expected to be 1 and the estimate of the mean 0). > >> >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to > >> >use non-parametric techniques to do statistical inference. > >> >Freqdescriptives in this respect still historically has the option of > >> >computing a jackknife estimate of the SEM of the powerspectrum/ > >> >coherencespectrum, which can be used to compute a T-statistic across > >> >two conditions for example. However, I you would choose this path, you > >> >have to write some code which does this, because it is not in > >> >fieldtrip. The biascorrect option has been taken out altogether as far > >> >as I can see, (and had been designed only to correct the bias in the > >> >coherence spectra, and not in the power spectra if I remember > >> >correctly), and any reference in the documentation should be removed. > >> >Unfortunately, we did not yet have time to considerably clean up > >> >freqdescriptives, but this is quite high on the developer's to do list. > >> >The bottom line is: ignore biascorrect, and if you use the jackknife > >> >estimate of the SEM, you have to come up with some code of your own. > >> >Alternatively, you could look into freqstatistics and use > >> >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do > >> >statistical inference. > >> > > >> >Best, > >> > > >> >Jan-Mathijs > >> > > >> > > >> >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > >> > > >> >> Hi all, > >> >> > >> >> Is there a more detailed explanation of usage for the jackknife and > >> >> biascorrect options for freqdescriptives than the one in the > >> >> freqdescriptives reference > >> page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? > >> >> > >> >> More specifically, are these options related to Bokil et al NeuroIm > >> >> 2007? How should they be employed to determine significance of > >> >> difference between conditions? (Is there somewhere a tutorial for > >> >> the use of these options analogous to the one about cluster-based > >> >> permutation testing?) > >> >> > >> >> Also, for the permutation analysis of TFRs > >> (http://fieldtrip.fcdonders.nl/tutorial/statistics?s > >> >> []=freqstatistics), if I don't want to employ the planar gradient > >> >> step (what exactly IS combineplanar? sorry I couldn't find it), can > >> >> I simply skip it and calculate the TFRs of the raw sensor data? > >> >> > >> >> Many thanks! > >> >> Dahlia. > >> >> ---------------------------------- > >> >> The aim of this list is to facilitate the discussion between users > >> >> of the FieldTrip toolbox, to share experiences and to discuss new > >> >> ideas for MEG and EEG analysis. > >> >> http://listserv.surfnet.nl/archives/fieldtrip.html > >> >> http://www.ru.nl/fcdonders/fieldtrip/ > >> > > >> >---------------------------------- > >> > > >> >The aim of this list is to facilitate the discussion between users of > >> >the FieldTrip toolbox, to share experiences and to discuss new ideas > >> >for MEG and EEG analysis. > >> > > >> >http://listserv.surfnet.nl/archives/fieldtrip.html > >> > > >> >http://www.ru.nl/fcdonders/fieldtrip/ > >> > > >> > > >> > > >> > > >> > > >> >---------------------------------- > >> >The aim of this list is to facilitate the discussion between users of the > >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > >> and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > >> > > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users of the > >FieldTrip > >> toolbox, to share experiences and to discuss new ideas for MEG and EEG > >analysis. > >> See also http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From nadia.mueller at UNI-KONSTANZ.DE Fri Sep 4 15:50:28 2009 From: nadia.mueller at UNI-KONSTANZ.DE (=?ISO-8859-1?Q?Nadia_M=FCller?=) Date: Fri, 4 Sep 2009 15:50:28 +0200 Subject: depsamplesF In-Reply-To: <20090805195249.26517.qmail@f4mail-235-238.rediffmail.com> Message-ID: Dear all, I've a question regarding the statfun_depsamplesF. I'd like to compare source data of 9 subjects x 5 conditions. Therefore I performed a repeated dependent samples F-statistic on source level. When looking at the data I was surprised by the very high F-values and, at the same time, very low p-values. So we debugged the statfun to get an idea of how the F-statistic is calculated. Thereby, we came across the 'scaledstat' where the F- values are dramatically reduced, resulting in very low F-values and consequently p-values. We also got different degrees of freedom compared to an anova calculated elsewhere. It would be great if you could give me some background of how this F- statistic is performed and why for example we need the scaledstat. Thanks a lot, nadia ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From hungptit at GMAIL.COM Mon Sep 7 09:00:02 2009 From: hungptit at GMAIL.COM (Hung Dang) Date: Mon, 7 Sep 2009 01:00:02 -0600 Subject: EEG beamforming Message-ID: Dear all, I try to combine Fieldtrip with my finite different head model and haven't figured out how to register a Biosemi 128 electrode system with a segmented realistic head model in Fieldtrip. I would be great if you could give me some hints or suggestions about my problem. Thanks a lot Hung ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Tue Sep 8 09:38:46 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 8 Sep 2009 09:38:46 +0200 Subject: removed external/biosig Message-ID: Dear all I have released the external/biosig directory from the FieldTrip release version, because it is causing problems with some of the functions having the same name as a Matlab builtin. If needed, you can get a condensed version of the biosig code from ftp://ftp.fcdonders.nl/pub/fieldtrip/external or the full code from the BIOSIG website at http://biosig.sourceforge.net/ . best regards, Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher 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 ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.glerean at GMAIL.COM Tue Sep 8 10:44:23 2009 From: e.glerean at GMAIL.COM (Enrico Glerean) Date: Tue, 8 Sep 2009 11:44:23 +0300 Subject: bug report- error with prepare_concentricspheres.m Message-ID: Hello I am having an error running the example giving in the help of prepare_concentricspheres.m (using most recent version Revision 1.8 2009/07/16 09:14:52, se below). I think it's due to the fact that unique wants a simple array as input, not structs. Any chances it could be resolved quickly? Otherwise, could you just point out the final structure of the vol? is it: for i=1:4 vol(i).r = ... vol(i).o = ... vol(i).c= .. or is it vol.r = [r1 r2 r3 r4] vol.o=[o1;o2;o3;o4] vol.c=[c1 c2 c3 c4] best regards Enrico -------- code from help prepare_concentricspheres Example: % first create 4 surfaces that represent the brain, csf, skull and skin radius = [86 88 92 100]; headshape = []; for i=1:4 pnt = randn(100,3); for j=1:size(pnt,1) pnt(j,:) = pnt(j,:) ./ norm(pnt(j,:)); end headshape(i).pnt = radius(i) .* pnt + 0.1*randn(size(pnt)); end % then construct a volume conduction model of the head by fitting 4 concentric spheres cfg = []; cfg.headshape = headshape; cfg.conductivity = [0.3300 1 0.0042 0.3300] [vol, cfg] = prepare_concentricspheres(cfg) ??? Error using ==> unique Too many input arguments. Error in ==> prepare_mesh_headshape at 30 headshape.pnt = unique(headshape.pnt, 'rows'); Error in ==> prepare_concentricspheres at 82 headshape = prepare_mesh_headshape(cfg); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Tue Sep 8 11:20:31 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Tue, 8 Sep 2009 11:20:31 +0200 Subject: depsamplesF In-Reply-To: <4CD6CD94-A7AE-48B7-BCEE-9C1DE16A98CD@uni-konstanz.de> Message-ID: Hi Nadia, Statfun_depsamplesF calculates a Hotelling's T^2-statistic. This statistic has a scaled F-distribution under the null hypothesis that the levels of the within-subjects independent variable have identical means. When programming this statfun, I used the book by Johnson & Wichern, Applied Multivariate Statistical Analysis, which I can advise to everyone who is not afraid of matrices. The statistic that is (or should be ...) implemented is on the top of p. 218 (edition 1988 of the book). Can you check the code? I know that Tineke Snijders (Donders PhD student) has also used this statfun (actually, I programmed it especially for her) and did not obtain strange results. Good luck, Eric Maris > -----Oorspronkelijk bericht----- > Van: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] Namens Nadia > Müller > Verzonden: vrijdag 4 september 2009 15:50 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: [FIELDTRIP] depsamplesF > > Dear all, > > I've a question regarding the statfun_depsamplesF. > > I'd like to compare source data of 9 subjects x 5 conditions. > Therefore I performed a repeated dependent samples F-statistic on > source level. When looking at the data I was surprised by the very > high F-values and, at the same time, very low p-values. So we > debugged the statfun to get an idea of how the F-statistic is > calculated. Thereby, we came across the 'scaledstat' where the F- > values are dramatically reduced, resulting in very low F-values and > consequently p-values. We also got different degrees of freedom > compared to an anova calculated elsewhere. > > It would be great if you could give me some background of how this F- > statistic is performed and why for example we need the scaledstat. > > Thanks a lot, > nadia > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From fedeletommaso at YAHOO.IT Tue Sep 8 12:16:52 2009 From: fedeletommaso at YAHOO.IT (tommaso fedele) Date: Tue, 8 Sep 2009 10:16:52 +0000 Subject: I: [Fwd: Re: [Fwd: Re: FieldTrip download request]] Message-ID: > Dear all, > I am trying to perform a TF analysis with my new fresh FieldTrip > toolbox, > version "fieldtrip-20090823". I attached a mat file with data and and > results, and I am going to expalin breigly my problems: > > 1. I have built my dataset as suggested in the documentation > (http://fieldtrip.fcdonders.nl/faq/ > how_can_i_import_my_own_dataformat): > > > data.label % cell-array containing strings, Nchan X 1 > data.fsample % sampling frequency in Hz, single number > data.trial % cell-array containing a data matrix for each trial (1 X > Ntrial), each data matrix is Nchan X Nsamples > data.time % cell-array containing a time axis for each trial (1 X > Ntrial), each time axis is a 1 X Nsamples vector > > > > 2. I executed the following script copied and modified from > http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis > as follows: > > %% Fixed wondow length > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'MEG'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.foi = 100:100:1000; % analysis > 2 to > 30 Hz in steps of 2 Hz > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.01; % length of time > window = 0.5 sec > cfg.toi = -0.01:0.01:0.08; % time > window > "slides" from -0.5 to 1.5 sec in steps of 0.05 sec (50 ms) > TFRhann = freqanalysis(cfg, data); > > but as you can see from the data file attached I get and empty > powerspectrum matrix. > > Do you have any suggestion for me? > > Thanks > > Tommaso Fedele > > > >> Thank you for your interest in the FieldTrip toolbox. >> >> You can download it from the F.C. Donders public FTP server >> (ftp.fcdonders.nl) at ftp://ftp.fcdonders.nl/pub/fieldtrip/ >> You can login with username 'anonymous' and use your email address as >> password. >> >> There is an FIELDTRIP email discussion list on which people can post >> their questions and messages regarding the use of FieldTrip. New >> releases and updates will also be announced through that list. >> >> If you do not want to participate on the discussion list, but still >> want to be informed about updates, you can join the FIELDTRIP-NEWS >> list. That is a very low volume list to which only the fieldtrip >> maintainers can make posts. >> >> For subscribing to the FIELDTRIP discussion list, click here >> http://nic.surfnet.nl/scripts/wa.exe?SUBED1=fieldtrip&A=1 >> >> For subscribing to the FIELDTRIP-NEWS announcement list, click here >> http://nic.surfnet.nl/scripts/wa.exe?SUBED1=fieldtrip-news&A=1 >> >> > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: data_tommaso.mat Type: application/vnd.ms-access Size: 473965 bytes Desc: not available URL: From moratti at MED.UCM.ES Wed Sep 9 11:06:20 2009 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Wed, 9 Sep 2009 11:06:20 +0200 Subject: depsamplesF Message-ID: Hi Eric & Nadia, Having recently used depsamplesF I had a look at the code as Nadia had some doubts. In the newer edition (1998) of the Johnson and Wichern book I guess the line 136: s.stat(smplindx)=nunits*contrastavg*inv(covmat)*contrastavg'; corresponds to formula 5-4 at page 226. n(X-u)' S(-1) (X-u) line 151: s.critval = ((nunits-1).*ncontrasts./(nunits-ncontrasts)).*finv(1- cfg.alpha,s.dfnum,s.dfdenom); corresponds to formula 5-6 (grey box) at page 226. P[T^2 > (n-1)/(n-p) F(p,n-p)] Please let me know if I got that right for adquate reporting of the method. Many thanks, Stephan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Wed Sep 9 11:56:47 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 9 Sep 2009 11:56:47 +0200 Subject: depsamplesF In-Reply-To: Message-ID: Dear Stephan, > Having recently used depsamplesF I had a look at the code as Nadia had some > doubts. In the newer edition (1998) of the Johnson and Wichern book I guess > the line 136: s.stat(smplindx)=nunits*contrastavg*inv(covmat)*contrastavg'; > corresponds to formula 5-4 at page 226. > n(X-u)' S(-1) (X-u) (I don't have the 1998 edition.) I guess the u in the formula above is the vector of expected values of the contrasts under the null hypothesis (almost always set equal to zeros, as is also the case in the depsamplesF statfun). > > line 151: s.critval = ((nunits-1).*ncontrasts./(nunits-ncontrasts)).*finv(1- > cfg.alpha,s.dfnum,s.dfdenom); corresponds to formula 5-6 (grey box) at page > 226. > P[T^2 > (n-1)/(n-p) F(p,n-p)] I think this must be ((n-1)*p)/(n-p) F(p,n-p). If you want to check the output of depsamplesF, you could look at one row of the matrix dat. Every row corresponds to a particular channel, channel-by-time pair, channel-by-frequency pair, channel-by-frequency-by-time triplet, etc. The output of depsamplesF for one such row should be identical to the T^2-statistic that is calculated using some other statistics package. (Note that a row of the matrix dat corresponds to the usual nsubjects-by-nconditions matrix. However, in dat, this matrix is reshaped as a row vector.) > > Please let me know if I got that right for adquate reporting of the method. > > Many thanks, > > Stephan > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From moratti at MED.UCM.ES Wed Sep 9 12:56:13 2009 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Wed, 9 Sep 2009 12:56:13 +0200 Subject: depsamplesF Message-ID: of course it should be (n-1)p/(n-p), sorry for the confusion, it was a typing error of mine. best, Stephan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From moratti at MED.UCM.ES Wed Sep 9 13:57:44 2009 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Wed, 9 Sep 2009 13:57:44 +0200 Subject: depsamplesF Message-ID: Hi Eric y Nadia, Ok, I have made a test of depsamplesF comparing results of depsamplesF and SPSS. I get the same results. I used data from an experiment and chose a timepoint and one channel that were indicated to be significant by dempsamplesF. In the attached TEST_dempsamplesF.mat file it is "testmat" (24 subjects 3 conditions). The variable "dat" is the reshaped "testmat". The structure "s" contains the results of depsamplesF. I added the variable scaledstat as the field "F" to "s" as it is the F value. The attached file "SPSSoutput.bmg" is a screen shot of the SPSS output entering testmat in a MANOVA. The results are the same: F(2, 22) = 6.627, p = 0.006 We can also calculate Wilk's lambda from T^2 (see page 232 formula 5-13 of the Johnson 1998 edition) as: lambda = 1/(1 + s.stat/(24-1)); and get 0.624, the same as in SPSS. Maybe, as people are more used to F values, it would be useful to have the F(scaledstat) value also in the "s" structure (and later after using timelockstats or freqstats to have a matrix containing the F values besides the T^2 values). Thanks for implementing that great stuff in fieldtrip and making it accessible for all users ! Best, Stephan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: SPSSoutput.bmp Type: image/bmp Size: 371126 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TEST_dempsamplesF.mat Type: application/octet-stream Size: 1588 bytes Desc: not available URL: From r.oostenveld at FCDONDERS.RU.NL Wed Sep 9 16:33:02 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 9 Sep 2009 16:33:02 +0200 Subject: bug report- error with prepare_concentricspheres.m In-Reply-To: Message-ID: Hi Enrico, Sorry, that was due to some changes in the mesh generation to also support manual clicking in an MRI for making a mesh. I have fixed it, The latest version (this evening on the ftp) will include the fix. thanks, Robert On 8 Sep 2009, at 10:44, Enrico Glerean wrote: > Hello > > I am having an error running the example giving in the help of > prepare_concentricspheres.m (using most recent version Revision 1.8 > 2009/07/16 09:14:52, se below). > > I think it's due to the fact that unique wants a simple array as > input, not structs. Any chances it could be resolved quickly? > Otherwise, could you just point out the final structure of the vol? > > is it: > > for i=1:4 > vol(i).r = ... > vol(i).o = ... > vol(i).c= .. > > or is it > > vol.r = [r1 r2 r3 r4] > vol.o=[o1;o2;o3;o4] > vol.c=[c1 c2 c3 c4] > > > best regards > > Enrico > > -------- code from help prepare_concentricspheres > Example: > > % first create 4 surfaces that represent the brain, csf, skull > and skin > radius = [86 88 92 100]; > headshape = []; > for i=1:4 > pnt = randn(100,3); > for j=1:size(pnt,1) > pnt(j,:) = pnt(j,:) ./ norm(pnt(j,:)); > end > headshape(i).pnt = radius(i) .* pnt + 0.1*randn(size(pnt)); > end > > % then construct a volume conduction model of the head by fitting > 4 concentric spheres > cfg = []; > cfg.headshape = headshape; > cfg.conductivity = [0.3300 1 0.0042 0.3300] > [vol, cfg] = prepare_concentricspheres(cfg) > > > > ??? Error using ==> unique > Too many input arguments. > > Error in ==> prepare_mesh_headshape at 30 > headshape.pnt = unique(headshape.pnt, 'rows'); > > Error in ==> prepare_concentricspheres at 82 > headshape = prepare_mesh_headshape(cfg); > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From nadia.mueller at UNI-KONSTANZ.DE Wed Sep 9 16:43:08 2009 From: nadia.mueller at UNI-KONSTANZ.DE (=?WINDOWS-1252?Q?Nadia_M=FCller?=) Date: Wed, 9 Sep 2009 16:43:08 +0200 Subject: depsamplesF In-Reply-To: Message-ID: Hi Eric and Stephan, thanks a lot for testing and implementing that stuff!! And also for the background information. It's much clearer now why we have the scaledstat and how the test statistic is calculated. Best, Nadia Am 09.09.2009 um 13:57 schrieb Stephan Moratti: > Hi Eric y Nadia, > > Ok, I have made a test of depsamplesF comparing results of > depsamplesF and > SPSS. I get the same results. I used data from an experiment and > chose a > timepoint and one channel that were indicated to be significant by > dempsamplesF. In the attached TEST_dempsamplesF.mat file it is > "testmat" > (24 subjects 3 conditions). The variable "dat" is the reshaped > "testmat". The > structure "s" contains the results of depsamplesF. I added the > variable > scaledstat as the field "F" to "s" as it is the F value. The attached > file "SPSSoutput.bmg" is a screen shot of the SPSS output entering > testmat in > a MANOVA. The results are the same: > F(2, 22) = 6.627, p = 0.006 > > We can also calculate Wilk's lambda from T^2 (see page 232 formula > 5-13 of > the Johnson 1998 edition) as: > > lambda = 1/(1 + s.stat/(24-1)); > > and get 0.624, the same as in SPSS. Maybe, as people are more used > to F > values, it would be useful to have the F(scaledstat) value also in > the "s" > structure (and later after using timelockstats or freqstats to have > a matrix > containing the F values besides the T^2 values). > > Thanks for implementing that great stuff in fieldtrip and making it > accessible > for all users ! > > Best, > > Stephan > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From filip.vanopstal at UGENT.BE Wed Sep 9 17:34:42 2009 From: filip.vanopstal at UGENT.BE (Filip Van Opstal) Date: Wed, 9 Sep 2009 17:34:42 +0200 Subject: coherence computation Message-ID: Hi all, I am trying to compute the coherence between my ECG ICA components and the ECG. Following the tutorial I compute a frequency decomposition of all the components and the ECG and use this to calculate the coherence with freqdescriptives. In the output of freqdesriptives, however, I don't observe the coherence spectrum (only the powspctrm is present). I am using the Neuromag system, running the analysis on the gradiometers only. All suggestions are highly appreciated! Thanks, Filip ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From boninc at NINDS.NIH.GOV Wed Sep 9 18:26:00 2009 From: boninc at NINDS.NIH.GOV (Bonin, Claudia (NIH/NINDS) [F]) Date: Wed, 9 Sep 2009 12:26:00 -0400 Subject: freqstastics script Message-ID: I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. thanks! claudia >> cfg.statistic = 'kruskalwallis'; >> cfg.method = 'stats'; >> [s] = freqstatistics(cfg, fr, fr); averaging over 3 channels selected 50 time bins selected 41 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip/private/prepare_timefreq_data at 305 In fieldtrip/private/statistics_wrapper at 167 In freqstatistics at 44 ??? Undefined function or method 'neighbourselection' for input arguments of type 'struct'. Error in ==> statistics_wrapper at 181 cfg = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 44 [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From manish.saggar at GMAIL.COM Wed Sep 9 18:56:36 2009 From: manish.saggar at GMAIL.COM (Manish Saggar) Date: Wed, 9 Sep 2009 11:56:36 -0500 Subject: Clusterplot not highlighting clusters & average layout file In-Reply-To: Message-ID: Dear All, I am a novice user of FieldTrip and I love the tools provided by you guys. Great work. I have a question, regarding the analysis I recently did. Any help is appreciated. I am confused why the cluster is not mapped on the areas that visually show clear reduction. I am comparing two conditions (with-in subjects) using depSamplesT statistic. Both of the conditions are 1 min of EEG data and I calculate powerspectrum over those 1 min windows using segment of 1 second windows with 50% overlap. Condition are named as pre and post. I have attached topoplotER of power spectrum for each condition in alpha band (8-12Hz). Clearly in post there is reduced power in left (mainly) and right hemispheres at the back of the head as compared to pre. However in the clusterplot (raweffect) the cluster is mainly situated in midline frontal and parietal areas. Actually it is quite a large cluster, covering almost all channels. The thing that worries me is that it just didn't cover the the channels which clearly shows difference by visual inspection between two conditions. Also shouldn't the cluster be located only (or mainly) where the difference can be seen in pre and post topoplots. For convenience I have plotted all plots with same zlim. Here is the code that I used for running stats: -------        cfg = [];        cfg.channel          = {'all'};        cfg.latency          = 'all';        cfg.frequency        = foi;        cfg.method           = 'montecarlo';        cfg.statistic        = depsamplesT;        cfg.correctm         = 'cluster';        cfg.clusteralpha     = 0.05;        cfg.clusterstatistic = 'maxsum';        cfg.minnbchan        = 2;   %works best.        cfg.tail             = 0;        cfg.clustertail      = 0;        cfg.alpha            = 0.025;        cfg.numrandomization = 1000;        subj = 28;        design = zeros(2,2*subj);        for i = 1:1:subj           design(1,i) = i;           design(1,subj+i) = i;        end        design(2,1:subj) = 1;        design(2,subj+1:2*subj) = 2;        cfg.design = design;        cfg.uvar = 1;        cfg.ivar = 2;        cfg.layout = 'ng.sfp';        cfg.neighbourdist = 0.1; % this gives the neighbor count on average to 3.2        cfg.avgoverfreq = 'yes';        stat{win} = freqstatistics(cfg, post, pre); ---------- Regards, Manish ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: pre-post-alpha-diff.tiff Type: image/tiff Size: 203224 bytes Desc: not available URL: From moritzgw at TUEBINGEN.MPG.DE Wed Sep 9 18:57:59 2009 From: moritzgw at TUEBINGEN.MPG.DE (Moritz Grosse-Wentrup) Date: Wed, 9 Sep 2009 18:57:59 +0200 Subject: Call for Contributions: NIPS 2009 Workshop on Connectivity Inference in Neuroimaging Message-ID: ---------------------- CALL FOR CONTRIBUTIONS ---------------------- *NIPS 2009 WORKSHOP ON CONNECTIVITY INFERENCE IN NEUROIMAGING* *Webpage* http://cini2009.kyb.tuebingen.mpg.de *Workshop description* Over the past decade, brain connectivity has become a central theme in the neuroimaging community. At the same time, causal inference has recently emerged as a major research topic in machine learning. Even though the two research questions are closely related, interactions between the neuroimaging and machine-learning communities have been limited. The aim of this workshop is to initiate productive interactions between neuroimaging and machine learning by introducing the workshop audience to the different concepts of connectivity/causal inference employed in each of the communities. Special emphasis is placed on discussing commonalities as well as distinctions between various approaches in the context of neuroimaging. Due to the increasing relevance of brain connectivity for analyzing mental states, we also highly welcome contributions discussing applications of brain connectivity measures to real-world problems such as brain-computer interfacing or mental state monitoring. *Topics* We solicit contributions on new approaches to connectivity and/or causal inference for neuroimaging data as well as on applications of connectivity inference to real-world problems. Contributions might address, but are not limited to, the following topics: * Effective connectivity & causal inference o Dynamic causal modelling o Granger causality o Structural equation models o Causal Bayesian networks o Non-Gaussian linear causal models o Causal additive noise models * Functional connectivity o Canonical correlation analysis o Phase-locking o Imaginary coherence o Independent component analysis * Applications of brain connectivity to real-world problems o Brain-computer interfaces o Mental state monitoring *Invited speakers* * Jean Daunizeau, University of Zurich & University College London * Rainer Goebel, Maastricht University * Scott Makeig, University of California San Diego *Workshop format* CINI 2009 is a one-day workshop at the Twenty-Third Annual Conference on Neural Information Processing Systems (NIPS 2009). Besides three invited talks, in which the audience will be introduced to current approaches for inferring connectivity in neuroimaging data, there will be several contributed talks and an evening poster session. Special emphasis will be placed on a balanced contribution of talks from the neuroimaging and machine learning communities. To foster interaction between communities, approximately 50% of workshop time is reserved for discussions. *Key dates* * Extended abstract submission deadline: October 9th, 2009, 5 pm (PT) * Notification of acceptance: October 23rd, 2009 * Workshop: December 11th or 12th, 2009 *Submission instructions* Please submit extended abstracts (maximum two pages) in either pdf or doc format through the CINI 2009 submission site at https://cmt.research.microsoft.com/CINI2009/. Upon notification of acceptance, authors will also be notified whether their contribution has been accepted as a contributed talk or poster. *Workshop location* Westin Resort and Spa / Hilton Whistler Resort and Spa Whistler, B.C., Canada *Organization committee* * Moritz Grosse-Wentrup (primary contact), MPI for Biological Cybernetics, Tuebingen * Uta Noppeney, MPI for Biological Cybernetics, Tuebingen * Karl Friston, University College London * Bernhard Schoelkopf, MPI for Biological Cybernetics, Tuebingen *Program committee* * Olivier David, Institut National de la Sante et de la Recherche Medicale, Grenoble * Justin Dauwels, Massachusetts Institute of Technology, Cambridge * Michael Eichler, Maastricht University * Jeremy Hill, Max Planck Institute for Biological Cybernetics, Tuebingen * Guido Nolte, Fraunhofer FIRST, Berlin * Will Penny, University College London * Alard Roebroeck, Maastricht University * Klaas Enno Stephan, University of Zurich * Ryota Tomioka, University of Tokyo * Pedro Valdes-Sosa, Cuban Neuroscience Center, Havana ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE Thu Sep 10 11:37:53 2009 From: Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE (Hanneke van Dijk) Date: Thu, 10 Sep 2009 11:37:53 +0200 Subject: source localization neuromag 122 system. Message-ID: Dear all, At the moment I am using the MNE toolbox and Fieldtrip to localize an alpha source (1.5 seconds spontaneous data recorded with a Neuromag 122 system). With data from the new 306 channel system it seems to work out well. However with data from the old system the source ends up in the cerebellum (attached a picture of Neural Activity index, cfg.lambda = '10%'). Of course it should be in the parieto-occipital cortex or the sensorimotor cortex. I have the feeling there is problem with the position of the gradiometers relative to the headmodel or the other way around. The head model seems to be too far away from the sensors (see attached headmodel1), if my hunch is correct I don't know how to fix this or where exactly I can find the problem. How I made the headmodel you can find on: http://fieldtrip.fcdonders.nl/example/read_neuromag_mri_and_create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space I'm constructing the grad files (to do sourceanalysis with) seperately using read_header and mne2grad (with orig.chs(n).coil_type=2, because the coil_type is 2 for the old system). Another related question: in mne2grad on line 104 and 108 it says 104 >> grad.pnt(kCoil,:)=100*(t(1:3,4)-0.008*t(1:3,1)); % multiply with 100 to get cm ..... 108 >> grad.pnt(kCoil,:)=100*(t(1:3,4)+0.008*t(1:3,1)); Where does this 0.008 come from? I have changed this number to try it out but did't see any clear differences in the gradiometer positions. Thanks in advance for your help, Wishing you all the best, Hanneke ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: headmodel1.jpeg Type: image/jpeg Size: 62529 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: alphasource.jpeg Type: image/jpeg Size: 86762 bytes Desc: not available URL: From Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE Thu Sep 10 13:21:59 2009 From: Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE (Hanneke Van Dijk) Date: Thu, 10 Sep 2009 13:21:59 +0200 Subject: AW: [FIELDTRIP] freqstastics script Message-ID: Dear Claudia, Normally when matlab says 'undefined function for input of type ....' it means it cannot find the specific function in the paths you have defined. You can check whether neighbourselection.m is in your fieldtrip folder, if not I have attached it (version 20090428) so you can put it there. If this doesn't fix it please let me know! Groetjes Hanneke -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) [F] Gesendet: Mi 09.09.2009 18:26 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] freqstastics script I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. thanks! claudia >> cfg.statistic = 'kruskalwallis'; >> cfg.method = 'stats'; >> [s] = freqstatistics(cfg, fr, fr); averaging over 3 channels selected 50 time bins selected 41 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip/private/prepare_timefreq_data at 305 In fieldtrip/private/statistics_wrapper at 167 In freqstatistics at 44 ??? Undefined function or method 'neighbourselection' for input arguments of type 'struct'. Error in ==> statistics_wrapper at 181 cfg = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 44 [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE Thu Sep 10 13:31:52 2009 From: Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE (Hanneke Van Dijk) Date: Thu, 10 Sep 2009 13:31:52 +0200 Subject: freqstastics script Message-ID: Dear Claudia, Sorry the attachnment didn't stick... Yours, Hanneke -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Hanneke Van Dijk Gesendet: Do 10.09.2009 13:21 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script Dear Claudia, Normally when matlab says 'undefined function for input of type ....' it means it cannot find the specific function in the paths you have defined. You can check whether neighbourselection.m is in your fieldtrip folder, if not I have attached it (version 20090428) so you can put it there. If this doesn't fix it please let me know! Groetjes Hanneke -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) [F] Gesendet: Mi 09.09.2009 18:26 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] freqstastics script I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. thanks! claudia >> cfg.statistic = 'kruskalwallis'; >> cfg.method = 'stats'; >> [s] = freqstatistics(cfg, fr, fr); averaging over 3 channels selected 50 time bins selected 41 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip/private/prepare_timefreq_data at 305 In fieldtrip/private/statistics_wrapper at 167 In freqstatistics at 44 ??? Undefined function or method 'neighbourselection' for input arguments of type 'struct'. Error in ==> statistics_wrapper at 181 cfg = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 44 [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE Thu Sep 10 13:34:23 2009 From: Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE (Hanneke van Dijk) Date: Thu, 10 Sep 2009 13:34:23 +0200 Subject: freqstastics script In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B0F34B4@Mail2-UKD.VMED.UKD> Message-ID: ....... Yours Hanneke On Thu, Sep 10, 2009 at 1:31 PM, Hanneke Van Dijk < Hanneke.vanDijk at med.uni-duesseldorf.de> wrote: > Dear Claudia, > > Sorry the attachnment didn't stick... > > Yours, > > Hanneke > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Hanneke Van Dijk > Gesendet: Do 10.09.2009 13:21 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script > > Dear Claudia, > > Normally when matlab says 'undefined function for input of type ....' it > means it cannot find the specific function in the paths you have defined. > You can check whether neighbourselection.m is in your fieldtrip folder, if > not I have attached it (version 20090428) so you can put it there. If this > doesn't fix it please let me know! > > Groetjes Hanneke > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) > [F] > Gesendet: Mi 09.09.2009 18:26 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] freqstastics script > > I am trying to do statistics on time-frequency data across 16 subjects, > averaging over channels. I received back the following error about > 'neighbourselection' which means nothing to me.....Does anyone have any idea > what might be wrong here? I have pasted in the exact message below. > thanks! > claudia > > > >> cfg.statistic = 'kruskalwallis'; > >> cfg.method = 'stats'; > >> [s] = freqstatistics(cfg, fr, fr); > averaging over 3 channels > selected 50 time bins > selected 41 frequency bins > Warning: PACK can only be used from the MATLAB command line. > > In fieldtrip/private/prepare_timefreq_data at 305 > In fieldtrip/private/statistics_wrapper at 167 > In freqstatistics at 44 > ??? Undefined function or method 'neighbourselection' for input arguments > of type > 'struct'. > > Error in ==> statistics_wrapper at 181 > cfg = neighbourselection(cfg,varargin{1}); > > Error in ==> freqstatistics at 44 > [stat] = statistics_wrapper(cfg, varargin{:}); > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: neighbourselection.m Type: application/octet-stream Size: 6816 bytes Desc: not available URL: From j.gross at PSY.GLA.AC.UK Thu Sep 10 14:34:43 2009 From: j.gross at PSY.GLA.AC.UK (Joachim Gross) Date: Thu, 10 Sep 2009 13:34:43 +0100 Subject: source localization neuromag 122 system. In-Reply-To: Message-ID: Dear Hanneke, I assume that t(1:3,4) is the center of the figure of 8 coil (the crossing point). Adding or subtracting 0.008 along the correct dimension seems to be necessary to arrive at the center of each of the two loops that make up the planar gradiometer. Joachim On 10 Sep 2009, at 10:37, Hanneke van Dijk wrote: > Dear all, > > At the moment I am using the MNE toolbox and Fieldtrip to localize > an alpha source (1.5 seconds spontaneous data recorded with a > Neuromag 122 system). > > With data from the new 306 channel system it seems to work out well. > However with data from the old system the source ends up in the > cerebellum (attached a picture of Neural Activity index, cfg.lambda > = '10%'). Of course it should be in the parieto-occipital cortex or > the sensorimotor cortex. I have the feeling there is problem with > the position of the gradiometers relative to the headmodel or the > other way around. The head model seems to be too far away from the > sensors (see attached headmodel1), if my hunch is correct I don't > know how to fix this or where exactly I can find the problem. > > How I made the headmodel you can find on: > http://fieldtrip.fcdonders.nl/example/read_neuromag_mri_and_create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > I'm constructing the grad files (to do sourceanalysis with) > seperately using read_header and mne2grad (with > orig.chs(n).coil_type=2, because the coil_type is 2 for the old > system). > > Another related question: in mne2grad on line 104 and 108 it says > > 104 >> grad.pnt(kCoil,:)=100*(t(1:3,4)-0.008*t(1:3,1)); % > multiply with 100 to get cm > ..... > 108 >> grad.pnt(kCoil,:)=100*(t(1:3,4)+0.008*t(1:3,1)); > > Where does this 0.008 come from? I have changed this number to try > it out but did't see any clear differences in the gradiometer > positions. > > Thanks in advance for your help, > Wishing you all the best, > > Hanneke > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fab.meneghini at GMAIL.COM Tue Sep 15 23:41:36 2009 From: fab.meneghini at GMAIL.COM (Fabio Meneghini) Date: Tue, 15 Sep 2009 23:41:36 +0200 Subject: EEG forward modelling using BEM Message-ID: Hi to all, Please help me, it took me a lot of trials and troubles to avoid annoying people with (possibly) trivial issues....but eventually I don't know what else remains to try... I'm new using FieldTrip, and I'm mainly interested in computing the EEG forward model on a standard MNI head model (MNI152, the one you can find in FSL software package), using BEM algorithm on 3, or better 4 surfaces. First of all: has anyone ever done this before? If so, this might save me a lot of hard times... I read the the tutorial about building BEM meshes models, but let's suppose I already have my model segmentation image (182x217x182 voxels, filled with integers numbers). Can I start from that, ignoring the original MRI images? I got my eeg channels coordinates. Are they supposed to be expressed in mm, rather than meters? What is the origin of the coordinates intended to be? And what about the conductivities of the various compartments? where can I set them? Waiting for some light in the dark, thank you for your attention. best, Fabio Meneghini ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From fab.meneghini at GMAIL.COM Wed Sep 16 00:10:00 2009 From: fab.meneghini at GMAIL.COM (Fabio Meneghini) Date: Wed, 16 Sep 2009 00:10:00 +0200 Subject: loading BEMs and segmented images Message-ID: Hi Gustavo, I'm currently facing the same problem. Did you manage to resolve it? We may help each other? cheers, Fabio Meneghini ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From boninc at NINDS.NIH.GOV Wed Sep 16 19:05:41 2009 From: boninc at NINDS.NIH.GOV (Bonin, Claudia (NIH/NINDS) [F]) Date: Wed, 16 Sep 2009 13:05:41 -0400 Subject: freqstastics script In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B0F34B3@Mail2-UKD.VMED.UKD> Message-ID: Hi. I am having trouble getting a freqstastics script to run to do a Kruskalwallis test. Thre freqgrandaverage works but I am having trouble with the arguments for the Kruskalwallis. I have pasted in the script and the error message in this email. Has anyone written a script using freqsstatistics to do Kruskalwallis? I would love to see it or get some direction on the arguments that need to be assigned....Also I made up an argument for cfg.design but I don't really understand what this assignment is. Could anyone elaborate? Thank you! claudia Bonin here's the error message isnan(data.time) ??? Undefined function or method 'isnan' for input arguments of type 'cell'. computing average power over 21 subjects Warning: discarding gradiometer information > In freqgrandaverage at 121 In tf2_virt_all_plot at 11 here's the script..... Nsubj = 21; for subj = 1:Nsubj fname = ['/home/boninc/tfresults/subj' 64 + subj]; clear fr load(fname); frs(subj) = fr; end cfg = []; [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); %cfg = []; %cfg.alpha = .05; %cfg.method = 'stats'; %cfg.design = 1:21; %cfg.statistic = 'kruskalwallis'; %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); clf contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar %contourf(gr.time, gr.freq, gr.powspctrm); colorbar title '21 Subjects, RandL, RIGHT Central Motor' xlabel 'time, sec' ylabel 'frequency, Hz' ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] Sent: Thursday, September 10, 2009 7:21 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script Dear Claudia, Normally when matlab says 'undefined function for input of type ....' it means it cannot find the specific function in the paths you have defined. You can check whether neighbourselection.m is in your fieldtrip folder, if not I have attached it (version 20090428) so you can put it there. If this doesn't fix it please let me know! Groetjes Hanneke -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) [F] Gesendet: Mi 09.09.2009 18:26 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] freqstastics script I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. thanks! claudia >> cfg.statistic = 'kruskalwallis'; >> cfg.method = 'stats'; >> [s] = freqstatistics(cfg, fr, fr); averaging over 3 channels selected 50 time bins selected 41 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip/private/prepare_timefreq_data at 305 In fieldtrip/private/statistics_wrapper at 167 In freqstatistics at 44 ??? Undefined function or method 'neighbourselection' for input arguments of type 'struct'. Error in ==> statistics_wrapper at 181 cfg = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 44 [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From P.Toffanin at RUG.NL Wed Sep 16 22:27:54 2009 From: P.Toffanin at RUG.NL (P. Toffanin) Date: Wed, 16 Sep 2009 22:27:54 +0200 Subject: freqstastics script Message-ID: Dear Claudia, the first error message seems a 'matlab-related error', it does not have anything to do with fieldtrip, but just with the way you use matlab. Basically matlab is complaining because the function you are using is not defined to use cell types. I believe that data.time is probably containing something like data.time = {1,2,3}; then, what you should do, is to use the function like this: isnan(data.time{:}) % this will show the content of data.time "ignoring" that it is a cell rather than isnan(data.time) % this will feed a cell to the isnan function, which uses arrays of numbers About the warning message you get I cannot help you with that one, I'm sorry. The best of luck! Paolo On 16/09/09, "Bonin, Claudia (NIH/NINDS) [F]" wrote: > > Hi. I am having trouble getting a freqstastics script to run to do a Kruskalwallis test. Thre freqgrandaverage works but I am having trouble with the arguments for the Kruskalwallis. I have pasted in the script and the error message in this email.  Has anyone written a script using freqsstatistics to do Kruskalwallis? I would love to see it or get some direction on the arguments that need to be assigned....Also I made up an argument for cfg.design but I don't really understand what this assignment is. Could anyone elaborate? > Thank you! > claudia Bonin > > > > > > here's the error message > >  isnan(data.time) > ??? Undefined function or method 'isnan' for input arguments of type 'cell'. >   > computing average power over 21 subjects > Warning: discarding gradiometer information > > In freqgrandaverage at 121 >   In tf2_virt_all_plot at 11 > > here's the script..... > > > Nsubj = 21; > > for subj = 1:Nsubj >     fname = ['/home/boninc/tfresults/subj' 64 + subj]; >     clear fr >     load(fname); >     frs(subj) = fr; > end > > cfg = []; > [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); > > %cfg = []; > %cfg.alpha = .05; > %cfg.method = 'stats'; > %cfg.design = 1:21; > %cfg.statistic = 'kruskalwallis'; > %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); > > clf > contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar > %contourf(gr.time, gr.freq, gr.powspctrm); colorbar > > title '21 Subjects, RandL, RIGHT Central Motor' > xlabel 'time, sec' > ylabel 'frequency, Hz' > > > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] > Sent: Thursday, September 10, 2009 7:21 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script > > Dear Claudia, > > Normally when matlab says 'undefined function for input of type ....' it means it cannot find the specific function in the paths you have defined. You can check whether neighbourselection.m is in your fieldtrip folder, if not I have attached it (version 20090428) so you can put it there. If this doesn't fix it please let me know! > > Groetjes Hanneke > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) [F] > Gesendet: Mi 09.09.2009 18:26 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] freqstastics script > > I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. > thanks! > claudia > > > >> cfg.statistic = 'kruskalwallis'; > >> cfg.method = 'stats'; > >> [s] = freqstatistics(cfg, fr, fr); > averaging over 3 channels > selected 50 time bins > selected 41 frequency bins > Warning: PACK can only be used from the MATLAB command line. > > In fieldtrip/private/prepare_timefreq_data at 305 >   In fieldtrip/private/statistics_wrapper at 167 >   In freqstatistics at 44 > ??? Undefined function or method 'neighbourselection' for input arguments of type > 'struct'. > > Error in ==> statistics_wrapper at 181 >     cfg = neighbourselection(cfg,varargin{1}); > > Error in ==> freqstatistics at 44 > [stat] = statistics_wrapper(cfg, varargin{:}); > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html (http://listserv.surfnet.nl/archives/fieldtrip.html) and http://www.ru.nl/neuroimaging/fieldtrip. (http://www.ru.nl/neuroimaging/fieldtrip.) > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html (http://listserv.surfnet.nl/archives/fieldtrip.html) and http://www.ru.nl/neuroimaging/fieldtrip. (http://www.ru.nl/neuroimaging/fieldtrip.) > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html (http://listserv.surfnet.nl/archives/fieldtrip.html) and http://www.ru.nl/neuroimaging/fieldtrip. (http://www.ru.nl/neuroimaging/fieldtrip.) > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.piantoni at NIN.KNAW.NL Thu Sep 17 13:28:02 2009 From: g.piantoni at NIN.KNAW.NL (Giovanni Piantoni) Date: Thu, 17 Sep 2009 13:28:02 +0200 Subject: amplitude modulation on planar MEG Message-ID: Dear Fieldtrip users, I do not know how to find the time points in which the amplitude in a frequency band (say, alpha, 8-12 Hz) is higher than a threshold. I am using axial (CTF) MEG data, but I want to find the amplitude modulation on the planar gradient (as it makes more physiological sense). On EEG data, I would 1_ bandpass the data between 8-12 Hz, 2_ take the envelope (f.e. with a hilbert transform), 3_ find all the time points that are above the threshold. On MEG data, I do not know what to do, considering that I cannot really bandpass planar data, as they are always positive. Which option is the best? 1_ bandpass on axial, then megplanar, combineplanar and take envelope on the combined planar, and then find the time points above the threshold. 2_ bandpass on axial, then megplanar, and take the envelope for the two components and use those to determine when the amplitude is above the threshold (but how can I combine the two then?) Or any other option? I am very confused about this issue. Any help is greatly appreciated! Thanks, Giovanni ------ Giovanni Piantoni, Ph.D. student Dept. Sleep & Cognition Netherlands Institute for Neuroscience Meibergdreef 47 1105 BA Amsterdam (NL) +31 (0)20 5665492 g.piantoni at nin.knaw.nl www.nin.knaw.nl/research_teams/van_someren_group ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From boninc at NINDS.NIH.GOV Thu Sep 17 16:59:03 2009 From: boninc at NINDS.NIH.GOV (Bonin, Claudia (NIH/NINDS) [F]) Date: Thu, 17 Sep 2009 10:59:03 -0400 Subject: freqstastics script In-Reply-To: <7390d1b5338b.4ab1666a@rug.nl> Message-ID: Hi everyone. I am trying to use Fieldtrip and the function freqstatistics to run the kruskalwallis test across subjects after doing the grandaverage. The grandaverage works but I am confused about some of the arguments for the freqstatistics function. I have pasted in the lines from my script below. I am particularly wondering if anyone has used this successfully before and if so what is the cfg.design command asking for and am I missing any other command/inputs for the kruskalwallis/freqstatistics function? Any comments would be much appreciated. claudia bonin [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); %cfg = []; %cfg.alpha = .05; %cfg.method = 'stats'; %cfg.design = 1:21; %cfg.statistic = 'kruskalwallis'; %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of P. Toffanin [P.Toffanin at RUG.NL] Sent: Wednesday, September 16, 2009 4:27 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] freqstastics script Dear Claudia, the first error message seems a 'matlab-related error', it does not have anything to do with fieldtrip, but just with the way you use matlab. Basically matlab is complaining because the function you are using is not defined to use cell types. I believe that data.time is probably containing something like data.time = {1,2,3}; then, what you should do, is to use the function like this: isnan(data.time{:}) % this will show the content of data.time "ignoring" that it is a cell rather than isnan(data.time) % this will feed a cell to the isnan function, which uses arrays of numbers About the warning message you get I cannot help you with that one, I'm sorry. The best of luck! Paolo On 16/09/09, "Bonin, Claudia (NIH/NINDS) [F]" wrote: Hi. I am having trouble getting a freqstastics script to run to do a Kruskalwallis test. Thre freqgrandaverage works but I am having trouble with the arguments for the Kruskalwallis. I have pasted in the script and the error message in this email. Has anyone written a script using freqsstatistics to do Kruskalwallis? I would love to see it or get some direction on the arguments that need to be assigned....Also I made up an argument for cfg.design but I don't really understand what this assignment is. Could anyone elaborate? Thank you! claudia Bonin here's the error message isnan(data.time) ??? Undefined function or method 'isnan' for input arguments of type 'cell'. computing average power over 21 subjects Warning: discarding gradiometer information > In freqgrandaverage at 121 In tf2_virt_all_plot at 11 here's the script..... Nsubj = 21; for subj = 1:Nsubj fname = ['/home/boninc/tfresults/subj' 64 + subj]; clear fr load(fname); frs(subj) = fr; end cfg = []; [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); %cfg = []; %cfg.alpha = .05; %cfg.method = 'stats'; %cfg.design = 1:21; %cfg.statistic = 'kruskalwallis'; %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); clf contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar %contourf(gr.time, gr.freq, gr.powspctrm); colorbar title '21 Subjects, RandL, RIGHT Central Motor' xlabel 'time, sec' ylabel 'frequency, Hz' ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] Sent: Thursday, September 10, 2009 7:21 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script Dear Claudia, Normally when matlab says 'undefined function for input of type ....' it means it cannot find the specific function in the paths you have defined. You can check whether neighbourselection.m is in your fieldtrip folder, if not I have attached it (version 20090428) so you can put it there. If this doesn't fix it please let me know! Groetjes Hanneke -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) [F] Gesendet: Mi 09.09.2009 18:26 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] freqstastics script I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. thanks! claudia >> cfg.statistic = 'kruskalwallis'; >> cfg.method = 'stats'; >> [s] = freqstatistics(cfg, fr, fr); averaging over 3 channels selected 50 time bins selected 41 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip/private/prepare_timefreq_data at 305 In fieldtrip/private/statistics_wrapper at 167 In freqstatistics at 44 ??? Undefined function or method 'neighbourselection' for input arguments of type 'struct'. Error in ==> statistics_wrapper at 181 cfg = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 44 [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From boninc at NINDS.NIH.GOV Fri Sep 18 21:15:55 2009 From: boninc at NINDS.NIH.GOV (Bonin, Claudia (NIH/NINDS) [F]) Date: Fri, 18 Sep 2009 15:15:55 -0400 Subject: freqstastics script In-Reply-To: <42BB71E278C5804494BA79D3B24B0A7F161DA99B@NIHMLBX10.nih.gov> Message-ID: DOES ANYONE KNOW HOW TO USE THE FIELDTRIP FUNCTION FREQSTATISTICS TO RUN A KRUSKALWALLIS TEST? -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Bonin, Claudia (NIH/NINDS) [F] Sent: Wednesday, September 16, 2009 1:06 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] freqstastics script Hi. I am having trouble getting a freqstastics script to run to do a Kruskalwallis test. Thre freqgrandaverage works but I am having trouble with the arguments for the Kruskalwallis. I have pasted in the script and the error message in this email. Has anyone written a script using freqsstatistics to do Kruskalwallis? I would love to see it or get some direction on the arguments that need to be assigned....Also I made up an argument for cfg.design but I don't really understand what this assignment is. Could anyone elaborate? Thank you! claudia Bonin here's the error message isnan(data.time) ??? Undefined function or method 'isnan' for input arguments of type 'cell'. computing average power over 21 subjects Warning: discarding gradiometer information > In freqgrandaverage at 121 In tf2_virt_all_plot at 11 here's the script..... Nsubj = 21; for subj = 1:Nsubj fname = ['/home/boninc/tfresults/subj' 64 + subj]; clear fr load(fname); frs(subj) = fr; end cfg = []; [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); %cfg = []; %cfg.alpha = .05; %cfg.method = 'stats'; %cfg.design = 1:21; %cfg.statistic = 'kruskalwallis'; %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); clf contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar %contourf(gr.time, gr.freq, gr.powspctrm); colorbar title '21 Subjects, RandL, RIGHT Central Motor' xlabel 'time, sec' ylabel 'frequency, Hz' ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] Sent: Thursday, September 10, 2009 7:21 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script Dear Claudia, Normally when matlab says 'undefined function for input of type ....' it means it cannot find the specific function in the paths you have defined. You can check whether neighbourselection.m is in your fieldtrip folder, if not I have attached it (version 20090428) so you can put it there. If this doesn't fix it please let me know! Groetjes Hanneke -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) [F] Gesendet: Mi 09.09.2009 18:26 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] freqstastics script I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. thanks! claudia >> cfg.statistic = 'kruskalwallis'; >> cfg.method = 'stats'; >> [s] = freqstatistics(cfg, fr, fr); averaging over 3 channels selected 50 time bins selected 41 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip/private/prepare_timefreq_data at 305 In fieldtrip/private/statistics_wrapper at 167 In freqstatistics at 44 ??? Undefined function or method 'neighbourselection' for input arguments of type 'struct'. Error in ==> statistics_wrapper at 181 cfg = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 44 [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Sat Sep 19 10:56:08 2009 From: j.schoffelen at PSY.GLA.AC.UK (Jan-Mathijs Schoffelen) Date: Sat, 19 Sep 2009 08:56:08 +0000 Subject: freqstastics script In-Reply-To: <42BB71E278C5804494BA79D3B24B0A7F161AD42D@NIHMLBX10.nih.gov> Message-ID: You will have to write a statfun_kruskalwallis. Best, Jan-Mathijs On 18 Sep 2009, at 19:15, Bonin, Claudia (NIH/NINDS) [F] wrote: > DOES ANYONE KNOW HOW TO USE THE FIELDTRIP FUNCTION FREQSTATISTICS TO > RUN A KRUSKALWALLIS TEST? > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Bonin, Claudia (NIH/NINDS) [F] > Sent: Wednesday, September 16, 2009 1:06 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] freqstastics script > > Hi. I am having trouble getting a freqstastics script to run to do a > Kruskalwallis test. Thre freqgrandaverage works but I am having > trouble with the arguments for the Kruskalwallis. I have pasted in > the script and the error message in this email. Has anyone written > a script using freqsstatistics to do Kruskalwallis? I would love to > see it or get some direction on the arguments that need to be > assigned....Also I made up an argument for cfg.design but I don't > really understand what this assignment is. Could anyone elaborate? > Thank you! > claudia Bonin > > > > > > here's the error message > > isnan(data.time) > ??? Undefined function or method 'isnan' for input arguments of type > 'cell'. > > computing average power over 21 subjects > Warning: discarding gradiometer information >> In freqgrandaverage at 121 > In tf2_virt_all_plot at 11 > > here's the script..... > > > Nsubj = 21; > > for subj = 1:Nsubj > fname = ['/home/boninc/tfresults/subj' 64 + subj]; > clear fr > load(fname); > frs(subj) = fr; > end > > cfg = []; > [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), > frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), > frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), > frs(21)); > > %cfg = []; > %cfg.alpha = .05; > %cfg.method = 'stats'; > %cfg.design = 1:21; > %cfg.statistic = 'kruskalwallis'; > %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), > frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), > frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), > frs(20), frs(21)); > > clf > contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar > %contourf(gr.time, gr.freq, gr.powspctrm); colorbar > > title '21 Subjects, RandL, RIGHT Central Motor' > xlabel 'time, sec' > ylabel 'frequency, Hz' > > > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] > Sent: Thursday, September 10, 2009 7:21 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script > > Dear Claudia, > > Normally when matlab says 'undefined function for input of > type ....' it means it cannot find the specific function in the > paths you have defined. You can check whether neighbourselection.m > is in your fieldtrip folder, if not I have attached it (version > 20090428) so you can put it there. If this doesn't fix it please let > me know! > > Groetjes Hanneke > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/ > NINDS) [F] > Gesendet: Mi 09.09.2009 18:26 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] freqstastics script > > I am trying to do statistics on time-frequency data across 16 > subjects, averaging over channels. I received back the following > error about 'neighbourselection' which means nothing to me.....Does > anyone have any idea what might be wrong here? I have pasted in the > exact message below. > thanks! > claudia > > >>> cfg.statistic = 'kruskalwallis'; >>> cfg.method = 'stats'; >>> [s] = freqstatistics(cfg, fr, fr); > averaging over 3 channels > selected 50 time bins > selected 41 frequency bins > Warning: PACK can only be used from the MATLAB command line. >> In fieldtrip/private/prepare_timefreq_data at 305 > In fieldtrip/private/statistics_wrapper at 167 > In freqstatistics at 44 > ??? Undefined function or method 'neighbourselection' for input > arguments of type > 'struct'. > > Error in ==> statistics_wrapper at 181 > cfg = neighbourselection(cfg,varargin{1}); > > Error in ==> freqstatistics at 44 > [stat] = statistics_wrapper(cfg, varargin{:}); > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From boninc at NINDS.NIH.GOV Sat Sep 19 16:33:50 2009 From: boninc at NINDS.NIH.GOV (Bonin, Claudia (NIH/NINDS) [F]) Date: Sat, 19 Sep 2009 10:33:50 -0400 Subject: freqstastics script In-Reply-To: <1C4AF3D4-BC7B-402A-BFB3-140950BB560F@psy.gla.ac.uk> Message-ID: I'm just surprised no one has written one before. MEG data generally requires non-parametric statistics and the kruskalwallis test for freqstatistics was the only option I found for this in fieldtrip. Am I right about this? -----Original Message----- From: Jan-Mathijs Schoffelen [mailto:j.schoffelen at PSY.GLA.AC.UK] Sent: Saturday, September 19, 2009 4:56 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] freqstastics script You will have to write a statfun_kruskalwallis. Best, Jan-Mathijs On 18 Sep 2009, at 19:15, Bonin, Claudia (NIH/NINDS) [F] wrote: > DOES ANYONE KNOW HOW TO USE THE FIELDTRIP FUNCTION FREQSTATISTICS TO > RUN A KRUSKALWALLIS TEST? > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Bonin, Claudia (NIH/NINDS) [F] > Sent: Wednesday, September 16, 2009 1:06 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] freqstastics script > > Hi. I am having trouble getting a freqstastics script to run to do a > Kruskalwallis test. Thre freqgrandaverage works but I am having > trouble with the arguments for the Kruskalwallis. I have pasted in > the script and the error message in this email. Has anyone written > a script using freqsstatistics to do Kruskalwallis? I would love to > see it or get some direction on the arguments that need to be > assigned....Also I made up an argument for cfg.design but I don't > really understand what this assignment is. Could anyone elaborate? > Thank you! > claudia Bonin > > > > > > here's the error message > > isnan(data.time) > ??? Undefined function or method 'isnan' for input arguments of type > 'cell'. > > computing average power over 21 subjects > Warning: discarding gradiometer information >> In freqgrandaverage at 121 > In tf2_virt_all_plot at 11 > > here's the script..... > > > Nsubj = 21; > > for subj = 1:Nsubj > fname = ['/home/boninc/tfresults/subj' 64 + subj]; > clear fr > load(fname); > frs(subj) = fr; > end > > cfg = []; > [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), > frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), > frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), > frs(21)); > > %cfg = []; > %cfg.alpha = .05; > %cfg.method = 'stats'; > %cfg.design = 1:21; > %cfg.statistic = 'kruskalwallis'; > %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), > frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), > frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), > frs(20), frs(21)); > > clf > contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar > %contourf(gr.time, gr.freq, gr.powspctrm); colorbar > > title '21 Subjects, RandL, RIGHT Central Motor' > xlabel 'time, sec' > ylabel 'frequency, Hz' > > > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] > Sent: Thursday, September 10, 2009 7:21 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script > > Dear Claudia, > > Normally when matlab says 'undefined function for input of > type ....' it means it cannot find the specific function in the > paths you have defined. You can check whether neighbourselection.m > is in your fieldtrip folder, if not I have attached it (version > 20090428) so you can put it there. If this doesn't fix it please let > me know! > > Groetjes Hanneke > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/ > NINDS) [F] > Gesendet: Mi 09.09.2009 18:26 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] freqstastics script > > I am trying to do statistics on time-frequency data across 16 > subjects, averaging over channels. I received back the following > error about 'neighbourselection' which means nothing to me.....Does > anyone have any idea what might be wrong here? I have pasted in the > exact message below. > thanks! > claudia > > >>> cfg.statistic = 'kruskalwallis'; >>> cfg.method = 'stats'; >>> [s] = freqstatistics(cfg, fr, fr); > averaging over 3 channels > selected 50 time bins > selected 41 frequency bins > Warning: PACK can only be used from the MATLAB command line. >> In fieldtrip/private/prepare_timefreq_data at 305 > In fieldtrip/private/statistics_wrapper at 167 > In freqstatistics at 44 > ??? Undefined function or method 'neighbourselection' for input > arguments of type > 'struct'. > > Error in ==> statistics_wrapper at 181 > cfg = neighbourselection(cfg,varargin{1}); > > Error in ==> freqstatistics at 44 > [stat] = statistics_wrapper(cfg, varargin{:}); > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From manish.saggar at GMAIL.COM Sat Sep 19 18:01:41 2009 From: manish.saggar at GMAIL.COM (Manish Saggar) Date: Sat, 19 Sep 2009 11:01:41 -0500 Subject: [HELP] Clusterplot not highlighting clusters Message-ID: All, Any help is appreciated. Please let me know if I am doing any mistake. Original email is below. Regards, Manish On Wed, Sep 9, 2009 at 11:56 AM, Manish Saggar wrote: > Dear All, > > I am a novice user of FieldTrip and I love the tools provided by you > guys. Great work. > > I have a question, regarding the analysis I recently did. Any help is > appreciated. I am confused why the cluster is not mapped on the areas > that visually show clear reduction. > > I am comparing two conditions (with-in subjects) using depSamplesT > statistic. Both of the conditions are 1 min of EEG data and I > calculate powerspectrum over those 1 min windows using segment of 1 > second windows with 50% overlap. Condition are named as pre and post. > > I have attached topoplotER of power spectrum for each condition in > alpha band (8-12Hz). Clearly in post there is reduced power in left > (mainly) and right hemispheres at the back of the head as compared to > pre. However in the clusterplot (raweffect) the cluster is mainly > situated in midline frontal and parietal areas. Actually it is quite a > large cluster, covering almost all channels. The thing that worries me > is that it just didn't cover the the channels which clearly shows > difference by visual inspection between two conditions. > Also shouldn't the cluster be located only (or mainly) where the > difference can be seen in pre and post topoplots. > > For convenience I have plotted all plots with same zlim. > > Here is the code that I used for running stats: > ------- >        cfg = []; >        cfg.channel          = {'all'}; >        cfg.latency          = 'all'; >        cfg.frequency        = foi; >        cfg.method           = 'montecarlo'; >        cfg.statistic        = depsamplesT; >        cfg.correctm         = 'cluster'; >        cfg.clusteralpha     = 0.05; >        cfg.clusterstatistic = 'maxsum'; >        cfg.minnbchan        = 2;   %works best. >        cfg.tail             = 0; >        cfg.clustertail      = 0; >        cfg.alpha            = 0.025; >        cfg.numrandomization = 1000; > >        subj = 28; > >        design = zeros(2,2*subj); >        for i = 1:1:subj >           design(1,i) = i; >           design(1,subj+i) = i; >        end >        design(2,1:subj) = 1; >        design(2,subj+1:2*subj) = 2; >        cfg.design = design; >        cfg.uvar = 1; >        cfg.ivar = 2; >        cfg.layout = 'ng.sfp'; >        cfg.neighbourdist = 0.1; % this gives the neighbor count on > average to 3.2 >        cfg.avgoverfreq = 'yes'; >        stat{win} = freqstatistics(cfg, post, pre); > ---------- > > Regards, > Manish > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: pre-post-alpha-diff.tiff Type: image/tiff Size: 203224 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Sat Sep 19 22:26:40 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Sat, 19 Sep 2009 22:26:40 +0200 Subject: freqstastics script In-Reply-To: <42BB71E278C5804494BA79D3B24B0A7F161AD430@NIHMLBX10.nih.gov> Message-ID: Dear Claudia, > I'm just surprised no one has written one before. MEG data generally requires non- > parametric statistics and the kruskalwallis test for freqstatistics was the only option > I found for this in fieldtrip. Am I right about this? The story is a bit more complicated. One must make a distinction between a test statistic and its reference distribution (the distribution under which the p-value is calculated). Many users of Fieldtrip use it to do cluster-based permutation tests. These are non-parametric tests because the p-value is calculated under a non-parametric reference distribution. However, the test statistic for which this p-value is calculated often involves the classical test statistics like F and T, for which parametric reference distributions exist. These parametric reference distributions do not play role in the whether or not the cluster-based permutation tests control the false alarm rate. This argument allows one to do non-parametric testing with test statistics that are inspired by classical parametric statistics. This is all much better explained in Maris & Oostenveld (2007). Thus, the Kruskal-Wallis test statistic is not required if you want to use the non-parametric cluster-based permutation tests in Fieldtrip. I'm sorry if this sounds complicated. One just needs to go a little bit in the theory to get the ideas straight. Best, Eric Maris > > -----Original Message----- > From: Jan-Mathijs Schoffelen [mailto:j.schoffelen at PSY.GLA.AC.UK] > Sent: Saturday, September 19, 2009 4:56 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] freqstastics script > > You will have to write a statfun_kruskalwallis. > > Best, > > Jan-Mathijs > > > > On 18 Sep 2009, at 19:15, Bonin, Claudia (NIH/NINDS) [F] wrote: > > > DOES ANYONE KNOW HOW TO USE THE FIELDTRIP FUNCTION > FREQSTATISTICS TO > > RUN A KRUSKALWALLIS TEST? > > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Bonin, Claudia (NIH/NINDS) [F] > > Sent: Wednesday, September 16, 2009 1:06 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: Re: [FIELDTRIP] freqstastics script > > > > Hi. I am having trouble getting a freqstastics script to run to do a > > Kruskalwallis test. Thre freqgrandaverage works but I am having > > trouble with the arguments for the Kruskalwallis. I have pasted in > > the script and the error message in this email. Has anyone written > > a script using freqsstatistics to do Kruskalwallis? I would love to > > see it or get some direction on the arguments that need to be > > assigned....Also I made up an argument for cfg.design but I don't > > really understand what this assignment is. Could anyone elaborate? > > Thank you! > > claudia Bonin > > > > > > > > > > > > here's the error message > > > > isnan(data.time) > > ??? Undefined function or method 'isnan' for input arguments of type > > 'cell'. > > > > computing average power over 21 subjects > > Warning: discarding gradiometer information > >> In freqgrandaverage at 121 > > In tf2_virt_all_plot at 11 > > > > here's the script..... > > > > > > Nsubj = 21; > > > > for subj = 1:Nsubj > > fname = ['/home/boninc/tfresults/subj' 64 + subj]; > > clear fr > > load(fname); > > frs(subj) = fr; > > end > > > > cfg = []; > > [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), > > frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), > > frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), > > frs(21)); > > > > %cfg = []; > > %cfg.alpha = .05; > > %cfg.method = 'stats'; > > %cfg.design = 1:21; > > %cfg.statistic = 'kruskalwallis'; > > %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), > > frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), > > frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), > > frs(20), frs(21)); > > > > clf > > contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar > > %contourf(gr.time, gr.freq, gr.powspctrm); colorbar > > > > title '21 Subjects, RandL, RIGHT Central Motor' > > xlabel 'time, sec' > > ylabel 'frequency, Hz' > > > > > > ________________________________________ > > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > > Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] > > Sent: Thursday, September 10, 2009 7:21 AM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script > > > > Dear Claudia, > > > > Normally when matlab says 'undefined function for input of > > type ....' it means it cannot find the specific function in the > > paths you have defined. You can check whether neighbourselection.m > > is in your fieldtrip folder, if not I have attached it (version > > 20090428) so you can put it there. If this doesn't fix it please let > > me know! > > > > Groetjes Hanneke > > > > > > -----Ursprüngliche Nachricht----- > > Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/ > > NINDS) [F] > > Gesendet: Mi 09.09.2009 18:26 > > An: FIELDTRIP at NIC.SURFNET.NL > > Betreff: [FIELDTRIP] freqstastics script > > > > I am trying to do statistics on time-frequency data across 16 > > subjects, averaging over channels. I received back the following > > error about 'neighbourselection' which means nothing to me.....Does > > anyone have any idea what might be wrong here? I have pasted in the > > exact message below. > > thanks! > > claudia > > > > > >>> cfg.statistic = 'kruskalwallis'; > >>> cfg.method = 'stats'; > >>> [s] = freqstatistics(cfg, fr, fr); > > averaging over 3 channels > > selected 50 time bins > > selected 41 frequency bins > > Warning: PACK can only be used from the MATLAB command line. > >> In fieldtrip/private/prepare_timefreq_data at 305 > > In fieldtrip/private/statistics_wrapper at 167 > > In freqstatistics at 44 > > ??? Undefined function or method 'neighbourselection' for input > > arguments of type > > 'struct'. > > > > Error in ==> statistics_wrapper at 181 > > cfg = neighbourselection(cfg,varargin{1}); > > > > Error in ==> freqstatistics at 44 > > [stat] = statistics_wrapper(cfg, varargin{:}); > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > > of the FieldTrip toolbox, to share experiences and to discuss new > > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html > > and http://www.ru.nl/neuroimaging/fieldtrip. > > > > > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > > of the FieldTrip toolbox, to share experiences and to discuss new > > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html > > and http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > > of the FieldTrip toolbox, to share experiences and to discuss new > > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html > > and http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > > of the FieldTrip toolbox, to share experiences and to discuss new > > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html > > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From tomh at KURAGE.NIMH.NIH.GOV Sat Sep 19 23:01:48 2009 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Sat, 19 Sep 2009 17:01:48 -0400 Subject: freqstastics script Message-ID: I think what Claudia is asking is, given some time-frequency data, and some groups of subjects, how does one use fieldtrip to do a statistical test? There is code in there, somebody must have done it before. One could export the TF grids to AFNI and use 3dWilcoxon or other tests .. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Sat Sep 19 23:30:09 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Sat, 19 Sep 2009 23:30:09 +0200 Subject: freqstastics script In-Reply-To: <200909192101.n8JL1mUK012092@kurage.nimh.nih.gov> Message-ID: Hi Tom and Claudia, > I think what Claudia is asking is, given some time-frequency data, and some > groups of subjects, how does one use fieldtrip to do a statistical test? > There is code in there, somebody must have done it before. OK, I may have misunderstood. I checked the Fieldtrip code, and the Kruskall-Wallis test can be chosen as an option in statistics_stats. This function is actually a wrapper that calls functions from the Matlab Statistics Toolbox. Do you have this toolbox Claudia? I don't know how thoroughly this function has been tested. Given that it's just a wrapper, it is probably easy to localize the error by using Matlab's debugging tools. Best, Eric > One could export the TF grids to AFNI and use 3dWilcoxon or > other tests .. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From tomh at KURAGE.NIMH.NIH.GOV Sat Sep 19 23:34:10 2009 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Sat, 19 Sep 2009 17:34:10 -0400 Subject: freqstastics script Message-ID: the cfg.design in particular, how would one set that up for a group of time-frequency plots? ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From hanneke.p.van.dijk at GMAIL.COM Wed Sep 23 09:10:12 2009 From: hanneke.p.van.dijk at GMAIL.COM (Hanneke van Dijk) Date: Wed, 23 Sep 2009 09:10:12 +0200 Subject: freqstastics script In-Reply-To: <42BB71E278C5804494BA79D3B24B0A7F161AD42D@NIHMLBX10.nih.gov> Message-ID: Hi Claudia, I think that if you want to do non-parametric tests using fieldtrip the cluster randomization statistics routines would help you a great deal. I think a lot of people using fieldtrip are using this method. You could have a look at this site: http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_freq and the paper: *Eric Maris, Robert Oostenveld, Nonparametric statistical testing of EEG- and MEG-data, Journal of Neuroscience Methods, Volume 164, Issue 1, 15 August 2007, Pages 177-190, ISSN 0165-0270, DOI: 10.1016/j.jneumeth.2007.03.024. (http://www.sciencedirect.com/science/article/B6T04-4NFXDDW-1/2/ebd219fd45cb52bf39c710fe25635040) Keywords: Nonparametric statistical testing; Hypothesis testing; EEG; MEG; Multiple comparisons problem* Also, this mailing list is not a help desk but is read by fellow researchers also using fieldtrip. And I would like to say that although it sometimes takes a little while before you get your answer, that is because everybody is busy and I am impressed and happy with the way everybody on this list is nice enough to take the time to help eachother! Best, Hanneke On Fri, Sep 18, 2009 at 9:15 PM, Bonin, Claudia (NIH/NINDS) [F] < boninc at ninds.nih.gov> wrote: > DOES ANYONE KNOW HOW TO USE THE FIELDTRIP FUNCTION FREQSTATISTICS TO RUN A > KRUSKALWALLIS TEST? > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Bonin, Claudia (NIH/NINDS) [F] > Sent: Wednesday, September 16, 2009 1:06 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] freqstastics script > > Hi. I am having trouble getting a freqstastics script to run to do a > Kruskalwallis test. Thre freqgrandaverage works but I am having trouble with > the arguments for the Kruskalwallis. I have pasted in the script and the > error message in this email. Has anyone written a script using > freqsstatistics to do Kruskalwallis? I would love to see it or get some > direction on the arguments that need to be assigned....Also I made up an > argument for cfg.design but I don't really understand what this assignment > is. Could anyone elaborate? > Thank you! > claudia Bonin > > > > > > here's the error message > > isnan(data.time) > ??? Undefined function or method 'isnan' for input arguments of type > 'cell'. > > computing average power over 21 subjects > Warning: discarding gradiometer information > > In freqgrandaverage at 121 > In tf2_virt_all_plot at 11 > > here's the script..... > > > Nsubj = 21; > > for subj = 1:Nsubj > fname = ['/home/boninc/tfresults/subj' 64 + subj]; > clear fr > load(fname); > frs(subj) = fr; > end > > cfg = []; > [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), > frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), > frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); > > %cfg = []; > %cfg.alpha = .05; > %cfg.method = 'stats'; > %cfg.design = 1:21; > %cfg.statistic = 'kruskalwallis'; > %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), > frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), > frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); > > clf > contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar > %contourf(gr.time, gr.freq, gr.powspctrm); colorbar > > title '21 Subjects, RandL, RIGHT Central Motor' > xlabel 'time, sec' > ylabel 'frequency, Hz' > > > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of > Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] > Sent: Thursday, September 10, 2009 7:21 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script > > Dear Claudia, > > Normally when matlab says 'undefined function for input of type ....' it > means it cannot find the specific function in the paths you have defined. > You can check whether neighbourselection.m is in your fieldtrip folder, if > not I have attached it (version 20090428) so you can put it there. If this > doesn't fix it please let me know! > > Groetjes Hanneke > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) > [F] > Gesendet: Mi 09.09.2009 18:26 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] freqstastics script > > I am trying to do statistics on time-frequency data across 16 subjects, > averaging over channels. I received back the following error about > 'neighbourselection' which means nothing to me.....Does anyone have any idea > what might be wrong here? I have pasted in the exact message below. > thanks! > claudia > > > >> cfg.statistic = 'kruskalwallis'; > >> cfg.method = 'stats'; > >> [s] = freqstatistics(cfg, fr, fr); > averaging over 3 channels > selected 50 time bins > selected 41 frequency bins > Warning: PACK can only be used from the MATLAB command line. > > In fieldtrip/private/prepare_timefreq_data at 305 > In fieldtrip/private/statistics_wrapper at 167 > In freqstatistics at 44 > ??? Undefined function or method 'neighbourselection' for input arguments > of type > 'struct'. > > Error in ==> statistics_wrapper at 181 > cfg = neighbourselection(cfg,varargin{1}); > > Error in ==> freqstatistics at 44 > [stat] = statistics_wrapper(cfg, varargin{:}); > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hanneke.p.van.dijk at GMAIL.COM Wed Sep 23 09:31:18 2009 From: hanneke.p.van.dijk at GMAIL.COM (Hanneke van Dijk) Date: Wed, 23 Sep 2009 09:31:18 +0200 Subject: freqstastics script In-Reply-To: <200909192134.n8JLYAE8012315@kurage.nimh.nih.gov> Message-ID: Hi Tom, I hope I understood your question right, let's say you have 2 conditions, 1 group of 3 subjects; nSubj=3; cfg.design(1:Nsubj) = 1; cfg.design(nSubj+1:(2*nSubj)) = 2; cfg.design: 1 1 1 2 2 2 I don't think there is anything special about time-frequency plots compared to timelock - or sourcestatistics. Although you can make things as complicated as you want of course! Yours, Hanneke On Sat, Sep 19, 2009 at 11:34 PM, Tom Holroyd wrote: > the cfg.design in particular, how would one set that up for a group > of time-frequency plots? > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ndavid at UKE.DE Wed Sep 23 11:26:08 2009 From: ndavid at UKE.DE (Nicole David) Date: Wed, 23 Sep 2009 11:26:08 +0200 Subject: open PhD position Message-ID: Hi, I hope you don't mind me announcing a job opening for a PhD position at our Department in Hamburg (see below). Best, Nicole --------- PhD Position at the Dept. of Neurophysiology and Pathophysiology, Hamburg The Dept. of Neurophysiology and Pathophysiology (Head: Prof. Dr. Andreas K. Engel) at the University Medical Center Hamburg-Eppendorf (Germany) invites applications for a PhD student position. The position is available with immediate start. The appointment will be for 3 years. Areas of interest comprise the investigation of dynamic, large-scale neural interactions and the characterization of functional networks during perceptual and attentional processes in autism spectrum disorders, using techniques such as eye tracking and EEG/ MEG (possibly also fMRI). Recruitment of individuals with autism will be performed in collaboration with the Department of Psychiatrie in Cologne (http://www.medizin.uni- koeln.de/kliniken/psychiatrie/Autismus-Sprechstunde/). Main research interests in the Department are dynamics of distributed sensory processing, intermodal and sensorimotor integration, as well as theories of perception, action and consciousness. Current projects involve EEG/MEG studies in humans or physiological studies in animals. Further information on research at the Department of Neurophysiology can be obtained at http://www.uke.uni-hamburg.de or http://www.40hz.net. Applicants should have a background in psychology, medicine, biology or neuro-/ cognitive sciences, and ideally show experience in human EEG/ MEG studies, neuroimaging or biosignal analysis. Programming experience (Matlab, Presentation) is considered mandatory. You will be responsible for the management and implementation of research paradigms, recruitment and neuropsychological testing of volunteers, data acquisition and analysis. Interest in clinical neuroscience and neuropsychology is desirable as well as knowledge of the German language. For further details, please contact Nicole David (phone +49-40-7410-53188, email: ndavid at uke.de) or Prof. Dr. Andreas K. Engel (phone +49-40-7410-56170, email: ak.engel at uke.de). Applicants are asked to submit their CV and documentation of relevant qualification to Prof. Dr. Andreas K. Engel, Dept. of Neurophysiology and Pathophysiology, University Medical Center Hamburg-Eppendorf, Martinistr. 52, 20246 Hamburg, Germany. Applications can also be sent via email to N. David or A. K. Engel. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Sep 23 17:47:18 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 23 Sep 2009 17:47:18 +0200 Subject: EEG forward modelling using BEM In-Reply-To: <972d6afe0909151441w6d75afbfyb3e92eb3825183b7@mail.gmail.com> Message-ID: Hi Fabio On the ftp server you can find a file standard_BEM.zip which contains a precomputed BEM model that you can use. The geometry is based on the collin27 brain, and I believe it also includes the collin27 MRI. I.e., it is aligned with MNI152, but uses a crisp MRI and not the fuzzy MNI152, because from the latter one you cannot get a reasonable estimate of the skull geometry. The mesh vertex coordinates are expressed in MNI coordinates (in mm). You should carefully align your electrodes with the skin surface, i.e. plotting the mesh and electrodes in one figure should give a meaningfull figure. Have a look at the electroderealign function and at http://fieldtrip.fcdonders.nl/example . Also look at the fieldtrip/plotting/plot_mesh and plot_sens functions, which will be usefull for the realignment of your electrodes with the model skin. Hope this helps to get you started. Robert On 15 Sep 2009, at 23:41, Fabio Meneghini wrote: > Hi to all, > Please help me, it took me a lot of trials and troubles to avoid > annoying people with (possibly) trivial issues....but eventually I > don't know what else remains to try... > I'm new using FieldTrip, and I'm mainly interested in computing the > EEG forward model on a standard MNI head model (MNI152, the one you > can find in FSL software package), using BEM algorithm on 3, or better > 4 surfaces. > First of all: has anyone ever done this before? If so, this might save > me a lot of hard times... > > I read the the tutorial about building BEM meshes models, but let's > suppose I already have my model segmentation image (182x217x182 > voxels, filled with integers numbers). Can I start from that, ignoring > the original MRI images? > > I got my eeg channels coordinates. Are they supposed to be expressed > in mm, rather than meters? What is the origin of the coordinates > intended to be? And what about the conductivities of the various > compartments? where can I set them? > > Waiting for some light in the dark, thank you for your attention. > > best, > > Fabio Meneghini > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From smaraujo at UALG.PT Thu Sep 24 12:56:59 2009 From: smaraujo at UALG.PT (=?iso-8859-1?Q?Susana_Ara=FAjo?=) Date: Thu, 24 Sep 2009 11:56:59 +0100 Subject: data file format problem Message-ID: Hello everyone, I ran an EEG experiment and, exceptionally, I recorded two files to one of the subjects. I’m trying to join these two data files (bdfra format) into a single data file using BESA. When I joined these two “bdf” files using BESA, I got one file “.foc”. The problem is that when I try to run the “read_event” fieldrip function I get an error message because the file format (.foc) is not supported and even recognized. Does anyone already had this problem and know how can I solve it? Thanks a lot! Susana Araújo ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at GMAIL.COM Thu Sep 24 13:16:06 2009 From: julian.keil at GMAIL.COM (Julian Keil) Date: Thu, 24 Sep 2009 13:16:06 +0200 Subject: data file format problem In-Reply-To: <20090924105656.4C2851674C@smtp3.ualg.pt> Message-ID: Hi, i would suggest exporting to ASCII (.mul or .avr) in BESA and then reading these files into fieldtrip. Good luck Julian Am 24.09.2009 um 12:56 schrieb Susana Araújo: > Hello everyone, > > > > I ran an EEG experiment and, exceptionally, I recorded two files to > one of the subjects. I’m trying to join these two data files (bdfra > format) into a single data file using BESA. When I joined these two > “bdf” files using BESA, I got one file “.foc”. The problem is that > when I try to run the “read_event” fieldrip function I get an error > message because the file format (.foc) is not supported and even > recognized. Does anyone already had this problem and know how can I > solve it? > > > > Thanks a lot! > > > > Susana Araújo > > > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: julian.keil at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bernhard.spitzer at BCCN-BERLIN.DE Thu Sep 24 13:42:12 2009 From: bernhard.spitzer at BCCN-BERLIN.DE (Bernhard Spitzer) Date: Thu, 24 Sep 2009 13:42:12 +0200 Subject: data file format problem In-Reply-To: <20090924105656.4C2851674C@smtp3.ualg.pt> Message-ID: Dear Susana, for .bdf files, there is a tool called "merger" you can use to join the files into a single .bdf file before you load them into BESA. (http://www.biosemi.com/download/Merger.zip) Alternatively, if you prefer to export your .foc file to ASCII/multiplexed, you' may have to export the events (markers, triggers, etc.) separately to an .evt file which can then be read into FieldTrip hope this helps, best wishes Bernhard Susana Araújo wrote: > > Hello everyone, > > I ran an EEG experiment and, exceptionally, I recorded two files to > one of the subjects. I’m trying to join these two data files (bdfra > format) into a single data file using BESA. When I joined these two > “bdf” files using BESA, I got one file “.foc”. The problem is that > when I try to run the “read_event” fieldrip function I get an error > message because the file format (.foc) is not supported and even > recognized. Does anyone already had this problem and know how can I > solve it? > > Thanks a lot! > > Susana Araújo > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From irina.simanova at MPI.NL Thu Sep 24 13:47:21 2009 From: irina.simanova at MPI.NL (Irina Simanova) Date: Thu, 24 Sep 2009 13:47:21 +0200 Subject: data file format problem In-Reply-To: <20090924105656.4C2851674C@smtp3.ualg.pt> Message-ID: Hi Susanna, You could also read two files with Fieldtrip separately and then use "appenddata" command. It combines multiple datasets that has been preprocessed separately into one large dataset. Best, Irina On Sep 24, 2009, at 12:56 PM, Susana Araújo wrote: > Hello everyone, > > I ran an EEG experiment and, exceptionally, I recorded two files to > one of the subjects. I’m trying to join these two data files (bdfra > format) into a single data file using BESA. When I joined these two > “bdf” files using BESA, I got one file “.foc”. The problem is that > when I try to run the “read_event” fieldrip function I get an error > message because the file format (.foc) is not supported and even > recognized. Does anyone already had this problem and know how can I > solve it? > > Thanks a lot! > > Susana Araújo > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From P.PRAAMSTRA at BHAM.AC.UK Thu Sep 24 14:09:15 2009 From: P.PRAAMSTRA at BHAM.AC.UK (Peter Praamstra) Date: Thu, 24 Sep 2009 13:09:15 +0100 Subject: data file format problem In-Reply-To: <20090924105656.4C2851674C@smtp3.ualg.pt> Message-ID: Susana, You can merge bdf files with a utility provided by BioSemi. Go to: http://www.biosemi.com/download.htm Peter Praamstra On 24 Sep 2009 at 11:56, Susana Araújo wrote: > > Hello everyone, > > I ran an EEG experiment and, exceptionally, I recorded two files to > one of the subjects. I´m trying > to join these two data files (bdfra format) into a single data file > using BESA. When I joined these > two "bdf"files using BESA, I got one file ".foc". The > problem is that when I try to run the > "read_event" fieldrip function I get an error message because > the file format (.foc) is not > supported and even recognized. Does anyone already had this problem > and know how can I > solve it? > > Thanks a lot! > > Susana Araújo > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share > experiences and to discuss new ideas for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ ###################################### Peter Praamstra, MD, PhD Reader in Cognitive Neurophysiology Honorary Consultant Neurology Behavioural Brain Sciences Centre School of Psychology, University of Birmingham Birmingham, B15 2TT tel. 0121 414 7211 fax 0121 414 4897 Disclaimer: This e-mail and any attachments hereto contains proprietary information, some or all of which may be confidential or legally privileged. It is for the exclusive use of the intended recipient(s) only. If an addressing or transmission error has misdirected this e-mail and you are not the intended recipient(s), please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail or any attachments, as this may be unlawful. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From smaraujo at UALG.PT Thu Sep 24 14:47:13 2009 From: smaraujo at UALG.PT (=?iso-8859-1?Q?Susana_Ara=FAjo?=) Date: Thu, 24 Sep 2009 13:47:13 +0100 Subject: data file format problem In-Reply-To: <4ABB5B14.2010104@bccn-berlin.de> Message-ID: Thanks a lot!! I already solved my problem! Best whishes -----Mensagem original----- De: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] Em nome de Bernhard Spitzer Enviada: quinta-feira, 24 de Setembro de 2009 12:42 Para: FIELDTRIP at NIC.SURFNET.NL Assunto: Re: [FIELDTRIP] data file format problem Dear Susana, for .bdf files, there is a tool called "merger" you can use to join the files into a single .bdf file before you load them into BESA. (http://www.biosemi.com/download/Merger.zip) Alternatively, if you prefer to export your .foc file to ASCII/multiplexed, you' may have to export the events (markers, triggers, etc.) separately to an .evt file which can then be read into FieldTrip hope this helps, best wishes Bernhard Susana Araújo wrote: > > Hello everyone, > > I ran an EEG experiment and, exceptionally, I recorded two files to > one of the subjects. I’m trying to join these two data files (bdfra > format) into a single data file using BESA. When I joined these two > “bdf” files using BESA, I got one file “.foc”. The problem is that > when I try to run the “read_event” fieldrip function I get an error > message because the file format (.foc) is not supported and even > recognized. Does anyone already had this problem and know how can I > solve it? > > Thanks a lot! > > Susana Araújo > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From bernhard.spitzer at BCCN-BERLIN.DE Thu Sep 24 15:27:43 2009 From: bernhard.spitzer at BCCN-BERLIN.DE (Bernhard Spitzer) Date: Thu, 24 Sep 2009 15:27:43 +0200 Subject: time-frequency - zero padding? Message-ID: Dear Fieldtrip experts, I have a question regarding the cfg.pad settings in frequanalysis. For TF analysis of my epochs (6s), with a fixed window length (e.g., 0.4s), i'm using sth like cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 2.5:2.5:30; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.4; cfg.toi = -0.5:0.05:4; now I would like to increase the frequency resolution to, say 1Hz, in order to get a smoother TF map, but keep the data window length at 400msec. I understand that one can get a higher (interpolated) frequency resolution by zero padding the data window for fft, but it is unclear to me how or whether this can be done with frequanalysis/cfg.pad using a sliding window. with a sliding window, does cfg.pad add zeros to the windowed signal (cfg.t_ftimwin), or to the interval specified in cfg.toi, or to the data epoch ? Can I use cfg.pad to interpolate a higher frequency resolution for my analysis, or is there another way to do that? many thanks in advance! Bernhard -- ----------------------------------------------- Dr. Bernhard Spitzer Bernstein Center for Computational Neuroscience Charité Universitätsmedizin Berlin Philippstr. 13 House 6 10115 Berlin Germany Phone: +49 (0)30 2093-6789 Fax: +49 (0)30 2093-6771 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK Mon Sep 28 21:29:08 2009 From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith) Date: Mon, 28 Sep 2009 20:29:08 +0100 Subject: Reference electrode in lead field Message-ID: Hi all I am experimenting with source reconstruction and was wondering how a reference electrode is defined in the lead field. Looking through the scripts it looks like the average reference is used, but this is a physical impossibility, as there must be a physical reference to which differences in electrical potential can be measured. The lead field will be differ depending on the location of the reference electrode. Firstly, is there a way to specify a reference electrode when constructing an EEG lead field in fieldtri p and not jsut use the average reference. Secondly, looking through the code for 'inf_medium_leadfield' (called from prepare_leadfield -> compute_leadfield -> eeg_leadfieldb), the equations used for calculating the lead field look a little strange: radius = position (vox) - position(elec) R (resistivity?) = 4 x pi x conductivity x sum(radius^2)^(1.5) lead field(vox,elec)=radius / R. Where the the exponential to 1.5 come from? Is there a reference to somewhere where this method is used. I'm confused as to sure how this calculation works. Many thanks Mark -- Mark Drakesmith PhD Student Neuroscience and Aphasia Research Unit (NARU) University of Manchester ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From maess at CBS.MPG.DE Tue Sep 29 09:09:16 2009 From: maess at CBS.MPG.DE (Dr. Burkhard Maess) Date: Tue, 29 Sep 2009 09:09:16 +0200 Subject: Reference electrode in lead field In-Reply-To: <21132649.294471254208139700.JavaMail.root@zimbra> Message-ID: Dear Mark, concerning the average reference. ... You are right the voltage is defined as difference of potentials. Therefore one always needs a reference point, but there is no need for a physical existence of a reference point as long as a mathematical definition exists. Classical unipolar electrodes provide voltage signals like e.g. : (1) U_i_ref = V_i - V_ref The average reference is computed as the mean signal over all N electrodes: (2) U_avref = \frac{1}{N} \sum{i=1}^{N}U_i_ref You can rewrite this using expression (1) (3) U_avref = \frac{1}{N}\sum{i=1}^{N}V_i - V_ref = mean(V_i) - V_ref One can see that the reference point for the average reference is the same as for all single electrodes. Now, we rerefence all electrodes to the average reference: (4) U_i_avref = U_i_ref - U_avref = V_i - V_ref - mean(V_i) - V_ref The simplified expression does not contain the original V_ref! (5) U_i_avref = V_i - mean(V_i) Introducing the average reference is loss free as long as you store the mean average signal. Otherwise some data is lost because the V_ref signals vanishes from the expressions. Why to transform to average reference? As you said the lead field is dependent on the location of the reference electrode. Introducing the average reference means to become less dependent on the location of a single (reference) electrode. All the best, Burkhard Dr. Burkhard Maess Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a, P.O. Box 500355, D-04303 Leipzig Aussenstelle Bennewitz, phone/fax: +49(3425)8875-2526/-2511 mail: maess 'at' cbs.mpg.de, http://www.cbs.mpg.de ----- Original Message ----- From: "Mark Drakesmith" To: FIELDTRIP at NIC.SURFNET.NL Sent: Monday, September 28, 2009 9:29:08 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [FIELDTRIP] Reference electrode in lead field Hi all I am experimenting with source reconstruction and was wondering how a reference electrode is defined in the lead field. Looking through the scripts it looks like the average reference is used, but this is a physical impossibility, as there must be a physical reference to which differences in electrical potential can be measured. The lead field will be differ depending on the location of the reference electrode. Firstly, is there a way to specify a reference electrode when constructing an EEG lead field in fieldtri p and not jsut use the average reference. Secondly, looking through the code for 'inf_medium_leadfield' (called from prepare_leadfield -> compute_leadfield -> eeg_leadfieldb), the equations used for calculating the lead field look a little strange: radius = position (vox) - position(elec) R (resistivity?) = 4 x pi x conductivity x sum(radius^2)^(1.5) lead field(vox,elec)=radius / R. Where the the exponential to 1.5 come from? Is there a reference to somewhere where this method is used. I'm confused as to sure how this calculation works. Many thanks Mark -- Mark Drakesmith PhD Student Neuroscience and Aphasia Research Unit (NARU) University of Manchester ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jdien07 at MAC.COM Wed Sep 30 04:10:50 2009 From: jdien07 at MAC.COM (Joseph Dien) Date: Tue, 29 Sep 2009 22:10:50 -0400 Subject: Reference electrode in lead field In-Reply-To: <4AC10E84.50708@postgrad.manchester.ac.uk> Message-ID: The reasoning behind the average reference is that it is a physics principle that the sum of the voltages over an enclosed surface must equal zero. To the extent that the electrode locations provide a representative even sampling of the head surface (an important caveat) the sum of the voltages therefore provides an estimate of the true zero voltage. The reason for using the average reference rather than a single reference site is that using a reference site arbitrarily defines that point as being zero voltage (which is to say, inactive), which is not biophysically reasonable as there are no inactive sites on the head (due to volume conduction). Also, to clarify, an average reference does not result in a reference-free solution since, as you say, a voltage measurement is by definition a relative measure (although ideally it should be relatively independent of the electrode montage, given enough electrodes). It's just that the comparison "site", which is the zero equipotential line (as estimated by the average reference computation), is a more biophysically reasonable one (given enough recording sites) than arbitrarily picking a single fixed electrode site as the reference. For an extended discussion of these issues, see: Dien, J. (1998). Issues in the application of the average reference: Review, critiques, and recommendations. Behavior Research Methods, Instruments, and Computers, 30(1), 34-43. Cheers! Joe On Sep 28, 2009, at 3:29 PM, Mark Drakesmith wrote: > Hi all > > I am experimenting with source reconstruction and was wondering how > a reference electrode is defined in the lead field. Looking through > the scripts it looks like the average reference is used, but this is > a physical impossibility, as there must be a physical reference to > which differences in electrical potential can be measured. The lead > field will be differ depending on the location of the reference > electrode. > > Firstly, is there a way to specify a reference electrode when > constructing an EEG lead field in fieldtri p and not jsut use the > average reference. > > Secondly, looking through the code for > 'inf_medium_leadfield' (called from prepare_leadfield -> > compute_leadfield -> eeg_leadfieldb), the equations used for > calculating the lead field look a little strange: > > radius = position (vox) - position(elec) > R (resistivity?) = 4 x pi x conductivity x sum(radius^2)^(1.5) > lead field(vox,elec)=radius / R. > > Where the the exponential to 1.5 come from? Is there a reference to > somewhere where this method is used. I'm confused as to sure how > this calculation works. > > Many thanks > > Mark > > -- > > Mark Drakesmith > PhD Student > > Neuroscience and Aphasia Research Unit (NARU) > University of Manchester > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist Center for Advanced Study of Language University of Maryland 7005 52nd Avenue College Park, MD 20742-0025 E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://homepage.mac.com/jdien07/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From dimitri.papadopoulos at CEA.FR Tue Sep 1 01:36:49 2009 From: dimitri.papadopoulos at CEA.FR (Dimitri Papadopoulos-Orfanos) Date: Tue, 1 Sep 2009 01:36:49 +0200 Subject: fileio/README Message-ID: Hi, From fieldtrip-20090831/fileio/README: The following files were downloaded from http://www.koders.com/ base64.c base64.h I cannot find these files anywhere. Have they been removed? Has the source code been integrated elsewhere? Regards, -- Dimitri Papadopoulos CEA, I2BM, NeuroSpin 91191 Gif-sur-Yvette cedex, France ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4743 bytes Desc: S/MIME Cryptographic Signature URL: From dimitri.papadopoulos at CEA.FR Tue Sep 1 01:55:48 2009 From: dimitri.papadopoulos at CEA.FR (Dimitri Papadopoulos-Orfanos) Date: Tue, 1 Sep 2009 01:55:48 +0200 Subject: 64-bit Linux Message-ID: Hi, I'm planning the deployment of Fieldtrip on 64-bit Linux machines. I have compared the availability of 32-bit and 64-bit Linux MEX files. Some MEX files are 32-bit only, for example: external/biosig/mexSLOAD.mexglx external/eeprobe/read_eep_avr.mexglx external/eeprobe/read_eep_cnt.mexglx private/ltrisect.mexglx private/ptriproj.mexglx classification/toolboxes/gerven/bayesbrain/utilities/myrepmat.mexglx classification/toolboxes/gerven/gmrflab/fastinv.mexglx classification/toolboxes/gerven/gmrflab/fastinvex.mexglx [...] classification/toolboxes/external/gpml-matlab/gpml/sq_dist.mexglx classification/toolboxes/external/libsvm-mat-2.87-1/read_sparse.mexglx [...] Then some MEX files are 64-bit only, some probably on purpose: @uint64/abs.mexa64 fileio/@uint64/abs.mexa64 and some probably not: external/bci2000/load_bcidat.mexa64 fileio/private/mxDeserialize.mexa64 Might the 64-bit (or 32-bit) version miss functionality? Should we compile 64-bit (or 32-bit) MEX files when source files are available? Regards, -- Dimitri Papadopoulos CEA, I2BM, NeuroSpin 91191 Gif-sur-Yvette cedex, France ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4743 bytes Desc: S/MIME Cryptographic Signature URL: From dimitri.papadopoulos at CEA.FR Tue Sep 1 03:00:36 2009 From: dimitri.papadopoulos at CEA.FR (Dimitri Papadopoulos-Orfanos) Date: Tue, 1 Sep 2009 03:00:36 +0200 Subject: compile the mex file on the fly Message-ID: Hi, I see a few FieldTrip files attempt to compile MEX files on the fly. For example @uint64/abs.m: % determine the name and full path of this function funname = mfilename('fullpath'); mexsrc = [funname '.c']; [mexdir, mexname] = fileparts(funname); try % try to compile the mex file on the fly warning('trying to compile MEX file from %s', mexsrc); cd(mexdir); mex(mexsrc); I fear this may fail when FieldTrip is installed on an application server and run by users who cannot write into the FieldTrip directory. I understand this is a reasonable fallback for exotic platforms which lack the proper MEX file. It is also a good way to always have the MEX file rebuilt after a change in the associated C file. Unfortunately it also breaks FieldTrip installations on application servers - quite common on 32-bit or 64-bit Linux using NFS. Making MEX files available for such common platforms would fix this issue, wouldn't it? Also see my previous "64-bit Linux" message. I hope I'm not completely misunderstanding the issue at hand. Here is a list of Matlab files which call mex() and their associated C and MEX files: @uint64/max.m @uint64/max.c @uint64/max.mexa64 @uint64/max.mexglx @uint64/max.mexmac @uint64/max.mexmaci @uint64/max.mexw32 @uint64/min.m @uint64/min.c @uint64/min.mexa64 @uint64/min.mexglx @uint64/min.mexmac @uint64/min.mexmaci @uint64/min.mexw32 @uint64/minus.m @uint64/minus.c @uint64/minus.mexa64 @uint64/minus.mexglx @uint64/minus.mexmac @uint64/minus.mexmaci @uint64/minus.mexw32 @uint64/plus.m @uint64/plus.c @uint64/plus.mexa64 @uint64/plus.mexglx @uint64/plus.mexmac @uint64/plus.mexmaci @uint64/plus.mexw32 @uint64/rdivide.m @uint64/rdivide.c @uint64/rdivide.mexa64 @uint64/rdivide.mexglx @uint64/rdivide.mexmac @uint64/rdivide.mexmaci @uint64/rdivide.mexw32 @uint64/times.m @uint64/times.c @uint64/times.mexa64 @uint64/times.mexglx @uint64/times.mexmac @uint64/times.mexmaci @uint64/times.mexw32 @uint64/abs.m @uint64/abs.c @uint64/abs.mexa64 @uint64/abs.mexmaci fileio/private/mxDeserialize.m fileio/private/mxDeserialize.c fileio/private/mxDeserialize.mexa64 fileio/private/mxDeserialize.mexmac fileio/private/mxDeserialize.mexw32 fileio/private/mxSerialize.m fileio/private/mxSerialize.c fileio/private/mxSerialize.mexa64 fileio/private/mxSerialize.mexglx fileio/private/mxSerialize.mexmac fileio/private/mxSerialize.mexw32 fileio/private/read_24bit.m fileio/private/read_24bit.c fileio/private/read_24bit.mexa64 fileio/private/read_24bit.mexglx fileio/private/read_24bit.mexmac fileio/private/read_24bit.mexmaci fileio/private/read_24bit.mexw32 fileio/private/read_ctf_shm.m fileio/private/read_ctf_shm.c fileio/private/read_ctf_shm.mexa64 fileio/private/read_ctf_shm.mexglx fileio/private/read_ctf_shm.mexmaci fileio/private/write_ctf_shm.m fileio/private/write_ctf_shm.c fileio/private/write_ctf_shm.mexa64 fileio/private/write_ctf_shm.mexglx fileio/private/write_ctf_shm.mexmaci forwinv/private/meg_leadfield1.m forwinv/private/meg_leadfield1.c forwinv/private/meg_leadfield1.mexa64 forwinv/private/meg_leadfield1.mexglx forwinv/private/meg_leadfield1.mexmac forwinv/private/meg_leadfield1.mexmaci forwinv/private/meg_leadfield1.mexw32 forwinv/private/plgndr.m forwinv/private/plgndr.c forwinv/private/plgndr.mexa64 forwinv/private/plgndr.mexglx forwinv/private/plgndr.mexmac forwinv/private/plgndr.mexmaci forwinv/private/plgndr.mexw32 private/write_ctf_shm.m private/read_ctf_shm.m private/meg_leadfield1.m private/meg_leadfield1.c private/meg_leadfield1.mexa64 private/meg_leadfield1.mexglx private/meg_leadfield1.mexmac private/meg_leadfield1.mexmaci private/meg_leadfield1.mexw32 private/splint_gh.m private/splint_gh.c private/splint_gh.mexa64 private/splint_gh.mexglx private/splint_gh.mexmac private/splint_gh.mexmaci private/splint_gh.mexw32 private/read_24bit.m private/read_24bit.c private/read_24bit.mexa64 private/read_24bit.mexglx private/read_24bit.mexmac private/read_24bit.mexmaci private/read_24bit.mexw32 private/plgndr.m private/plgndr.c private/plgndr.mexa64 private/plgndr.mexglx private/plgndr.mexmac private/plgndr.mexmaci private/plgndr.mexw32 classification/utilities/repop/repop.m classification/utilities/repop/repop.c classification/utilities/repop/repop.mexglx classification/utilities/tprod/tprod.m classification/utilities/tprod/tprod.c classification/utilities/tprod/tprod.mexglx @config/private/deepcopy.m @config/private/deepcopy.c @config/private/deepcopy.mexa64 @config/private/deepcopy.mexglx @config/private/deepcopy.mexmac @config/private/deepcopy.mexmaci @config/private/increment.m @config/private/increment.c @config/private/increment.mexa64 @config/private/increment.mexglx @config/private/increment.mexmac @config/private/increment.mexmaci @config/private/reset.m @config/private/reset.c @config/private/reset.mexa64 @config/private/reset.mexglx @config/private/reset.mexmac @config/private/reset.mexmaci A few remarks: 1. Files private/write_ctf_shm.m and private/read_ctf_shm.m are duplicates of fileio/private/read_ctf_shm.m and fileio/private/read_ctf_shm.m and they are missing associated C files. They are therefore broken. Shouldn't they be deleted? 2. I've left out all files in fileio/@uint64/ since they directory is identical to: @uint64/ 3. When a *.c file is changed, does your distribution process rebuild relevant MEX files before distribution? I guess not... In which case all users using FieldTrip from an application server may be using outdated MEX files. Regards, -- Dimitri Papadopoulos CEA, I2BM, NeuroSpin 91191 Gif-sur-Yvette cedex, France ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4743 bytes Desc: S/MIME Cryptographic Signature URL: From j.schoffelen at PSY.GLA.AC.UK Tue Sep 1 11:09:53 2009 From: j.schoffelen at PSY.GLA.AC.UK (Jan-Mathijs Schoffelen) Date: Tue, 1 Sep 2009 09:09:53 +0000 Subject: freqdescriptives/statistics Message-ID: Dear Dahlia, Hemant Bokil indeed uses the jackknife to obtain variance estimates of power (and coherence), see also for example his 2007 paper in J.Neurosci.Methods. More specifically, if your data is 'well-behaved', he has shown that by applying a specific correction to the power estimate, in combination of the jackknife, generates a test-statistic from a differential (i.e. contrast) power spectrum which has a standard normal distribution (i.e. the jackknife estimate of the variance is expected to be 1 and the estimate of the mean 0). Unfortunately, MEG data is hardly ever well-behaved, so we prefer to use non-parametric techniques to do statistical inference. Freqdescriptives in this respect still historically has the option of computing a jackknife estimate of the SEM of the powerspectrum/ coherencespectrum, which can be used to compute a T-statistic across two conditions for example. However, I you would choose this path, you have to write some code which does this, because it is not in fieldtrip. The biascorrect option has been taken out altogether as far as I can see, (and had been designed only to correct the bias in the coherence spectra, and not in the power spectra if I remember correctly), and any reference in the documentation should be removed. Unfortunately, we did not yet have time to considerably clean up freqdescriptives, but this is quite high on the developer's to do list. The bottom line is: ignore biascorrect, and if you use the jackknife estimate of the SEM, you have to come up with some code of your own. Alternatively, you could look into freqstatistics and use cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do statistical inference. Best, Jan-Mathijs On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > Hi all, > > Is there a more detailed explanation of usage for the jackknife and > biascorrect options for freqdescriptives than the one in the > freqdescriptives reference page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? > > More specifically, are these options related to Bokil et al NeuroIm > 2007? How should they be employed to determine significance of > difference between conditions? (Is there somewhere a tutorial for > the use of these options analogous to the one about cluster-based > permutation testing?) > > Also, for the permutation analysis of TFRs (http://fieldtrip.fcdonders.nl/tutorial/statistics?s > []=freqstatistics), if I don't want to employ the planar gradient > step (what exactly IS combineplanar? sorry I couldn't find it), can > I simply skip it and calculate the TFRs of the raw sensor data? > > Many thanks! > Dahlia. > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gsudre at POBOX.COM Tue Sep 1 21:16:13 2009 From: gsudre at POBOX.COM (Gustavo Sudre) Date: Tue, 1 Sep 2009 15:16:13 -0400 Subject: Neuromag coordinate frames Message-ID: Hello, I have a question about the transformation matrix used when reading in Neuromag FIF MRI files. Looking at the read_mri function, the matrix stored in hdr.trans.trans by MNE toolbox is copied to mri.transform. The fieldtrip wiki says that the matrix in mri.transform transforms from the native voxel-coordinate system of the MRI to the head coordinate system. However, the matrix stored in hdr.trans.trans goes from 4 to 5 (as seen in mri.hdr.trans), which means from head to MRI. So, shouldn't mri.transform = inv(hdr.trans.trans)? Please let me know if I'm mistaken on how the coordinate systems interact in these toolboxes. Thank you, Gus ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From dahliash at STANFORD.EDU Wed Sep 2 00:40:24 2009 From: dahliash at STANFORD.EDU (Dahlia Sharon) Date: Wed, 2 Sep 2009 00:40:24 +0200 Subject: freqdescriptives/statistics Message-ID: Thanks Jan-Mathijs for that useful reply. Regarding permutation analysis, we're running into some difficulty understanding what the code does. Could you clarify these points? 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate layout file (all channels). Does fieldtrip take into account which channels are gradiometers and which magnetometers when it calculates adjacency for clustering? 2. How does fieldtrip calculate adjacency for channels? (time and frequency are obvious...) 3. How is the clustering performed? We're getting a significant cluster but it doesn't look like a single blob in the time-frequency domain (averaging over sensors) but like two very distant blobs, which is very strange... On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen wrote: >Dear Dahlia, > >Hemant Bokil indeed uses the jackknife to obtain variance estimates of >power (and coherence), see also for example his 2007 paper in >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', >he has shown that by applying a specific correction to the power >estimate, in combination of the jackknife, generates a test-statistic >from a differential (i.e. contrast) power spectrum which has a >standard normal distribution (i.e. the jackknife estimate of the >variance is expected to be 1 and the estimate of the mean 0). >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to >use non-parametric techniques to do statistical inference. >Freqdescriptives in this respect still historically has the option of >computing a jackknife estimate of the SEM of the powerspectrum/ >coherencespectrum, which can be used to compute a T-statistic across >two conditions for example. However, I you would choose this path, you >have to write some code which does this, because it is not in >fieldtrip. The biascorrect option has been taken out altogether as far >as I can see, (and had been designed only to correct the bias in the >coherence spectra, and not in the power spectra if I remember >correctly), and any reference in the documentation should be removed. >Unfortunately, we did not yet have time to considerably clean up >freqdescriptives, but this is quite high on the developer's to do list. >The bottom line is: ignore biascorrect, and if you use the jackknife >estimate of the SEM, you have to come up with some code of your own. >Alternatively, you could look into freqstatistics and use >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do >statistical inference. > >Best, > >Jan-Mathijs > > >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > >> Hi all, >> >> Is there a more detailed explanation of usage for the jackknife and >> biascorrect options for freqdescriptives than the one in the >> freqdescriptives reference page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? >> >> More specifically, are these options related to Bokil et al NeuroIm >> 2007? How should they be employed to determine significance of >> difference between conditions? (Is there somewhere a tutorial for >> the use of these options analogous to the one about cluster-based >> permutation testing?) >> >> Also, for the permutation analysis of TFRs (http://fieldtrip.fcdonders.nl/tutorial/statistics?s >> []=freqstatistics), if I don't want to employ the planar gradient >> step (what exactly IS combineplanar? sorry I couldn't find it), can >> I simply skip it and calculate the TFRs of the raw sensor data? >> >> Many thanks! >> Dahlia. >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> http://listserv.surfnet.nl/archives/fieldtrip.html >> http://www.ru.nl/fcdonders/fieldtrip/ > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of >the FieldTrip toolbox, to share experiences and to discuss new ideas >for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ > > > > > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Wed Sep 2 09:47:33 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 2 Sep 2009 09:47:33 +0200 Subject: freqdescriptives/statistics (spatial clustering for planar gradiometers and magnetometers __ Neuromag) In-Reply-To: Message-ID: Hi Dahlia, My name is Eric Maris and, together with Robert Oostenveld, I implemented the permutation statistics in Fieldtrip. > 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate > layout file (all channels). Does fieldtrip take into account which channels > are gradiometers and which magnetometers when it calculates adjacency for > clustering? > > 2. How does fieldtrip calculate adjacency for channels? (time and frequency > are obvious...) > > 3. How is the clustering performed? > > We're getting a significant cluster but it doesn't look like a single blob > in the time-frequency domain (averaging over sensors) but like two very > distant blobs, which is very strange... These are important points. As far as I know, you are the first to use the cluster-based permutation tests on Neuromag data. This means that you have to do some more work than the people who work with a system that only has axial gradiometers (like the CTF system). For axial gradiometers, Fieldtrip can calculate the adjacency in a straightforward way, using the positions of the coils in the helmet. Working with planar gradiometers and magnetometers, you have to define yourself the adjacency structure for the channels in your system (both gradiometers and magnetomers). Fieldtrip doesn't care about the way you define adjacency. You can give Fieldtrip any adjacency structure via the configuration field cfg.neighbours. (Type "help neighbourselection" to get info about how to define and adjacency structure.) Defining adjacency on planar gradiometers requires some thinking. Things become easier if you (1) ignore the magnetometers, and (2) sum the power at the pairs of orthogonal planar gradiometers. This maps the data on a new set of channels for which adjacency is defined in a straightforward way. (Of course, you may also decide to retain the orientation information in your original planar gradiometers, but than you have to come up with a sensible definition of adjacency that takes this orientation information into account.) Finally, a minor point, do not start with cluster-based permutation tests with both time and frequency resolution. If you are interested in oscillations, only keep the frequency resolution in you first analyses. You can later add the time axis if you want to know how the effect develops over time. Good luck, Eric dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 E: e.maris at donders.ru.nl MSc Cognitive Neuroscience: www.ru.nl/master/cns/ > > On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen > wrote: > > >Dear Dahlia, > > > >Hemant Bokil indeed uses the jackknife to obtain variance estimates of > >power (and coherence), see also for example his 2007 paper in > >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', > >he has shown that by applying a specific correction to the power > >estimate, in combination of the jackknife, generates a test-statistic > >from a differential (i.e. contrast) power spectrum which has a > >standard normal distribution (i.e. the jackknife estimate of the > >variance is expected to be 1 and the estimate of the mean 0). > >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to > >use non-parametric techniques to do statistical inference. > >Freqdescriptives in this respect still historically has the option of > >computing a jackknife estimate of the SEM of the powerspectrum/ > >coherencespectrum, which can be used to compute a T-statistic across > >two conditions for example. However, I you would choose this path, you > >have to write some code which does this, because it is not in > >fieldtrip. The biascorrect option has been taken out altogether as far > >as I can see, (and had been designed only to correct the bias in the > >coherence spectra, and not in the power spectra if I remember > >correctly), and any reference in the documentation should be removed. > >Unfortunately, we did not yet have time to considerably clean up > >freqdescriptives, but this is quite high on the developer's to do list. > >The bottom line is: ignore biascorrect, and if you use the jackknife > >estimate of the SEM, you have to come up with some code of your own. > >Alternatively, you could look into freqstatistics and use > >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do > >statistical inference. > > > >Best, > > > >Jan-Mathijs > > > > > >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > > > >> Hi all, > >> > >> Is there a more detailed explanation of usage for the jackknife and > >> biascorrect options for freqdescriptives than the one in the > >> freqdescriptives reference > page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? > >> > >> More specifically, are these options related to Bokil et al NeuroIm > >> 2007? How should they be employed to determine significance of > >> difference between conditions? (Is there somewhere a tutorial for > >> the use of these options analogous to the one about cluster-based > >> permutation testing?) > >> > >> Also, for the permutation analysis of TFRs > (http://fieldtrip.fcdonders.nl/tutorial/statistics?s > >> []=freqstatistics), if I don't want to employ the planar gradient > >> step (what exactly IS combineplanar? sorry I couldn't find it), can > >> I simply skip it and calculate the TFRs of the raw sensor data? > >> > >> Many thanks! > >> Dahlia. > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > >> of the FieldTrip toolbox, to share experiences and to discuss new > >> ideas for MEG and EEG analysis. > >> http://listserv.surfnet.nl/archives/fieldtrip.html > >> http://www.ru.nl/fcdonders/fieldtrip/ > > > >---------------------------------- > > > >The aim of this list is to facilitate the discussion between users of > >the FieldTrip toolbox, to share experiences and to discuss new ideas > >for MEG and EEG analysis. > > > >http://listserv.surfnet.nl/archives/fieldtrip.html > > > >http://www.ru.nl/fcdonders/fieldtrip/ > > > > > > > > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Wed Sep 2 10:56:27 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Wed, 2 Sep 2009 10:56:27 +0200 Subject: megpalnar.m and statistical testing Message-ID: Dear Fieldtrip developers & users, I have some questions regarding planar gradiometers and averaging / statistical testing in fieldtrip and in general: Computing the vector valued gradient of the field is a linear operation and - as such - fully exchangeable with any kind of other linear operation such as averaging over trials, subjects and computing differences between conditions. This obviously does not hold for the pythagoras-like computation of the gradient vector's magnitude, because this is a non-linear operation. As an example think of to sources in two subjects that are (roughly) in the same spot (sulcus) but, say, on opposing walls of this said sulcus. Therefore, the fields in these two subjects will have opposing signs. As a consequence their fileds will cancel in the average over subjects - as it should be, perhaps, because they are not the same source but represent individual variance. If I now take the planar gradient magnitude using megplanar and combineplanar in each subject these two sources will be in the same spot on the scalp and with the same sign (because magnitude is confined between 0 and +INF) and will not cancel. This is different from taking the planar gradient's magnitude after averaging - this latter planar gradient amplitude will be close to zero. So far this is not surprising as taking the magnitude is a nonlinear operation and not permuatble with linear operations. My question is whether there any advice on where an when combineplanar should be used? Or would recommend it just for visualization purposes? Thanks you very much for your help, Michael > -----Ursprüngliche Nachricht----- > Von: "Eric Maris" > Gesendet: 02.09.09 09:52:37 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] freqdescriptives/statistics (spatial clustering for planar gradiometers and magnetometers __ Neuromag) > Hi Dahlia, > > > My name is Eric Maris and, together with Robert Oostenveld, I implemented > the permutation statistics in Fieldtrip. > > > 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate > > layout file (all channels). Does fieldtrip take into account which > channels > > are gradiometers and which magnetometers when it calculates adjacency for > > clustering? > > > > 2. How does fieldtrip calculate adjacency for channels? (time and > frequency > > are obvious...) > > > > 3. How is the clustering performed? > > > > We're getting a significant cluster but it doesn't look like a single blob > > in the time-frequency domain (averaging over sensors) but like two very > > distant blobs, which is very strange... > > These are important points. As far as I know, you are the first to use the > cluster-based permutation tests on Neuromag data. This means that you have > to do some more work than the people who work with a system that only has > axial gradiometers (like the CTF system). For axial gradiometers, Fieldtrip > can calculate the adjacency in a straightforward way, using the positions of > the coils in the helmet. Working with planar gradiometers and magnetometers, > you have to define yourself the adjacency structure for the channels in your > system (both gradiometers and magnetomers). Fieldtrip doesn't care about the > way you define adjacency. You can give Fieldtrip any adjacency structure via > the configuration field cfg.neighbours. (Type "help neighbourselection" to > get info about how to define and adjacency structure.) > > Defining adjacency on planar gradiometers requires some thinking. Things > become easier if you (1) ignore the magnetometers, and (2) sum the power at > the pairs of orthogonal planar gradiometers. This maps the data on a new set > of channels for which adjacency is defined in a straightforward way. (Of > course, you may also decide to retain the orientation information in your > original planar gradiometers, but than you have to come up with a sensible > definition of adjacency that takes this orientation information into > account.) > > Finally, a minor point, do not start with cluster-based permutation tests > with both time and frequency resolution. If you are interested in > oscillations, only keep the frequency resolution in you first analyses. You > can later add the time axis if you want to know how the effect develops over > time. > > > Good luck, > > Eric > > > dr. Eric Maris > Donders Institute for Brain, Cognition and Behavior > Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging > Radboud University > P.O. Box 9104 > 6500 HE Nijmegen > The Netherlands > T:+31 24 3612651 > Mobile: 06 39584581 > F:+31 24 3616066 > E: e.maris at donders.ru.nl > > MSc Cognitive Neuroscience: www.ru.nl/master/cns/ > > > > > > > > On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen > > wrote: > > > > >Dear Dahlia, > > > > > >Hemant Bokil indeed uses the jackknife to obtain variance estimates of > > >power (and coherence), see also for example his 2007 paper in > > >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', > > >he has shown that by applying a specific correction to the power > > >estimate, in combination of the jackknife, generates a test-statistic > > >from a differential (i.e. contrast) power spectrum which has a > > >standard normal distribution (i.e. the jackknife estimate of the > > >variance is expected to be 1 and the estimate of the mean 0). > > >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to > > >use non-parametric techniques to do statistical inference. > > >Freqdescriptives in this respect still historically has the option of > > >computing a jackknife estimate of the SEM of the powerspectrum/ > > >coherencespectrum, which can be used to compute a T-statistic across > > >two conditions for example. However, I you would choose this path, you > > >have to write some code which does this, because it is not in > > >fieldtrip. The biascorrect option has been taken out altogether as far > > >as I can see, (and had been designed only to correct the bias in the > > >coherence spectra, and not in the power spectra if I remember > > >correctly), and any reference in the documentation should be removed. > > >Unfortunately, we did not yet have time to considerably clean up > > >freqdescriptives, but this is quite high on the developer's to do list. > > >The bottom line is: ignore biascorrect, and if you use the jackknife > > >estimate of the SEM, you have to come up with some code of your own. > > >Alternatively, you could look into freqstatistics and use > > >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do > > >statistical inference. > > > > > >Best, > > > > > >Jan-Mathijs > > > > > > > > >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > > > > > >> Hi all, > > >> > > >> Is there a more detailed explanation of usage for the jackknife and > > >> biascorrect options for freqdescriptives than the one in the > > >> freqdescriptives reference > > page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? > > >> > > >> More specifically, are these options related to Bokil et al NeuroIm > > >> 2007? How should they be employed to determine significance of > > >> difference between conditions? (Is there somewhere a tutorial for > > >> the use of these options analogous to the one about cluster-based > > >> permutation testing?) > > >> > > >> Also, for the permutation analysis of TFRs > > (http://fieldtrip.fcdonders.nl/tutorial/statistics?s > > >> []=freqstatistics), if I don't want to employ the planar gradient > > >> step (what exactly IS combineplanar? sorry I couldn't find it), can > > >> I simply skip it and calculate the TFRs of the raw sensor data? > > >> > > >> Many thanks! > > >> Dahlia. > > >> ---------------------------------- > > >> The aim of this list is to facilitate the discussion between users > > >> of the FieldTrip toolbox, to share experiences and to discuss new > > >> ideas for MEG and EEG analysis. > > >> http://listserv.surfnet.nl/archives/fieldtrip.html > > >> http://www.ru.nl/fcdonders/fieldtrip/ > > > > > >---------------------------------- > > > > > >The aim of this list is to facilitate the discussion between users of > > >the FieldTrip toolbox, to share experiences and to discuss new ideas > > >for MEG and EEG analysis. > > > > > >http://listserv.surfnet.nl/archives/fieldtrip.html > > > > > >http://www.ru.nl/fcdonders/fieldtrip/ > > > > > > > > > > > > > > > > > >---------------------------------- > > >The aim of this list is to facilitate the discussion between users of the > > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > > and EEG analysis. See also > > http://listserv.surfnet.nl/archives/fieldtrip.html and > > http://www.ru.nl/neuroimaging/fieldtrip. > > > > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip > > toolbox, to share experiences and to discuss new ideas for MEG and EEG > analysis. > > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Wed Sep 2 13:25:49 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 2 Sep 2009 13:25:49 +0200 Subject: megpalnar.m and statistical testing In-Reply-To: <1050813170@web.de> Message-ID: Dear Michael, > I have some questions regarding planar gradiometers and averaging / statistical > testing in fieldtrip and in general: > > Computing the vector valued gradient of the field is a linear operation and - as such > - fully exchangeable with any kind of other linear operation such as averaging over > trials, subjects and computing differences between conditions. > > This obviously does not hold for the pythagoras-like computation of the gradient > vector's magnitude, because this is a non-linear operation. > > As an example think of to sources in two subjects that are (roughly) in the same > spot (sulcus) but, say, on opposing walls of this said sulcus. Therefore, the fields in > these two subjects will have opposing signs. As a consequence their fileds will cancel > in the average over subjects - as it should be, perhaps, because they are not the > same source but represent individual variance. If I now take the planar gradient > magnitude using megplanar and combineplanar in each subject these two sources > will be in the same spot on the scalp and with the same sign (because magnitude is > confined between 0 and +INF) and will not cancel. This is different from taking the > planar gradient's magnitude after averaging - this latter planar gradient amplitude > will be close to zero. So far this is not surprising as taking the magnitude is a > nonlinear operation and not permuatble with linear operations. > > My question is whether there any advice on where an when combineplanar should > be used? Or would recommend it just for visualization purposes? I think you already gave the answer in the previous paragraph. In my opinion, one should use megplanar-followed-by-combineplanar whenever the sources of different subjects have clearly different orientations. This holds for visualization as well as for statistics. Best, Eric Maris > > Thanks you very much for your help, > Michael > > > > > > > -----Ursprüngliche Nachricht----- > > Von: "Eric Maris" > > Gesendet: 02.09.09 09:52:37 > > An: FIELDTRIP at NIC.SURFNET.NL > > Betreff: Re: [FIELDTRIP] freqdescriptives/statistics (spatial clustering for planar > gradiometers and magnetometers __ Neuromag) > > > > Hi Dahlia, > > > > > > My name is Eric Maris and, together with Robert Oostenveld, I implemented > > the permutation statistics in Fieldtrip. > > > > > 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate > > > layout file (all channels). Does fieldtrip take into account which > > channels > > > are gradiometers and which magnetometers when it calculates adjacency for > > > clustering? > > > > > > 2. How does fieldtrip calculate adjacency for channels? (time and > > frequency > > > are obvious...) > > > > > > 3. How is the clustering performed? > > > > > > We're getting a significant cluster but it doesn't look like a single blob > > > in the time-frequency domain (averaging over sensors) but like two very > > > distant blobs, which is very strange... > > > > These are important points. As far as I know, you are the first to use the > > cluster-based permutation tests on Neuromag data. This means that you have > > to do some more work than the people who work with a system that only has > > axial gradiometers (like the CTF system). For axial gradiometers, Fieldtrip > > can calculate the adjacency in a straightforward way, using the positions of > > the coils in the helmet. Working with planar gradiometers and magnetometers, > > you have to define yourself the adjacency structure for the channels in your > > system (both gradiometers and magnetomers). Fieldtrip doesn't care about the > > way you define adjacency. You can give Fieldtrip any adjacency structure via > > the configuration field cfg.neighbours. (Type "help neighbourselection" to > > get info about how to define and adjacency structure.) > > > > Defining adjacency on planar gradiometers requires some thinking. Things > > become easier if you (1) ignore the magnetometers, and (2) sum the power at > > the pairs of orthogonal planar gradiometers. This maps the data on a new set > > of channels for which adjacency is defined in a straightforward way. (Of > > course, you may also decide to retain the orientation information in your > > original planar gradiometers, but than you have to come up with a sensible > > definition of adjacency that takes this orientation information into > > account.) > > > > Finally, a minor point, do not start with cluster-based permutation tests > > with both time and frequency resolution. If you are interested in > > oscillations, only keep the frequency resolution in you first analyses. You > > can later add the time axis if you want to know how the effect develops over > > time. > > > > > > Good luck, > > > > Eric > > > > > > dr. Eric Maris > > Donders Institute for Brain, Cognition and Behavior > > Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging > > Radboud University > > P.O. Box 9104 > > 6500 HE Nijmegen > > The Netherlands > > T:+31 24 3612651 > > Mobile: 06 39584581 > > F:+31 24 3616066 > > E: e.maris at donders.ru.nl > > > > MSc Cognitive Neuroscience: www.ru.nl/master/cns/ > > > > > > > > > > > > > > On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen > > > wrote: > > > > > > >Dear Dahlia, > > > > > > > >Hemant Bokil indeed uses the jackknife to obtain variance estimates of > > > >power (and coherence), see also for example his 2007 paper in > > > >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', > > > >he has shown that by applying a specific correction to the power > > > >estimate, in combination of the jackknife, generates a test-statistic > > > >from a differential (i.e. contrast) power spectrum which has a > > > >standard normal distribution (i.e. the jackknife estimate of the > > > >variance is expected to be 1 and the estimate of the mean 0). > > > >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to > > > >use non-parametric techniques to do statistical inference. > > > >Freqdescriptives in this respect still historically has the option of > > > >computing a jackknife estimate of the SEM of the powerspectrum/ > > > >coherencespectrum, which can be used to compute a T-statistic across > > > >two conditions for example. However, I you would choose this path, you > > > >have to write some code which does this, because it is not in > > > >fieldtrip. The biascorrect option has been taken out altogether as far > > > >as I can see, (and had been designed only to correct the bias in the > > > >coherence spectra, and not in the power spectra if I remember > > > >correctly), and any reference in the documentation should be removed. > > > >Unfortunately, we did not yet have time to considerably clean up > > > >freqdescriptives, but this is quite high on the developer's to do list. > > > >The bottom line is: ignore biascorrect, and if you use the jackknife > > > >estimate of the SEM, you have to come up with some code of your own. > > > >Alternatively, you could look into freqstatistics and use > > > >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do > > > >statistical inference. > > > > > > > >Best, > > > > > > > >Jan-Mathijs > > > > > > > > > > > >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > > > > > > > >> Hi all, > > > >> > > > >> Is there a more detailed explanation of usage for the jackknife and > > > >> biascorrect options for freqdescriptives than the one in the > > > >> freqdescriptives reference > > > page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? > > > >> > > > >> More specifically, are these options related to Bokil et al NeuroIm > > > >> 2007? How should they be employed to determine significance of > > > >> difference between conditions? (Is there somewhere a tutorial for > > > >> the use of these options analogous to the one about cluster-based > > > >> permutation testing?) > > > >> > > > >> Also, for the permutation analysis of TFRs > > > (http://fieldtrip.fcdonders.nl/tutorial/statistics?s > > > >> []=freqstatistics), if I don't want to employ the planar gradient > > > >> step (what exactly IS combineplanar? sorry I couldn't find it), can > > > >> I simply skip it and calculate the TFRs of the raw sensor data? > > > >> > > > >> Many thanks! > > > >> Dahlia. > > > >> ---------------------------------- > > > >> The aim of this list is to facilitate the discussion between users > > > >> of the FieldTrip toolbox, to share experiences and to discuss new > > > >> ideas for MEG and EEG analysis. > > > >> http://listserv.surfnet.nl/archives/fieldtrip.html > > > >> http://www.ru.nl/fcdonders/fieldtrip/ > > > > > > > >---------------------------------- > > > > > > > >The aim of this list is to facilitate the discussion between users of > > > >the FieldTrip toolbox, to share experiences and to discuss new ideas > > > >for MEG and EEG analysis. > > > > > > > >http://listserv.surfnet.nl/archives/fieldtrip.html > > > > > > > >http://www.ru.nl/fcdonders/fieldtrip/ > > > > > > > > > > > > > > > > > > > > > > > >---------------------------------- > > > >The aim of this list is to facilitate the discussion between users of the > > > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > > > and EEG analysis. See also > > > http://listserv.surfnet.nl/archives/fieldtrip.html and > > > http://www.ru.nl/neuroimaging/fieldtrip. > > > > > > > > > > ---------------------------------- > > > The aim of this list is to facilitate the discussion between users of the > > FieldTrip > > > toolbox, to share experiences and to discuss new ideas for MEG and EEG > > analysis. > > > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > > > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From dahliash at STANFORD.EDU Thu Sep 3 00:17:48 2009 From: dahliash at STANFORD.EDU (Dahlia Sharon) Date: Thu, 3 Sep 2009 00:17:48 +0200 Subject: freqdescriptives/statistics (spatial clustering for planar gradiometers and magnetometers __ Neuromag) Message-ID: Thanks Eric for this helpful reply. We will look into summing the power over grad pairs and ignoring mags. My problem with collapsing over time is that if there is a transient difference between conditions then it might not reach significance this way. Or do you have experience to the contrary? On Wed, 2 Sep 2009 09:47:33 +0200, Eric Maris wrote: >Hi Dahlia, > > >My name is Eric Maris and, together with Robert Oostenveld, I implemented >the permutation statistics in Fieldtrip. > >> 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate >> layout file (all channels). Does fieldtrip take into account which >channels >> are gradiometers and which magnetometers when it calculates adjacency for >> clustering? >> >> 2. How does fieldtrip calculate adjacency for channels? (time and >frequency >> are obvious...) >> >> 3. How is the clustering performed? >> >> We're getting a significant cluster but it doesn't look like a single blob >> in the time-frequency domain (averaging over sensors) but like two very >> distant blobs, which is very strange... > >These are important points. As far as I know, you are the first to use the >cluster-based permutation tests on Neuromag data. This means that you have >to do some more work than the people who work with a system that only has >axial gradiometers (like the CTF system). For axial gradiometers, Fieldtrip >can calculate the adjacency in a straightforward way, using the positions of >the coils in the helmet. Working with planar gradiometers and magnetometers, >you have to define yourself the adjacency structure for the channels in your >system (both gradiometers and magnetomers). Fieldtrip doesn't care about the >way you define adjacency. You can give Fieldtrip any adjacency structure via >the configuration field cfg.neighbours. (Type "help neighbourselection" to >get info about how to define and adjacency structure.) > >Defining adjacency on planar gradiometers requires some thinking. Things >become easier if you (1) ignore the magnetometers, and (2) sum the power at >the pairs of orthogonal planar gradiometers. This maps the data on a new set >of channels for which adjacency is defined in a straightforward way. (Of >course, you may also decide to retain the orientation information in your >original planar gradiometers, but than you have to come up with a sensible >definition of adjacency that takes this orientation information into >account.) > >Finally, a minor point, do not start with cluster-based permutation tests >with both time and frequency resolution. If you are interested in >oscillations, only keep the frequency resolution in you first analyses. You >can later add the time axis if you want to know how the effect develops over >time. > > >Good luck, > >Eric > > >dr. Eric Maris >Donders Institute for Brain, Cognition and Behavior >Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging >Radboud University >P.O. Box 9104 >6500 HE Nijmegen >The Netherlands >T:+31 24 3612651 >Mobile: 06 39584581 >F:+31 24 3616066 >E: e.maris at donders.ru.nl > >MSc Cognitive Neuroscience: www.ru.nl/master/cns/ > > > > >> >> On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen >> wrote: >> >> >Dear Dahlia, >> > >> >Hemant Bokil indeed uses the jackknife to obtain variance estimates of >> >power (and coherence), see also for example his 2007 paper in >> >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', >> >he has shown that by applying a specific correction to the power >> >estimate, in combination of the jackknife, generates a test-statistic >> >from a differential (i.e. contrast) power spectrum which has a >> >standard normal distribution (i.e. the jackknife estimate of the >> >variance is expected to be 1 and the estimate of the mean 0). >> >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to >> >use non-parametric techniques to do statistical inference. >> >Freqdescriptives in this respect still historically has the option of >> >computing a jackknife estimate of the SEM of the powerspectrum/ >> >coherencespectrum, which can be used to compute a T-statistic across >> >two conditions for example. However, I you would choose this path, you >> >have to write some code which does this, because it is not in >> >fieldtrip. The biascorrect option has been taken out altogether as far >> >as I can see, (and had been designed only to correct the bias in the >> >coherence spectra, and not in the power spectra if I remember >> >correctly), and any reference in the documentation should be removed. >> >Unfortunately, we did not yet have time to considerably clean up >> >freqdescriptives, but this is quite high on the developer's to do list. >> >The bottom line is: ignore biascorrect, and if you use the jackknife >> >estimate of the SEM, you have to come up with some code of your own. >> >Alternatively, you could look into freqstatistics and use >> >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do >> >statistical inference. >> > >> >Best, >> > >> >Jan-Mathijs >> > >> > >> >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: >> > >> >> Hi all, >> >> >> >> Is there a more detailed explanation of usage for the jackknife and >> >> biascorrect options for freqdescriptives than the one in the >> >> freqdescriptives reference >> page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? >> >> >> >> More specifically, are these options related to Bokil et al NeuroIm >> >> 2007? How should they be employed to determine significance of >> >> difference between conditions? (Is there somewhere a tutorial for >> >> the use of these options analogous to the one about cluster-based >> >> permutation testing?) >> >> >> >> Also, for the permutation analysis of TFRs >> (http://fieldtrip.fcdonders.nl/tutorial/statistics?s >> >> []=freqstatistics), if I don't want to employ the planar gradient >> >> step (what exactly IS combineplanar? sorry I couldn't find it), can >> >> I simply skip it and calculate the TFRs of the raw sensor data? >> >> >> >> Many thanks! >> >> Dahlia. >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> >> of the FieldTrip toolbox, to share experiences and to discuss new >> >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> > >> >---------------------------------- >> > >> >The aim of this list is to facilitate the discussion between users of >> >the FieldTrip toolbox, to share experiences and to discuss new ideas >> >for MEG and EEG analysis. >> > >> >http://listserv.surfnet.nl/archives/fieldtrip.html >> > >> >http://www.ru.nl/fcdonders/fieldtrip/ >> > >> > >> > >> > >> > >> >---------------------------------- >> >The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. >> > >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >FieldTrip >> toolbox, to share experiences and to discuss new ideas for MEG and EEG >analysis. >> See also http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Thu Sep 3 07:26:47 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Thu, 3 Sep 2009 07:26:47 +0200 Subject: freqdescriptives/statistics (spatial clustering for planar gradiometers and magnetometers __ Neuromag) In-Reply-To: Message-ID: > My problem with collapsing over time is that if there is a transient > difference between conditions then it might not reach significance this way. My advice is intended to makd life easy in your first cluster-based permutation analyses. Clustering in space, frequency AND time sometimes produces nonfocal 3D clusters. Best, Eric > > On Wed, 2 Sep 2009 09:47:33 +0200, Eric Maris > wrote: > > >Hi Dahlia, > > > > > >My name is Eric Maris and, together with Robert Oostenveld, I implemented > >the permutation statistics in Fieldtrip. > > > >> 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate > >> layout file (all channels). Does fieldtrip take into account which > >channels > >> are gradiometers and which magnetometers when it calculates adjacency for > >> clustering? > >> > >> 2. How does fieldtrip calculate adjacency for channels? (time and > >frequency > >> are obvious...) > >> > >> 3. How is the clustering performed? > >> > >> We're getting a significant cluster but it doesn't look like a single blob > >> in the time-frequency domain (averaging over sensors) but like two very > >> distant blobs, which is very strange... > > > >These are important points. As far as I know, you are the first to use the > >cluster-based permutation tests on Neuromag data. This means that you have > >to do some more work than the people who work with a system that only has > >axial gradiometers (like the CTF system). For axial gradiometers, Fieldtrip > >can calculate the adjacency in a straightforward way, using the positions of > >the coils in the helmet. Working with planar gradiometers and magnetometers, > >you have to define yourself the adjacency structure for the channels in your > >system (both gradiometers and magnetomers). Fieldtrip doesn't care about the > >way you define adjacency. You can give Fieldtrip any adjacency structure via > >the configuration field cfg.neighbours. (Type "help neighbourselection" to > >get info about how to define and adjacency structure.) > > > >Defining adjacency on planar gradiometers requires some thinking. Things > >become easier if you (1) ignore the magnetometers, and (2) sum the power at > >the pairs of orthogonal planar gradiometers. This maps the data on a new set > >of channels for which adjacency is defined in a straightforward way. (Of > >course, you may also decide to retain the orientation information in your > >original planar gradiometers, but than you have to come up with a sensible > >definition of adjacency that takes this orientation information into > >account.) > > > >Finally, a minor point, do not start with cluster-based permutation tests > >with both time and frequency resolution. If you are interested in > >oscillations, only keep the frequency resolution in you first analyses. You > >can later add the time axis if you want to know how the effect develops over > >time. > > > > > >Good luck, > > > >Eric > > > > > >dr. Eric Maris > >Donders Institute for Brain, Cognition and Behavior > >Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging > >Radboud University > >P.O. Box 9104 > >6500 HE Nijmegen > >The Netherlands > >T:+31 24 3612651 > >Mobile: 06 39584581 > >F:+31 24 3616066 > >E: e.maris at donders.ru.nl > > > >MSc Cognitive Neuroscience: www.ru.nl/master/cns/ > > > > > > > > > >> > >> On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen > >> wrote: > >> > >> >Dear Dahlia, > >> > > >> >Hemant Bokil indeed uses the jackknife to obtain variance estimates of > >> >power (and coherence), see also for example his 2007 paper in > >> >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', > >> >he has shown that by applying a specific correction to the power > >> >estimate, in combination of the jackknife, generates a test-statistic > >> >from a differential (i.e. contrast) power spectrum which has a > >> >standard normal distribution (i.e. the jackknife estimate of the > >> >variance is expected to be 1 and the estimate of the mean 0). > >> >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to > >> >use non-parametric techniques to do statistical inference. > >> >Freqdescriptives in this respect still historically has the option of > >> >computing a jackknife estimate of the SEM of the powerspectrum/ > >> >coherencespectrum, which can be used to compute a T-statistic across > >> >two conditions for example. However, I you would choose this path, you > >> >have to write some code which does this, because it is not in > >> >fieldtrip. The biascorrect option has been taken out altogether as far > >> >as I can see, (and had been designed only to correct the bias in the > >> >coherence spectra, and not in the power spectra if I remember > >> >correctly), and any reference in the documentation should be removed. > >> >Unfortunately, we did not yet have time to considerably clean up > >> >freqdescriptives, but this is quite high on the developer's to do list. > >> >The bottom line is: ignore biascorrect, and if you use the jackknife > >> >estimate of the SEM, you have to come up with some code of your own. > >> >Alternatively, you could look into freqstatistics and use > >> >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do > >> >statistical inference. > >> > > >> >Best, > >> > > >> >Jan-Mathijs > >> > > >> > > >> >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > >> > > >> >> Hi all, > >> >> > >> >> Is there a more detailed explanation of usage for the jackknife and > >> >> biascorrect options for freqdescriptives than the one in the > >> >> freqdescriptives reference > >> page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? > >> >> > >> >> More specifically, are these options related to Bokil et al NeuroIm > >> >> 2007? How should they be employed to determine significance of > >> >> difference between conditions? (Is there somewhere a tutorial for > >> >> the use of these options analogous to the one about cluster-based > >> >> permutation testing?) > >> >> > >> >> Also, for the permutation analysis of TFRs > >> (http://fieldtrip.fcdonders.nl/tutorial/statistics?s > >> >> []=freqstatistics), if I don't want to employ the planar gradient > >> >> step (what exactly IS combineplanar? sorry I couldn't find it), can > >> >> I simply skip it and calculate the TFRs of the raw sensor data? > >> >> > >> >> Many thanks! > >> >> Dahlia. > >> >> ---------------------------------- > >> >> The aim of this list is to facilitate the discussion between users > >> >> of the FieldTrip toolbox, to share experiences and to discuss new > >> >> ideas for MEG and EEG analysis. > >> >> http://listserv.surfnet.nl/archives/fieldtrip.html > >> >> http://www.ru.nl/fcdonders/fieldtrip/ > >> > > >> >---------------------------------- > >> > > >> >The aim of this list is to facilitate the discussion between users of > >> >the FieldTrip toolbox, to share experiences and to discuss new ideas > >> >for MEG and EEG analysis. > >> > > >> >http://listserv.surfnet.nl/archives/fieldtrip.html > >> > > >> >http://www.ru.nl/fcdonders/fieldtrip/ > >> > > >> > > >> > > >> > > >> > > >> >---------------------------------- > >> >The aim of this list is to facilitate the discussion between users of the > >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > >> and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > >> > > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users of the > >FieldTrip > >> toolbox, to share experiences and to discuss new ideas for MEG and EEG > >analysis. > >> See also http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From nadia.mueller at UNI-KONSTANZ.DE Fri Sep 4 15:50:28 2009 From: nadia.mueller at UNI-KONSTANZ.DE (=?ISO-8859-1?Q?Nadia_M=FCller?=) Date: Fri, 4 Sep 2009 15:50:28 +0200 Subject: depsamplesF In-Reply-To: <20090805195249.26517.qmail@f4mail-235-238.rediffmail.com> Message-ID: Dear all, I've a question regarding the statfun_depsamplesF. I'd like to compare source data of 9 subjects x 5 conditions. Therefore I performed a repeated dependent samples F-statistic on source level. When looking at the data I was surprised by the very high F-values and, at the same time, very low p-values. So we debugged the statfun to get an idea of how the F-statistic is calculated. Thereby, we came across the 'scaledstat' where the F- values are dramatically reduced, resulting in very low F-values and consequently p-values. We also got different degrees of freedom compared to an anova calculated elsewhere. It would be great if you could give me some background of how this F- statistic is performed and why for example we need the scaledstat. Thanks a lot, nadia ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From hungptit at GMAIL.COM Mon Sep 7 09:00:02 2009 From: hungptit at GMAIL.COM (Hung Dang) Date: Mon, 7 Sep 2009 01:00:02 -0600 Subject: EEG beamforming Message-ID: Dear all, I try to combine Fieldtrip with my finite different head model and haven't figured out how to register a Biosemi 128 electrode system with a segmented realistic head model in Fieldtrip. I would be great if you could give me some hints or suggestions about my problem. Thanks a lot Hung ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Tue Sep 8 09:38:46 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 8 Sep 2009 09:38:46 +0200 Subject: removed external/biosig Message-ID: Dear all I have released the external/biosig directory from the FieldTrip release version, because it is causing problems with some of the functions having the same name as a Matlab builtin. If needed, you can get a condensed version of the biosig code from ftp://ftp.fcdonders.nl/pub/fieldtrip/external or the full code from the BIOSIG website at http://biosig.sourceforge.net/ . best regards, Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher 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 ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.glerean at GMAIL.COM Tue Sep 8 10:44:23 2009 From: e.glerean at GMAIL.COM (Enrico Glerean) Date: Tue, 8 Sep 2009 11:44:23 +0300 Subject: bug report- error with prepare_concentricspheres.m Message-ID: Hello I am having an error running the example giving in the help of prepare_concentricspheres.m (using most recent version Revision 1.8 2009/07/16 09:14:52, se below). I think it's due to the fact that unique wants a simple array as input, not structs. Any chances it could be resolved quickly? Otherwise, could you just point out the final structure of the vol? is it: for i=1:4 vol(i).r = ... vol(i).o = ... vol(i).c= .. or is it vol.r = [r1 r2 r3 r4] vol.o=[o1;o2;o3;o4] vol.c=[c1 c2 c3 c4] best regards Enrico -------- code from help prepare_concentricspheres Example: % first create 4 surfaces that represent the brain, csf, skull and skin radius = [86 88 92 100]; headshape = []; for i=1:4 pnt = randn(100,3); for j=1:size(pnt,1) pnt(j,:) = pnt(j,:) ./ norm(pnt(j,:)); end headshape(i).pnt = radius(i) .* pnt + 0.1*randn(size(pnt)); end % then construct a volume conduction model of the head by fitting 4 concentric spheres cfg = []; cfg.headshape = headshape; cfg.conductivity = [0.3300 1 0.0042 0.3300] [vol, cfg] = prepare_concentricspheres(cfg) ??? Error using ==> unique Too many input arguments. Error in ==> prepare_mesh_headshape at 30 headshape.pnt = unique(headshape.pnt, 'rows'); Error in ==> prepare_concentricspheres at 82 headshape = prepare_mesh_headshape(cfg); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Tue Sep 8 11:20:31 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Tue, 8 Sep 2009 11:20:31 +0200 Subject: depsamplesF In-Reply-To: <4CD6CD94-A7AE-48B7-BCEE-9C1DE16A98CD@uni-konstanz.de> Message-ID: Hi Nadia, Statfun_depsamplesF calculates a Hotelling's T^2-statistic. This statistic has a scaled F-distribution under the null hypothesis that the levels of the within-subjects independent variable have identical means. When programming this statfun, I used the book by Johnson & Wichern, Applied Multivariate Statistical Analysis, which I can advise to everyone who is not afraid of matrices. The statistic that is (or should be ...) implemented is on the top of p. 218 (edition 1988 of the book). Can you check the code? I know that Tineke Snijders (Donders PhD student) has also used this statfun (actually, I programmed it especially for her) and did not obtain strange results. Good luck, Eric Maris > -----Oorspronkelijk bericht----- > Van: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] Namens Nadia > Müller > Verzonden: vrijdag 4 september 2009 15:50 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: [FIELDTRIP] depsamplesF > > Dear all, > > I've a question regarding the statfun_depsamplesF. > > I'd like to compare source data of 9 subjects x 5 conditions. > Therefore I performed a repeated dependent samples F-statistic on > source level. When looking at the data I was surprised by the very > high F-values and, at the same time, very low p-values. So we > debugged the statfun to get an idea of how the F-statistic is > calculated. Thereby, we came across the 'scaledstat' where the F- > values are dramatically reduced, resulting in very low F-values and > consequently p-values. We also got different degrees of freedom > compared to an anova calculated elsewhere. > > It would be great if you could give me some background of how this F- > statistic is performed and why for example we need the scaledstat. > > Thanks a lot, > nadia > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From fedeletommaso at YAHOO.IT Tue Sep 8 12:16:52 2009 From: fedeletommaso at YAHOO.IT (tommaso fedele) Date: Tue, 8 Sep 2009 10:16:52 +0000 Subject: I: [Fwd: Re: [Fwd: Re: FieldTrip download request]] Message-ID: > Dear all, > I am trying to perform a TF analysis with my new fresh FieldTrip > toolbox, > version "fieldtrip-20090823". I attached a mat file with data and and > results, and I am going to expalin breigly my problems: > > 1. I have built my dataset as suggested in the documentation > (http://fieldtrip.fcdonders.nl/faq/ > how_can_i_import_my_own_dataformat): > > > data.label % cell-array containing strings, Nchan X 1 > data.fsample % sampling frequency in Hz, single number > data.trial % cell-array containing a data matrix for each trial (1 X > Ntrial), each data matrix is Nchan X Nsamples > data.time % cell-array containing a time axis for each trial (1 X > Ntrial), each time axis is a 1 X Nsamples vector > > > > 2. I executed the following script copied and modified from > http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis > as follows: > > %% Fixed wondow length > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'MEG'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.foi = 100:100:1000; % analysis > 2 to > 30 Hz in steps of 2 Hz > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.01; % length of time > window = 0.5 sec > cfg.toi = -0.01:0.01:0.08; % time > window > "slides" from -0.5 to 1.5 sec in steps of 0.05 sec (50 ms) > TFRhann = freqanalysis(cfg, data); > > but as you can see from the data file attached I get and empty > powerspectrum matrix. > > Do you have any suggestion for me? > > Thanks > > Tommaso Fedele > > > >> Thank you for your interest in the FieldTrip toolbox. >> >> You can download it from the F.C. Donders public FTP server >> (ftp.fcdonders.nl) at ftp://ftp.fcdonders.nl/pub/fieldtrip/ >> You can login with username 'anonymous' and use your email address as >> password. >> >> There is an FIELDTRIP email discussion list on which people can post >> their questions and messages regarding the use of FieldTrip. New >> releases and updates will also be announced through that list. >> >> If you do not want to participate on the discussion list, but still >> want to be informed about updates, you can join the FIELDTRIP-NEWS >> list. That is a very low volume list to which only the fieldtrip >> maintainers can make posts. >> >> For subscribing to the FIELDTRIP discussion list, click here >> http://nic.surfnet.nl/scripts/wa.exe?SUBED1=fieldtrip&A=1 >> >> For subscribing to the FIELDTRIP-NEWS announcement list, click here >> http://nic.surfnet.nl/scripts/wa.exe?SUBED1=fieldtrip-news&A=1 >> >> > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: data_tommaso.mat Type: application/vnd.ms-access Size: 473965 bytes Desc: not available URL: From moratti at MED.UCM.ES Wed Sep 9 11:06:20 2009 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Wed, 9 Sep 2009 11:06:20 +0200 Subject: depsamplesF Message-ID: Hi Eric & Nadia, Having recently used depsamplesF I had a look at the code as Nadia had some doubts. In the newer edition (1998) of the Johnson and Wichern book I guess the line 136: s.stat(smplindx)=nunits*contrastavg*inv(covmat)*contrastavg'; corresponds to formula 5-4 at page 226. n(X-u)' S(-1) (X-u) line 151: s.critval = ((nunits-1).*ncontrasts./(nunits-ncontrasts)).*finv(1- cfg.alpha,s.dfnum,s.dfdenom); corresponds to formula 5-6 (grey box) at page 226. P[T^2 > (n-1)/(n-p) F(p,n-p)] Please let me know if I got that right for adquate reporting of the method. Many thanks, Stephan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Wed Sep 9 11:56:47 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 9 Sep 2009 11:56:47 +0200 Subject: depsamplesF In-Reply-To: Message-ID: Dear Stephan, > Having recently used depsamplesF I had a look at the code as Nadia had some > doubts. In the newer edition (1998) of the Johnson and Wichern book I guess > the line 136: s.stat(smplindx)=nunits*contrastavg*inv(covmat)*contrastavg'; > corresponds to formula 5-4 at page 226. > n(X-u)' S(-1) (X-u) (I don't have the 1998 edition.) I guess the u in the formula above is the vector of expected values of the contrasts under the null hypothesis (almost always set equal to zeros, as is also the case in the depsamplesF statfun). > > line 151: s.critval = ((nunits-1).*ncontrasts./(nunits-ncontrasts)).*finv(1- > cfg.alpha,s.dfnum,s.dfdenom); corresponds to formula 5-6 (grey box) at page > 226. > P[T^2 > (n-1)/(n-p) F(p,n-p)] I think this must be ((n-1)*p)/(n-p) F(p,n-p). If you want to check the output of depsamplesF, you could look at one row of the matrix dat. Every row corresponds to a particular channel, channel-by-time pair, channel-by-frequency pair, channel-by-frequency-by-time triplet, etc. The output of depsamplesF for one such row should be identical to the T^2-statistic that is calculated using some other statistics package. (Note that a row of the matrix dat corresponds to the usual nsubjects-by-nconditions matrix. However, in dat, this matrix is reshaped as a row vector.) > > Please let me know if I got that right for adquate reporting of the method. > > Many thanks, > > Stephan > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From moratti at MED.UCM.ES Wed Sep 9 12:56:13 2009 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Wed, 9 Sep 2009 12:56:13 +0200 Subject: depsamplesF Message-ID: of course it should be (n-1)p/(n-p), sorry for the confusion, it was a typing error of mine. best, Stephan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From moratti at MED.UCM.ES Wed Sep 9 13:57:44 2009 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Wed, 9 Sep 2009 13:57:44 +0200 Subject: depsamplesF Message-ID: Hi Eric y Nadia, Ok, I have made a test of depsamplesF comparing results of depsamplesF and SPSS. I get the same results. I used data from an experiment and chose a timepoint and one channel that were indicated to be significant by dempsamplesF. In the attached TEST_dempsamplesF.mat file it is "testmat" (24 subjects 3 conditions). The variable "dat" is the reshaped "testmat". The structure "s" contains the results of depsamplesF. I added the variable scaledstat as the field "F" to "s" as it is the F value. The attached file "SPSSoutput.bmg" is a screen shot of the SPSS output entering testmat in a MANOVA. The results are the same: F(2, 22) = 6.627, p = 0.006 We can also calculate Wilk's lambda from T^2 (see page 232 formula 5-13 of the Johnson 1998 edition) as: lambda = 1/(1 + s.stat/(24-1)); and get 0.624, the same as in SPSS. Maybe, as people are more used to F values, it would be useful to have the F(scaledstat) value also in the "s" structure (and later after using timelockstats or freqstats to have a matrix containing the F values besides the T^2 values). Thanks for implementing that great stuff in fieldtrip and making it accessible for all users ! Best, Stephan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: SPSSoutput.bmp Type: image/bmp Size: 371126 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TEST_dempsamplesF.mat Type: application/octet-stream Size: 1588 bytes Desc: not available URL: From r.oostenveld at FCDONDERS.RU.NL Wed Sep 9 16:33:02 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 9 Sep 2009 16:33:02 +0200 Subject: bug report- error with prepare_concentricspheres.m In-Reply-To: Message-ID: Hi Enrico, Sorry, that was due to some changes in the mesh generation to also support manual clicking in an MRI for making a mesh. I have fixed it, The latest version (this evening on the ftp) will include the fix. thanks, Robert On 8 Sep 2009, at 10:44, Enrico Glerean wrote: > Hello > > I am having an error running the example giving in the help of > prepare_concentricspheres.m (using most recent version Revision 1.8 > 2009/07/16 09:14:52, se below). > > I think it's due to the fact that unique wants a simple array as > input, not structs. Any chances it could be resolved quickly? > Otherwise, could you just point out the final structure of the vol? > > is it: > > for i=1:4 > vol(i).r = ... > vol(i).o = ... > vol(i).c= .. > > or is it > > vol.r = [r1 r2 r3 r4] > vol.o=[o1;o2;o3;o4] > vol.c=[c1 c2 c3 c4] > > > best regards > > Enrico > > -------- code from help prepare_concentricspheres > Example: > > % first create 4 surfaces that represent the brain, csf, skull > and skin > radius = [86 88 92 100]; > headshape = []; > for i=1:4 > pnt = randn(100,3); > for j=1:size(pnt,1) > pnt(j,:) = pnt(j,:) ./ norm(pnt(j,:)); > end > headshape(i).pnt = radius(i) .* pnt + 0.1*randn(size(pnt)); > end > > % then construct a volume conduction model of the head by fitting > 4 concentric spheres > cfg = []; > cfg.headshape = headshape; > cfg.conductivity = [0.3300 1 0.0042 0.3300] > [vol, cfg] = prepare_concentricspheres(cfg) > > > > ??? Error using ==> unique > Too many input arguments. > > Error in ==> prepare_mesh_headshape at 30 > headshape.pnt = unique(headshape.pnt, 'rows'); > > Error in ==> prepare_concentricspheres at 82 > headshape = prepare_mesh_headshape(cfg); > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From nadia.mueller at UNI-KONSTANZ.DE Wed Sep 9 16:43:08 2009 From: nadia.mueller at UNI-KONSTANZ.DE (=?WINDOWS-1252?Q?Nadia_M=FCller?=) Date: Wed, 9 Sep 2009 16:43:08 +0200 Subject: depsamplesF In-Reply-To: Message-ID: Hi Eric and Stephan, thanks a lot for testing and implementing that stuff!! And also for the background information. It's much clearer now why we have the scaledstat and how the test statistic is calculated. Best, Nadia Am 09.09.2009 um 13:57 schrieb Stephan Moratti: > Hi Eric y Nadia, > > Ok, I have made a test of depsamplesF comparing results of > depsamplesF and > SPSS. I get the same results. I used data from an experiment and > chose a > timepoint and one channel that were indicated to be significant by > dempsamplesF. In the attached TEST_dempsamplesF.mat file it is > "testmat" > (24 subjects 3 conditions). The variable "dat" is the reshaped > "testmat". The > structure "s" contains the results of depsamplesF. I added the > variable > scaledstat as the field "F" to "s" as it is the F value. The attached > file "SPSSoutput.bmg" is a screen shot of the SPSS output entering > testmat in > a MANOVA. The results are the same: > F(2, 22) = 6.627, p = 0.006 > > We can also calculate Wilk's lambda from T^2 (see page 232 formula > 5-13 of > the Johnson 1998 edition) as: > > lambda = 1/(1 + s.stat/(24-1)); > > and get 0.624, the same as in SPSS. Maybe, as people are more used > to F > values, it would be useful to have the F(scaledstat) value also in > the "s" > structure (and later after using timelockstats or freqstats to have > a matrix > containing the F values besides the T^2 values). > > Thanks for implementing that great stuff in fieldtrip and making it > accessible > for all users ! > > Best, > > Stephan > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From filip.vanopstal at UGENT.BE Wed Sep 9 17:34:42 2009 From: filip.vanopstal at UGENT.BE (Filip Van Opstal) Date: Wed, 9 Sep 2009 17:34:42 +0200 Subject: coherence computation Message-ID: Hi all, I am trying to compute the coherence between my ECG ICA components and the ECG. Following the tutorial I compute a frequency decomposition of all the components and the ECG and use this to calculate the coherence with freqdescriptives. In the output of freqdesriptives, however, I don't observe the coherence spectrum (only the powspctrm is present). I am using the Neuromag system, running the analysis on the gradiometers only. All suggestions are highly appreciated! Thanks, Filip ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From boninc at NINDS.NIH.GOV Wed Sep 9 18:26:00 2009 From: boninc at NINDS.NIH.GOV (Bonin, Claudia (NIH/NINDS) [F]) Date: Wed, 9 Sep 2009 12:26:00 -0400 Subject: freqstastics script Message-ID: I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. thanks! claudia >> cfg.statistic = 'kruskalwallis'; >> cfg.method = 'stats'; >> [s] = freqstatistics(cfg, fr, fr); averaging over 3 channels selected 50 time bins selected 41 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip/private/prepare_timefreq_data at 305 In fieldtrip/private/statistics_wrapper at 167 In freqstatistics at 44 ??? Undefined function or method 'neighbourselection' for input arguments of type 'struct'. Error in ==> statistics_wrapper at 181 cfg = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 44 [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From manish.saggar at GMAIL.COM Wed Sep 9 18:56:36 2009 From: manish.saggar at GMAIL.COM (Manish Saggar) Date: Wed, 9 Sep 2009 11:56:36 -0500 Subject: Clusterplot not highlighting clusters & average layout file In-Reply-To: Message-ID: Dear All, I am a novice user of FieldTrip and I love the tools provided by you guys. Great work. I have a question, regarding the analysis I recently did. Any help is appreciated. I am confused why the cluster is not mapped on the areas that visually show clear reduction. I am comparing two conditions (with-in subjects) using depSamplesT statistic. Both of the conditions are 1 min of EEG data and I calculate powerspectrum over those 1 min windows using segment of 1 second windows with 50% overlap. Condition are named as pre and post. I have attached topoplotER of power spectrum for each condition in alpha band (8-12Hz). Clearly in post there is reduced power in left (mainly) and right hemispheres at the back of the head as compared to pre. However in the clusterplot (raweffect) the cluster is mainly situated in midline frontal and parietal areas. Actually it is quite a large cluster, covering almost all channels. The thing that worries me is that it just didn't cover the the channels which clearly shows difference by visual inspection between two conditions. Also shouldn't the cluster be located only (or mainly) where the difference can be seen in pre and post topoplots. For convenience I have plotted all plots with same zlim. Here is the code that I used for running stats: -------        cfg = [];        cfg.channel          = {'all'};        cfg.latency          = 'all';        cfg.frequency        = foi;        cfg.method           = 'montecarlo';        cfg.statistic        = depsamplesT;        cfg.correctm         = 'cluster';        cfg.clusteralpha     = 0.05;        cfg.clusterstatistic = 'maxsum';        cfg.minnbchan        = 2;   %works best.        cfg.tail             = 0;        cfg.clustertail      = 0;        cfg.alpha            = 0.025;        cfg.numrandomization = 1000;        subj = 28;        design = zeros(2,2*subj);        for i = 1:1:subj           design(1,i) = i;           design(1,subj+i) = i;        end        design(2,1:subj) = 1;        design(2,subj+1:2*subj) = 2;        cfg.design = design;        cfg.uvar = 1;        cfg.ivar = 2;        cfg.layout = 'ng.sfp';        cfg.neighbourdist = 0.1; % this gives the neighbor count on average to 3.2        cfg.avgoverfreq = 'yes';        stat{win} = freqstatistics(cfg, post, pre); ---------- Regards, Manish ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: pre-post-alpha-diff.tiff Type: image/tiff Size: 203224 bytes Desc: not available URL: From moritzgw at TUEBINGEN.MPG.DE Wed Sep 9 18:57:59 2009 From: moritzgw at TUEBINGEN.MPG.DE (Moritz Grosse-Wentrup) Date: Wed, 9 Sep 2009 18:57:59 +0200 Subject: Call for Contributions: NIPS 2009 Workshop on Connectivity Inference in Neuroimaging Message-ID: ---------------------- CALL FOR CONTRIBUTIONS ---------------------- *NIPS 2009 WORKSHOP ON CONNECTIVITY INFERENCE IN NEUROIMAGING* *Webpage* http://cini2009.kyb.tuebingen.mpg.de *Workshop description* Over the past decade, brain connectivity has become a central theme in the neuroimaging community. At the same time, causal inference has recently emerged as a major research topic in machine learning. Even though the two research questions are closely related, interactions between the neuroimaging and machine-learning communities have been limited. The aim of this workshop is to initiate productive interactions between neuroimaging and machine learning by introducing the workshop audience to the different concepts of connectivity/causal inference employed in each of the communities. Special emphasis is placed on discussing commonalities as well as distinctions between various approaches in the context of neuroimaging. Due to the increasing relevance of brain connectivity for analyzing mental states, we also highly welcome contributions discussing applications of brain connectivity measures to real-world problems such as brain-computer interfacing or mental state monitoring. *Topics* We solicit contributions on new approaches to connectivity and/or causal inference for neuroimaging data as well as on applications of connectivity inference to real-world problems. Contributions might address, but are not limited to, the following topics: * Effective connectivity & causal inference o Dynamic causal modelling o Granger causality o Structural equation models o Causal Bayesian networks o Non-Gaussian linear causal models o Causal additive noise models * Functional connectivity o Canonical correlation analysis o Phase-locking o Imaginary coherence o Independent component analysis * Applications of brain connectivity to real-world problems o Brain-computer interfaces o Mental state monitoring *Invited speakers* * Jean Daunizeau, University of Zurich & University College London * Rainer Goebel, Maastricht University * Scott Makeig, University of California San Diego *Workshop format* CINI 2009 is a one-day workshop at the Twenty-Third Annual Conference on Neural Information Processing Systems (NIPS 2009). Besides three invited talks, in which the audience will be introduced to current approaches for inferring connectivity in neuroimaging data, there will be several contributed talks and an evening poster session. Special emphasis will be placed on a balanced contribution of talks from the neuroimaging and machine learning communities. To foster interaction between communities, approximately 50% of workshop time is reserved for discussions. *Key dates* * Extended abstract submission deadline: October 9th, 2009, 5 pm (PT) * Notification of acceptance: October 23rd, 2009 * Workshop: December 11th or 12th, 2009 *Submission instructions* Please submit extended abstracts (maximum two pages) in either pdf or doc format through the CINI 2009 submission site at https://cmt.research.microsoft.com/CINI2009/. Upon notification of acceptance, authors will also be notified whether their contribution has been accepted as a contributed talk or poster. *Workshop location* Westin Resort and Spa / Hilton Whistler Resort and Spa Whistler, B.C., Canada *Organization committee* * Moritz Grosse-Wentrup (primary contact), MPI for Biological Cybernetics, Tuebingen * Uta Noppeney, MPI for Biological Cybernetics, Tuebingen * Karl Friston, University College London * Bernhard Schoelkopf, MPI for Biological Cybernetics, Tuebingen *Program committee* * Olivier David, Institut National de la Sante et de la Recherche Medicale, Grenoble * Justin Dauwels, Massachusetts Institute of Technology, Cambridge * Michael Eichler, Maastricht University * Jeremy Hill, Max Planck Institute for Biological Cybernetics, Tuebingen * Guido Nolte, Fraunhofer FIRST, Berlin * Will Penny, University College London * Alard Roebroeck, Maastricht University * Klaas Enno Stephan, University of Zurich * Ryota Tomioka, University of Tokyo * Pedro Valdes-Sosa, Cuban Neuroscience Center, Havana ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE Thu Sep 10 11:37:53 2009 From: Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE (Hanneke van Dijk) Date: Thu, 10 Sep 2009 11:37:53 +0200 Subject: source localization neuromag 122 system. Message-ID: Dear all, At the moment I am using the MNE toolbox and Fieldtrip to localize an alpha source (1.5 seconds spontaneous data recorded with a Neuromag 122 system). With data from the new 306 channel system it seems to work out well. However with data from the old system the source ends up in the cerebellum (attached a picture of Neural Activity index, cfg.lambda = '10%'). Of course it should be in the parieto-occipital cortex or the sensorimotor cortex. I have the feeling there is problem with the position of the gradiometers relative to the headmodel or the other way around. The head model seems to be too far away from the sensors (see attached headmodel1), if my hunch is correct I don't know how to fix this or where exactly I can find the problem. How I made the headmodel you can find on: http://fieldtrip.fcdonders.nl/example/read_neuromag_mri_and_create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space I'm constructing the grad files (to do sourceanalysis with) seperately using read_header and mne2grad (with orig.chs(n).coil_type=2, because the coil_type is 2 for the old system). Another related question: in mne2grad on line 104 and 108 it says 104 >> grad.pnt(kCoil,:)=100*(t(1:3,4)-0.008*t(1:3,1)); % multiply with 100 to get cm ..... 108 >> grad.pnt(kCoil,:)=100*(t(1:3,4)+0.008*t(1:3,1)); Where does this 0.008 come from? I have changed this number to try it out but did't see any clear differences in the gradiometer positions. Thanks in advance for your help, Wishing you all the best, Hanneke ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: headmodel1.jpeg Type: image/jpeg Size: 62529 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: alphasource.jpeg Type: image/jpeg Size: 86762 bytes Desc: not available URL: From Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE Thu Sep 10 13:21:59 2009 From: Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE (Hanneke Van Dijk) Date: Thu, 10 Sep 2009 13:21:59 +0200 Subject: AW: [FIELDTRIP] freqstastics script Message-ID: Dear Claudia, Normally when matlab says 'undefined function for input of type ....' it means it cannot find the specific function in the paths you have defined. You can check whether neighbourselection.m is in your fieldtrip folder, if not I have attached it (version 20090428) so you can put it there. If this doesn't fix it please let me know! Groetjes Hanneke -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) [F] Gesendet: Mi 09.09.2009 18:26 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] freqstastics script I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. thanks! claudia >> cfg.statistic = 'kruskalwallis'; >> cfg.method = 'stats'; >> [s] = freqstatistics(cfg, fr, fr); averaging over 3 channels selected 50 time bins selected 41 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip/private/prepare_timefreq_data at 305 In fieldtrip/private/statistics_wrapper at 167 In freqstatistics at 44 ??? Undefined function or method 'neighbourselection' for input arguments of type 'struct'. Error in ==> statistics_wrapper at 181 cfg = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 44 [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE Thu Sep 10 13:31:52 2009 From: Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE (Hanneke Van Dijk) Date: Thu, 10 Sep 2009 13:31:52 +0200 Subject: freqstastics script Message-ID: Dear Claudia, Sorry the attachnment didn't stick... Yours, Hanneke -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Hanneke Van Dijk Gesendet: Do 10.09.2009 13:21 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script Dear Claudia, Normally when matlab says 'undefined function for input of type ....' it means it cannot find the specific function in the paths you have defined. You can check whether neighbourselection.m is in your fieldtrip folder, if not I have attached it (version 20090428) so you can put it there. If this doesn't fix it please let me know! Groetjes Hanneke -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) [F] Gesendet: Mi 09.09.2009 18:26 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] freqstastics script I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. thanks! claudia >> cfg.statistic = 'kruskalwallis'; >> cfg.method = 'stats'; >> [s] = freqstatistics(cfg, fr, fr); averaging over 3 channels selected 50 time bins selected 41 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip/private/prepare_timefreq_data at 305 In fieldtrip/private/statistics_wrapper at 167 In freqstatistics at 44 ??? Undefined function or method 'neighbourselection' for input arguments of type 'struct'. Error in ==> statistics_wrapper at 181 cfg = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 44 [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE Thu Sep 10 13:34:23 2009 From: Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE (Hanneke van Dijk) Date: Thu, 10 Sep 2009 13:34:23 +0200 Subject: freqstastics script In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B0F34B4@Mail2-UKD.VMED.UKD> Message-ID: ....... Yours Hanneke On Thu, Sep 10, 2009 at 1:31 PM, Hanneke Van Dijk < Hanneke.vanDijk at med.uni-duesseldorf.de> wrote: > Dear Claudia, > > Sorry the attachnment didn't stick... > > Yours, > > Hanneke > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Hanneke Van Dijk > Gesendet: Do 10.09.2009 13:21 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script > > Dear Claudia, > > Normally when matlab says 'undefined function for input of type ....' it > means it cannot find the specific function in the paths you have defined. > You can check whether neighbourselection.m is in your fieldtrip folder, if > not I have attached it (version 20090428) so you can put it there. If this > doesn't fix it please let me know! > > Groetjes Hanneke > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) > [F] > Gesendet: Mi 09.09.2009 18:26 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] freqstastics script > > I am trying to do statistics on time-frequency data across 16 subjects, > averaging over channels. I received back the following error about > 'neighbourselection' which means nothing to me.....Does anyone have any idea > what might be wrong here? I have pasted in the exact message below. > thanks! > claudia > > > >> cfg.statistic = 'kruskalwallis'; > >> cfg.method = 'stats'; > >> [s] = freqstatistics(cfg, fr, fr); > averaging over 3 channels > selected 50 time bins > selected 41 frequency bins > Warning: PACK can only be used from the MATLAB command line. > > In fieldtrip/private/prepare_timefreq_data at 305 > In fieldtrip/private/statistics_wrapper at 167 > In freqstatistics at 44 > ??? Undefined function or method 'neighbourselection' for input arguments > of type > 'struct'. > > Error in ==> statistics_wrapper at 181 > cfg = neighbourselection(cfg,varargin{1}); > > Error in ==> freqstatistics at 44 > [stat] = statistics_wrapper(cfg, varargin{:}); > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: neighbourselection.m Type: application/octet-stream Size: 6816 bytes Desc: not available URL: From j.gross at PSY.GLA.AC.UK Thu Sep 10 14:34:43 2009 From: j.gross at PSY.GLA.AC.UK (Joachim Gross) Date: Thu, 10 Sep 2009 13:34:43 +0100 Subject: source localization neuromag 122 system. In-Reply-To: Message-ID: Dear Hanneke, I assume that t(1:3,4) is the center of the figure of 8 coil (the crossing point). Adding or subtracting 0.008 along the correct dimension seems to be necessary to arrive at the center of each of the two loops that make up the planar gradiometer. Joachim On 10 Sep 2009, at 10:37, Hanneke van Dijk wrote: > Dear all, > > At the moment I am using the MNE toolbox and Fieldtrip to localize > an alpha source (1.5 seconds spontaneous data recorded with a > Neuromag 122 system). > > With data from the new 306 channel system it seems to work out well. > However with data from the old system the source ends up in the > cerebellum (attached a picture of Neural Activity index, cfg.lambda > = '10%'). Of course it should be in the parieto-occipital cortex or > the sensorimotor cortex. I have the feeling there is problem with > the position of the gradiometers relative to the headmodel or the > other way around. The head model seems to be too far away from the > sensors (see attached headmodel1), if my hunch is correct I don't > know how to fix this or where exactly I can find the problem. > > How I made the headmodel you can find on: > http://fieldtrip.fcdonders.nl/example/read_neuromag_mri_and_create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > I'm constructing the grad files (to do sourceanalysis with) > seperately using read_header and mne2grad (with > orig.chs(n).coil_type=2, because the coil_type is 2 for the old > system). > > Another related question: in mne2grad on line 104 and 108 it says > > 104 >> grad.pnt(kCoil,:)=100*(t(1:3,4)-0.008*t(1:3,1)); % > multiply with 100 to get cm > ..... > 108 >> grad.pnt(kCoil,:)=100*(t(1:3,4)+0.008*t(1:3,1)); > > Where does this 0.008 come from? I have changed this number to try > it out but did't see any clear differences in the gradiometer > positions. > > Thanks in advance for your help, > Wishing you all the best, > > Hanneke > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fab.meneghini at GMAIL.COM Tue Sep 15 23:41:36 2009 From: fab.meneghini at GMAIL.COM (Fabio Meneghini) Date: Tue, 15 Sep 2009 23:41:36 +0200 Subject: EEG forward modelling using BEM Message-ID: Hi to all, Please help me, it took me a lot of trials and troubles to avoid annoying people with (possibly) trivial issues....but eventually I don't know what else remains to try... I'm new using FieldTrip, and I'm mainly interested in computing the EEG forward model on a standard MNI head model (MNI152, the one you can find in FSL software package), using BEM algorithm on 3, or better 4 surfaces. First of all: has anyone ever done this before? If so, this might save me a lot of hard times... I read the the tutorial about building BEM meshes models, but let's suppose I already have my model segmentation image (182x217x182 voxels, filled with integers numbers). Can I start from that, ignoring the original MRI images? I got my eeg channels coordinates. Are they supposed to be expressed in mm, rather than meters? What is the origin of the coordinates intended to be? And what about the conductivities of the various compartments? where can I set them? Waiting for some light in the dark, thank you for your attention. best, Fabio Meneghini ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From fab.meneghini at GMAIL.COM Wed Sep 16 00:10:00 2009 From: fab.meneghini at GMAIL.COM (Fabio Meneghini) Date: Wed, 16 Sep 2009 00:10:00 +0200 Subject: loading BEMs and segmented images Message-ID: Hi Gustavo, I'm currently facing the same problem. Did you manage to resolve it? We may help each other? cheers, Fabio Meneghini ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From boninc at NINDS.NIH.GOV Wed Sep 16 19:05:41 2009 From: boninc at NINDS.NIH.GOV (Bonin, Claudia (NIH/NINDS) [F]) Date: Wed, 16 Sep 2009 13:05:41 -0400 Subject: freqstastics script In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B0F34B3@Mail2-UKD.VMED.UKD> Message-ID: Hi. I am having trouble getting a freqstastics script to run to do a Kruskalwallis test. Thre freqgrandaverage works but I am having trouble with the arguments for the Kruskalwallis. I have pasted in the script and the error message in this email. Has anyone written a script using freqsstatistics to do Kruskalwallis? I would love to see it or get some direction on the arguments that need to be assigned....Also I made up an argument for cfg.design but I don't really understand what this assignment is. Could anyone elaborate? Thank you! claudia Bonin here's the error message isnan(data.time) ??? Undefined function or method 'isnan' for input arguments of type 'cell'. computing average power over 21 subjects Warning: discarding gradiometer information > In freqgrandaverage at 121 In tf2_virt_all_plot at 11 here's the script..... Nsubj = 21; for subj = 1:Nsubj fname = ['/home/boninc/tfresults/subj' 64 + subj]; clear fr load(fname); frs(subj) = fr; end cfg = []; [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); %cfg = []; %cfg.alpha = .05; %cfg.method = 'stats'; %cfg.design = 1:21; %cfg.statistic = 'kruskalwallis'; %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); clf contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar %contourf(gr.time, gr.freq, gr.powspctrm); colorbar title '21 Subjects, RandL, RIGHT Central Motor' xlabel 'time, sec' ylabel 'frequency, Hz' ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] Sent: Thursday, September 10, 2009 7:21 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script Dear Claudia, Normally when matlab says 'undefined function for input of type ....' it means it cannot find the specific function in the paths you have defined. You can check whether neighbourselection.m is in your fieldtrip folder, if not I have attached it (version 20090428) so you can put it there. If this doesn't fix it please let me know! Groetjes Hanneke -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) [F] Gesendet: Mi 09.09.2009 18:26 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] freqstastics script I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. thanks! claudia >> cfg.statistic = 'kruskalwallis'; >> cfg.method = 'stats'; >> [s] = freqstatistics(cfg, fr, fr); averaging over 3 channels selected 50 time bins selected 41 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip/private/prepare_timefreq_data at 305 In fieldtrip/private/statistics_wrapper at 167 In freqstatistics at 44 ??? Undefined function or method 'neighbourselection' for input arguments of type 'struct'. Error in ==> statistics_wrapper at 181 cfg = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 44 [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From P.Toffanin at RUG.NL Wed Sep 16 22:27:54 2009 From: P.Toffanin at RUG.NL (P. Toffanin) Date: Wed, 16 Sep 2009 22:27:54 +0200 Subject: freqstastics script Message-ID: Dear Claudia, the first error message seems a 'matlab-related error', it does not have anything to do with fieldtrip, but just with the way you use matlab. Basically matlab is complaining because the function you are using is not defined to use cell types. I believe that data.time is probably containing something like data.time = {1,2,3}; then, what you should do, is to use the function like this: isnan(data.time{:}) % this will show the content of data.time "ignoring" that it is a cell rather than isnan(data.time) % this will feed a cell to the isnan function, which uses arrays of numbers About the warning message you get I cannot help you with that one, I'm sorry. The best of luck! Paolo On 16/09/09, "Bonin, Claudia (NIH/NINDS) [F]" wrote: > > Hi. I am having trouble getting a freqstastics script to run to do a Kruskalwallis test. Thre freqgrandaverage works but I am having trouble with the arguments for the Kruskalwallis. I have pasted in the script and the error message in this email.  Has anyone written a script using freqsstatistics to do Kruskalwallis? I would love to see it or get some direction on the arguments that need to be assigned....Also I made up an argument for cfg.design but I don't really understand what this assignment is. Could anyone elaborate? > Thank you! > claudia Bonin > > > > > > here's the error message > >  isnan(data.time) > ??? Undefined function or method 'isnan' for input arguments of type 'cell'. >   > computing average power over 21 subjects > Warning: discarding gradiometer information > > In freqgrandaverage at 121 >   In tf2_virt_all_plot at 11 > > here's the script..... > > > Nsubj = 21; > > for subj = 1:Nsubj >     fname = ['/home/boninc/tfresults/subj' 64 + subj]; >     clear fr >     load(fname); >     frs(subj) = fr; > end > > cfg = []; > [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); > > %cfg = []; > %cfg.alpha = .05; > %cfg.method = 'stats'; > %cfg.design = 1:21; > %cfg.statistic = 'kruskalwallis'; > %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); > > clf > contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar > %contourf(gr.time, gr.freq, gr.powspctrm); colorbar > > title '21 Subjects, RandL, RIGHT Central Motor' > xlabel 'time, sec' > ylabel 'frequency, Hz' > > > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] > Sent: Thursday, September 10, 2009 7:21 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script > > Dear Claudia, > > Normally when matlab says 'undefined function for input of type ....' it means it cannot find the specific function in the paths you have defined. You can check whether neighbourselection.m is in your fieldtrip folder, if not I have attached it (version 20090428) so you can put it there. If this doesn't fix it please let me know! > > Groetjes Hanneke > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) [F] > Gesendet: Mi 09.09.2009 18:26 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] freqstastics script > > I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. > thanks! > claudia > > > >> cfg.statistic = 'kruskalwallis'; > >> cfg.method = 'stats'; > >> [s] = freqstatistics(cfg, fr, fr); > averaging over 3 channels > selected 50 time bins > selected 41 frequency bins > Warning: PACK can only be used from the MATLAB command line. > > In fieldtrip/private/prepare_timefreq_data at 305 >   In fieldtrip/private/statistics_wrapper at 167 >   In freqstatistics at 44 > ??? Undefined function or method 'neighbourselection' for input arguments of type > 'struct'. > > Error in ==> statistics_wrapper at 181 >     cfg = neighbourselection(cfg,varargin{1}); > > Error in ==> freqstatistics at 44 > [stat] = statistics_wrapper(cfg, varargin{:}); > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html (http://listserv.surfnet.nl/archives/fieldtrip.html) and http://www.ru.nl/neuroimaging/fieldtrip. (http://www.ru.nl/neuroimaging/fieldtrip.) > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html (http://listserv.surfnet.nl/archives/fieldtrip.html) and http://www.ru.nl/neuroimaging/fieldtrip. (http://www.ru.nl/neuroimaging/fieldtrip.) > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html (http://listserv.surfnet.nl/archives/fieldtrip.html) and http://www.ru.nl/neuroimaging/fieldtrip. (http://www.ru.nl/neuroimaging/fieldtrip.) > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.piantoni at NIN.KNAW.NL Thu Sep 17 13:28:02 2009 From: g.piantoni at NIN.KNAW.NL (Giovanni Piantoni) Date: Thu, 17 Sep 2009 13:28:02 +0200 Subject: amplitude modulation on planar MEG Message-ID: Dear Fieldtrip users, I do not know how to find the time points in which the amplitude in a frequency band (say, alpha, 8-12 Hz) is higher than a threshold. I am using axial (CTF) MEG data, but I want to find the amplitude modulation on the planar gradient (as it makes more physiological sense). On EEG data, I would 1_ bandpass the data between 8-12 Hz, 2_ take the envelope (f.e. with a hilbert transform), 3_ find all the time points that are above the threshold. On MEG data, I do not know what to do, considering that I cannot really bandpass planar data, as they are always positive. Which option is the best? 1_ bandpass on axial, then megplanar, combineplanar and take envelope on the combined planar, and then find the time points above the threshold. 2_ bandpass on axial, then megplanar, and take the envelope for the two components and use those to determine when the amplitude is above the threshold (but how can I combine the two then?) Or any other option? I am very confused about this issue. Any help is greatly appreciated! Thanks, Giovanni ------ Giovanni Piantoni, Ph.D. student Dept. Sleep & Cognition Netherlands Institute for Neuroscience Meibergdreef 47 1105 BA Amsterdam (NL) +31 (0)20 5665492 g.piantoni at nin.knaw.nl www.nin.knaw.nl/research_teams/van_someren_group ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From boninc at NINDS.NIH.GOV Thu Sep 17 16:59:03 2009 From: boninc at NINDS.NIH.GOV (Bonin, Claudia (NIH/NINDS) [F]) Date: Thu, 17 Sep 2009 10:59:03 -0400 Subject: freqstastics script In-Reply-To: <7390d1b5338b.4ab1666a@rug.nl> Message-ID: Hi everyone. I am trying to use Fieldtrip and the function freqstatistics to run the kruskalwallis test across subjects after doing the grandaverage. The grandaverage works but I am confused about some of the arguments for the freqstatistics function. I have pasted in the lines from my script below. I am particularly wondering if anyone has used this successfully before and if so what is the cfg.design command asking for and am I missing any other command/inputs for the kruskalwallis/freqstatistics function? Any comments would be much appreciated. claudia bonin [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); %cfg = []; %cfg.alpha = .05; %cfg.method = 'stats'; %cfg.design = 1:21; %cfg.statistic = 'kruskalwallis'; %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of P. Toffanin [P.Toffanin at RUG.NL] Sent: Wednesday, September 16, 2009 4:27 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] freqstastics script Dear Claudia, the first error message seems a 'matlab-related error', it does not have anything to do with fieldtrip, but just with the way you use matlab. Basically matlab is complaining because the function you are using is not defined to use cell types. I believe that data.time is probably containing something like data.time = {1,2,3}; then, what you should do, is to use the function like this: isnan(data.time{:}) % this will show the content of data.time "ignoring" that it is a cell rather than isnan(data.time) % this will feed a cell to the isnan function, which uses arrays of numbers About the warning message you get I cannot help you with that one, I'm sorry. The best of luck! Paolo On 16/09/09, "Bonin, Claudia (NIH/NINDS) [F]" wrote: Hi. I am having trouble getting a freqstastics script to run to do a Kruskalwallis test. Thre freqgrandaverage works but I am having trouble with the arguments for the Kruskalwallis. I have pasted in the script and the error message in this email. Has anyone written a script using freqsstatistics to do Kruskalwallis? I would love to see it or get some direction on the arguments that need to be assigned....Also I made up an argument for cfg.design but I don't really understand what this assignment is. Could anyone elaborate? Thank you! claudia Bonin here's the error message isnan(data.time) ??? Undefined function or method 'isnan' for input arguments of type 'cell'. computing average power over 21 subjects Warning: discarding gradiometer information > In freqgrandaverage at 121 In tf2_virt_all_plot at 11 here's the script..... Nsubj = 21; for subj = 1:Nsubj fname = ['/home/boninc/tfresults/subj' 64 + subj]; clear fr load(fname); frs(subj) = fr; end cfg = []; [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); %cfg = []; %cfg.alpha = .05; %cfg.method = 'stats'; %cfg.design = 1:21; %cfg.statistic = 'kruskalwallis'; %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); clf contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar %contourf(gr.time, gr.freq, gr.powspctrm); colorbar title '21 Subjects, RandL, RIGHT Central Motor' xlabel 'time, sec' ylabel 'frequency, Hz' ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] Sent: Thursday, September 10, 2009 7:21 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script Dear Claudia, Normally when matlab says 'undefined function for input of type ....' it means it cannot find the specific function in the paths you have defined. You can check whether neighbourselection.m is in your fieldtrip folder, if not I have attached it (version 20090428) so you can put it there. If this doesn't fix it please let me know! Groetjes Hanneke -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) [F] Gesendet: Mi 09.09.2009 18:26 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] freqstastics script I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. thanks! claudia >> cfg.statistic = 'kruskalwallis'; >> cfg.method = 'stats'; >> [s] = freqstatistics(cfg, fr, fr); averaging over 3 channels selected 50 time bins selected 41 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip/private/prepare_timefreq_data at 305 In fieldtrip/private/statistics_wrapper at 167 In freqstatistics at 44 ??? Undefined function or method 'neighbourselection' for input arguments of type 'struct'. Error in ==> statistics_wrapper at 181 cfg = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 44 [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From boninc at NINDS.NIH.GOV Fri Sep 18 21:15:55 2009 From: boninc at NINDS.NIH.GOV (Bonin, Claudia (NIH/NINDS) [F]) Date: Fri, 18 Sep 2009 15:15:55 -0400 Subject: freqstastics script In-Reply-To: <42BB71E278C5804494BA79D3B24B0A7F161DA99B@NIHMLBX10.nih.gov> Message-ID: DOES ANYONE KNOW HOW TO USE THE FIELDTRIP FUNCTION FREQSTATISTICS TO RUN A KRUSKALWALLIS TEST? -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Bonin, Claudia (NIH/NINDS) [F] Sent: Wednesday, September 16, 2009 1:06 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] freqstastics script Hi. I am having trouble getting a freqstastics script to run to do a Kruskalwallis test. Thre freqgrandaverage works but I am having trouble with the arguments for the Kruskalwallis. I have pasted in the script and the error message in this email. Has anyone written a script using freqsstatistics to do Kruskalwallis? I would love to see it or get some direction on the arguments that need to be assigned....Also I made up an argument for cfg.design but I don't really understand what this assignment is. Could anyone elaborate? Thank you! claudia Bonin here's the error message isnan(data.time) ??? Undefined function or method 'isnan' for input arguments of type 'cell'. computing average power over 21 subjects Warning: discarding gradiometer information > In freqgrandaverage at 121 In tf2_virt_all_plot at 11 here's the script..... Nsubj = 21; for subj = 1:Nsubj fname = ['/home/boninc/tfresults/subj' 64 + subj]; clear fr load(fname); frs(subj) = fr; end cfg = []; [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); %cfg = []; %cfg.alpha = .05; %cfg.method = 'stats'; %cfg.design = 1:21; %cfg.statistic = 'kruskalwallis'; %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); clf contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar %contourf(gr.time, gr.freq, gr.powspctrm); colorbar title '21 Subjects, RandL, RIGHT Central Motor' xlabel 'time, sec' ylabel 'frequency, Hz' ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] Sent: Thursday, September 10, 2009 7:21 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script Dear Claudia, Normally when matlab says 'undefined function for input of type ....' it means it cannot find the specific function in the paths you have defined. You can check whether neighbourselection.m is in your fieldtrip folder, if not I have attached it (version 20090428) so you can put it there. If this doesn't fix it please let me know! Groetjes Hanneke -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) [F] Gesendet: Mi 09.09.2009 18:26 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] freqstastics script I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. thanks! claudia >> cfg.statistic = 'kruskalwallis'; >> cfg.method = 'stats'; >> [s] = freqstatistics(cfg, fr, fr); averaging over 3 channels selected 50 time bins selected 41 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip/private/prepare_timefreq_data at 305 In fieldtrip/private/statistics_wrapper at 167 In freqstatistics at 44 ??? Undefined function or method 'neighbourselection' for input arguments of type 'struct'. Error in ==> statistics_wrapper at 181 cfg = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 44 [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Sat Sep 19 10:56:08 2009 From: j.schoffelen at PSY.GLA.AC.UK (Jan-Mathijs Schoffelen) Date: Sat, 19 Sep 2009 08:56:08 +0000 Subject: freqstastics script In-Reply-To: <42BB71E278C5804494BA79D3B24B0A7F161AD42D@NIHMLBX10.nih.gov> Message-ID: You will have to write a statfun_kruskalwallis. Best, Jan-Mathijs On 18 Sep 2009, at 19:15, Bonin, Claudia (NIH/NINDS) [F] wrote: > DOES ANYONE KNOW HOW TO USE THE FIELDTRIP FUNCTION FREQSTATISTICS TO > RUN A KRUSKALWALLIS TEST? > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Bonin, Claudia (NIH/NINDS) [F] > Sent: Wednesday, September 16, 2009 1:06 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] freqstastics script > > Hi. I am having trouble getting a freqstastics script to run to do a > Kruskalwallis test. Thre freqgrandaverage works but I am having > trouble with the arguments for the Kruskalwallis. I have pasted in > the script and the error message in this email. Has anyone written > a script using freqsstatistics to do Kruskalwallis? I would love to > see it or get some direction on the arguments that need to be > assigned....Also I made up an argument for cfg.design but I don't > really understand what this assignment is. Could anyone elaborate? > Thank you! > claudia Bonin > > > > > > here's the error message > > isnan(data.time) > ??? Undefined function or method 'isnan' for input arguments of type > 'cell'. > > computing average power over 21 subjects > Warning: discarding gradiometer information >> In freqgrandaverage at 121 > In tf2_virt_all_plot at 11 > > here's the script..... > > > Nsubj = 21; > > for subj = 1:Nsubj > fname = ['/home/boninc/tfresults/subj' 64 + subj]; > clear fr > load(fname); > frs(subj) = fr; > end > > cfg = []; > [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), > frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), > frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), > frs(21)); > > %cfg = []; > %cfg.alpha = .05; > %cfg.method = 'stats'; > %cfg.design = 1:21; > %cfg.statistic = 'kruskalwallis'; > %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), > frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), > frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), > frs(20), frs(21)); > > clf > contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar > %contourf(gr.time, gr.freq, gr.powspctrm); colorbar > > title '21 Subjects, RandL, RIGHT Central Motor' > xlabel 'time, sec' > ylabel 'frequency, Hz' > > > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] > Sent: Thursday, September 10, 2009 7:21 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script > > Dear Claudia, > > Normally when matlab says 'undefined function for input of > type ....' it means it cannot find the specific function in the > paths you have defined. You can check whether neighbourselection.m > is in your fieldtrip folder, if not I have attached it (version > 20090428) so you can put it there. If this doesn't fix it please let > me know! > > Groetjes Hanneke > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/ > NINDS) [F] > Gesendet: Mi 09.09.2009 18:26 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] freqstastics script > > I am trying to do statistics on time-frequency data across 16 > subjects, averaging over channels. I received back the following > error about 'neighbourselection' which means nothing to me.....Does > anyone have any idea what might be wrong here? I have pasted in the > exact message below. > thanks! > claudia > > >>> cfg.statistic = 'kruskalwallis'; >>> cfg.method = 'stats'; >>> [s] = freqstatistics(cfg, fr, fr); > averaging over 3 channels > selected 50 time bins > selected 41 frequency bins > Warning: PACK can only be used from the MATLAB command line. >> In fieldtrip/private/prepare_timefreq_data at 305 > In fieldtrip/private/statistics_wrapper at 167 > In freqstatistics at 44 > ??? Undefined function or method 'neighbourselection' for input > arguments of type > 'struct'. > > Error in ==> statistics_wrapper at 181 > cfg = neighbourselection(cfg,varargin{1}); > > Error in ==> freqstatistics at 44 > [stat] = statistics_wrapper(cfg, varargin{:}); > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From boninc at NINDS.NIH.GOV Sat Sep 19 16:33:50 2009 From: boninc at NINDS.NIH.GOV (Bonin, Claudia (NIH/NINDS) [F]) Date: Sat, 19 Sep 2009 10:33:50 -0400 Subject: freqstastics script In-Reply-To: <1C4AF3D4-BC7B-402A-BFB3-140950BB560F@psy.gla.ac.uk> Message-ID: I'm just surprised no one has written one before. MEG data generally requires non-parametric statistics and the kruskalwallis test for freqstatistics was the only option I found for this in fieldtrip. Am I right about this? -----Original Message----- From: Jan-Mathijs Schoffelen [mailto:j.schoffelen at PSY.GLA.AC.UK] Sent: Saturday, September 19, 2009 4:56 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] freqstastics script You will have to write a statfun_kruskalwallis. Best, Jan-Mathijs On 18 Sep 2009, at 19:15, Bonin, Claudia (NIH/NINDS) [F] wrote: > DOES ANYONE KNOW HOW TO USE THE FIELDTRIP FUNCTION FREQSTATISTICS TO > RUN A KRUSKALWALLIS TEST? > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Bonin, Claudia (NIH/NINDS) [F] > Sent: Wednesday, September 16, 2009 1:06 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] freqstastics script > > Hi. I am having trouble getting a freqstastics script to run to do a > Kruskalwallis test. Thre freqgrandaverage works but I am having > trouble with the arguments for the Kruskalwallis. I have pasted in > the script and the error message in this email. Has anyone written > a script using freqsstatistics to do Kruskalwallis? I would love to > see it or get some direction on the arguments that need to be > assigned....Also I made up an argument for cfg.design but I don't > really understand what this assignment is. Could anyone elaborate? > Thank you! > claudia Bonin > > > > > > here's the error message > > isnan(data.time) > ??? Undefined function or method 'isnan' for input arguments of type > 'cell'. > > computing average power over 21 subjects > Warning: discarding gradiometer information >> In freqgrandaverage at 121 > In tf2_virt_all_plot at 11 > > here's the script..... > > > Nsubj = 21; > > for subj = 1:Nsubj > fname = ['/home/boninc/tfresults/subj' 64 + subj]; > clear fr > load(fname); > frs(subj) = fr; > end > > cfg = []; > [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), > frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), > frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), > frs(21)); > > %cfg = []; > %cfg.alpha = .05; > %cfg.method = 'stats'; > %cfg.design = 1:21; > %cfg.statistic = 'kruskalwallis'; > %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), > frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), > frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), > frs(20), frs(21)); > > clf > contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar > %contourf(gr.time, gr.freq, gr.powspctrm); colorbar > > title '21 Subjects, RandL, RIGHT Central Motor' > xlabel 'time, sec' > ylabel 'frequency, Hz' > > > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] > Sent: Thursday, September 10, 2009 7:21 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script > > Dear Claudia, > > Normally when matlab says 'undefined function for input of > type ....' it means it cannot find the specific function in the > paths you have defined. You can check whether neighbourselection.m > is in your fieldtrip folder, if not I have attached it (version > 20090428) so you can put it there. If this doesn't fix it please let > me know! > > Groetjes Hanneke > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/ > NINDS) [F] > Gesendet: Mi 09.09.2009 18:26 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] freqstastics script > > I am trying to do statistics on time-frequency data across 16 > subjects, averaging over channels. I received back the following > error about 'neighbourselection' which means nothing to me.....Does > anyone have any idea what might be wrong here? I have pasted in the > exact message below. > thanks! > claudia > > >>> cfg.statistic = 'kruskalwallis'; >>> cfg.method = 'stats'; >>> [s] = freqstatistics(cfg, fr, fr); > averaging over 3 channels > selected 50 time bins > selected 41 frequency bins > Warning: PACK can only be used from the MATLAB command line. >> In fieldtrip/private/prepare_timefreq_data at 305 > In fieldtrip/private/statistics_wrapper at 167 > In freqstatistics at 44 > ??? Undefined function or method 'neighbourselection' for input > arguments of type > 'struct'. > > Error in ==> statistics_wrapper at 181 > cfg = neighbourselection(cfg,varargin{1}); > > Error in ==> freqstatistics at 44 > [stat] = statistics_wrapper(cfg, varargin{:}); > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From manish.saggar at GMAIL.COM Sat Sep 19 18:01:41 2009 From: manish.saggar at GMAIL.COM (Manish Saggar) Date: Sat, 19 Sep 2009 11:01:41 -0500 Subject: [HELP] Clusterplot not highlighting clusters Message-ID: All, Any help is appreciated. Please let me know if I am doing any mistake. Original email is below. Regards, Manish On Wed, Sep 9, 2009 at 11:56 AM, Manish Saggar wrote: > Dear All, > > I am a novice user of FieldTrip and I love the tools provided by you > guys. Great work. > > I have a question, regarding the analysis I recently did. Any help is > appreciated. I am confused why the cluster is not mapped on the areas > that visually show clear reduction. > > I am comparing two conditions (with-in subjects) using depSamplesT > statistic. Both of the conditions are 1 min of EEG data and I > calculate powerspectrum over those 1 min windows using segment of 1 > second windows with 50% overlap. Condition are named as pre and post. > > I have attached topoplotER of power spectrum for each condition in > alpha band (8-12Hz). Clearly in post there is reduced power in left > (mainly) and right hemispheres at the back of the head as compared to > pre. However in the clusterplot (raweffect) the cluster is mainly > situated in midline frontal and parietal areas. Actually it is quite a > large cluster, covering almost all channels. The thing that worries me > is that it just didn't cover the the channels which clearly shows > difference by visual inspection between two conditions. > Also shouldn't the cluster be located only (or mainly) where the > difference can be seen in pre and post topoplots. > > For convenience I have plotted all plots with same zlim. > > Here is the code that I used for running stats: > ------- >        cfg = []; >        cfg.channel          = {'all'}; >        cfg.latency          = 'all'; >        cfg.frequency        = foi; >        cfg.method           = 'montecarlo'; >        cfg.statistic        = depsamplesT; >        cfg.correctm         = 'cluster'; >        cfg.clusteralpha     = 0.05; >        cfg.clusterstatistic = 'maxsum'; >        cfg.minnbchan        = 2;   %works best. >        cfg.tail             = 0; >        cfg.clustertail      = 0; >        cfg.alpha            = 0.025; >        cfg.numrandomization = 1000; > >        subj = 28; > >        design = zeros(2,2*subj); >        for i = 1:1:subj >           design(1,i) = i; >           design(1,subj+i) = i; >        end >        design(2,1:subj) = 1; >        design(2,subj+1:2*subj) = 2; >        cfg.design = design; >        cfg.uvar = 1; >        cfg.ivar = 2; >        cfg.layout = 'ng.sfp'; >        cfg.neighbourdist = 0.1; % this gives the neighbor count on > average to 3.2 >        cfg.avgoverfreq = 'yes'; >        stat{win} = freqstatistics(cfg, post, pre); > ---------- > > Regards, > Manish > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: pre-post-alpha-diff.tiff Type: image/tiff Size: 203224 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Sat Sep 19 22:26:40 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Sat, 19 Sep 2009 22:26:40 +0200 Subject: freqstastics script In-Reply-To: <42BB71E278C5804494BA79D3B24B0A7F161AD430@NIHMLBX10.nih.gov> Message-ID: Dear Claudia, > I'm just surprised no one has written one before. MEG data generally requires non- > parametric statistics and the kruskalwallis test for freqstatistics was the only option > I found for this in fieldtrip. Am I right about this? The story is a bit more complicated. One must make a distinction between a test statistic and its reference distribution (the distribution under which the p-value is calculated). Many users of Fieldtrip use it to do cluster-based permutation tests. These are non-parametric tests because the p-value is calculated under a non-parametric reference distribution. However, the test statistic for which this p-value is calculated often involves the classical test statistics like F and T, for which parametric reference distributions exist. These parametric reference distributions do not play role in the whether or not the cluster-based permutation tests control the false alarm rate. This argument allows one to do non-parametric testing with test statistics that are inspired by classical parametric statistics. This is all much better explained in Maris & Oostenveld (2007). Thus, the Kruskal-Wallis test statistic is not required if you want to use the non-parametric cluster-based permutation tests in Fieldtrip. I'm sorry if this sounds complicated. One just needs to go a little bit in the theory to get the ideas straight. Best, Eric Maris > > -----Original Message----- > From: Jan-Mathijs Schoffelen [mailto:j.schoffelen at PSY.GLA.AC.UK] > Sent: Saturday, September 19, 2009 4:56 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] freqstastics script > > You will have to write a statfun_kruskalwallis. > > Best, > > Jan-Mathijs > > > > On 18 Sep 2009, at 19:15, Bonin, Claudia (NIH/NINDS) [F] wrote: > > > DOES ANYONE KNOW HOW TO USE THE FIELDTRIP FUNCTION > FREQSTATISTICS TO > > RUN A KRUSKALWALLIS TEST? > > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Bonin, Claudia (NIH/NINDS) [F] > > Sent: Wednesday, September 16, 2009 1:06 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: Re: [FIELDTRIP] freqstastics script > > > > Hi. I am having trouble getting a freqstastics script to run to do a > > Kruskalwallis test. Thre freqgrandaverage works but I am having > > trouble with the arguments for the Kruskalwallis. I have pasted in > > the script and the error message in this email. Has anyone written > > a script using freqsstatistics to do Kruskalwallis? I would love to > > see it or get some direction on the arguments that need to be > > assigned....Also I made up an argument for cfg.design but I don't > > really understand what this assignment is. Could anyone elaborate? > > Thank you! > > claudia Bonin > > > > > > > > > > > > here's the error message > > > > isnan(data.time) > > ??? Undefined function or method 'isnan' for input arguments of type > > 'cell'. > > > > computing average power over 21 subjects > > Warning: discarding gradiometer information > >> In freqgrandaverage at 121 > > In tf2_virt_all_plot at 11 > > > > here's the script..... > > > > > > Nsubj = 21; > > > > for subj = 1:Nsubj > > fname = ['/home/boninc/tfresults/subj' 64 + subj]; > > clear fr > > load(fname); > > frs(subj) = fr; > > end > > > > cfg = []; > > [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), > > frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), > > frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), > > frs(21)); > > > > %cfg = []; > > %cfg.alpha = .05; > > %cfg.method = 'stats'; > > %cfg.design = 1:21; > > %cfg.statistic = 'kruskalwallis'; > > %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), > > frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), > > frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), > > frs(20), frs(21)); > > > > clf > > contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar > > %contourf(gr.time, gr.freq, gr.powspctrm); colorbar > > > > title '21 Subjects, RandL, RIGHT Central Motor' > > xlabel 'time, sec' > > ylabel 'frequency, Hz' > > > > > > ________________________________________ > > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > > Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] > > Sent: Thursday, September 10, 2009 7:21 AM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script > > > > Dear Claudia, > > > > Normally when matlab says 'undefined function for input of > > type ....' it means it cannot find the specific function in the > > paths you have defined. You can check whether neighbourselection.m > > is in your fieldtrip folder, if not I have attached it (version > > 20090428) so you can put it there. If this doesn't fix it please let > > me know! > > > > Groetjes Hanneke > > > > > > -----Ursprüngliche Nachricht----- > > Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/ > > NINDS) [F] > > Gesendet: Mi 09.09.2009 18:26 > > An: FIELDTRIP at NIC.SURFNET.NL > > Betreff: [FIELDTRIP] freqstastics script > > > > I am trying to do statistics on time-frequency data across 16 > > subjects, averaging over channels. I received back the following > > error about 'neighbourselection' which means nothing to me.....Does > > anyone have any idea what might be wrong here? I have pasted in the > > exact message below. > > thanks! > > claudia > > > > > >>> cfg.statistic = 'kruskalwallis'; > >>> cfg.method = 'stats'; > >>> [s] = freqstatistics(cfg, fr, fr); > > averaging over 3 channels > > selected 50 time bins > > selected 41 frequency bins > > Warning: PACK can only be used from the MATLAB command line. > >> In fieldtrip/private/prepare_timefreq_data at 305 > > In fieldtrip/private/statistics_wrapper at 167 > > In freqstatistics at 44 > > ??? Undefined function or method 'neighbourselection' for input > > arguments of type > > 'struct'. > > > > Error in ==> statistics_wrapper at 181 > > cfg = neighbourselection(cfg,varargin{1}); > > > > Error in ==> freqstatistics at 44 > > [stat] = statistics_wrapper(cfg, varargin{:}); > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > > of the FieldTrip toolbox, to share experiences and to discuss new > > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html > > and http://www.ru.nl/neuroimaging/fieldtrip. > > > > > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > > of the FieldTrip toolbox, to share experiences and to discuss new > > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html > > and http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > > of the FieldTrip toolbox, to share experiences and to discuss new > > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html > > and http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > > of the FieldTrip toolbox, to share experiences and to discuss new > > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html > > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From tomh at KURAGE.NIMH.NIH.GOV Sat Sep 19 23:01:48 2009 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Sat, 19 Sep 2009 17:01:48 -0400 Subject: freqstastics script Message-ID: I think what Claudia is asking is, given some time-frequency data, and some groups of subjects, how does one use fieldtrip to do a statistical test? There is code in there, somebody must have done it before. One could export the TF grids to AFNI and use 3dWilcoxon or other tests .. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Sat Sep 19 23:30:09 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Sat, 19 Sep 2009 23:30:09 +0200 Subject: freqstastics script In-Reply-To: <200909192101.n8JL1mUK012092@kurage.nimh.nih.gov> Message-ID: Hi Tom and Claudia, > I think what Claudia is asking is, given some time-frequency data, and some > groups of subjects, how does one use fieldtrip to do a statistical test? > There is code in there, somebody must have done it before. OK, I may have misunderstood. I checked the Fieldtrip code, and the Kruskall-Wallis test can be chosen as an option in statistics_stats. This function is actually a wrapper that calls functions from the Matlab Statistics Toolbox. Do you have this toolbox Claudia? I don't know how thoroughly this function has been tested. Given that it's just a wrapper, it is probably easy to localize the error by using Matlab's debugging tools. Best, Eric > One could export the TF grids to AFNI and use 3dWilcoxon or > other tests .. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From tomh at KURAGE.NIMH.NIH.GOV Sat Sep 19 23:34:10 2009 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Sat, 19 Sep 2009 17:34:10 -0400 Subject: freqstastics script Message-ID: the cfg.design in particular, how would one set that up for a group of time-frequency plots? ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From hanneke.p.van.dijk at GMAIL.COM Wed Sep 23 09:10:12 2009 From: hanneke.p.van.dijk at GMAIL.COM (Hanneke van Dijk) Date: Wed, 23 Sep 2009 09:10:12 +0200 Subject: freqstastics script In-Reply-To: <42BB71E278C5804494BA79D3B24B0A7F161AD42D@NIHMLBX10.nih.gov> Message-ID: Hi Claudia, I think that if you want to do non-parametric tests using fieldtrip the cluster randomization statistics routines would help you a great deal. I think a lot of people using fieldtrip are using this method. You could have a look at this site: http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_freq and the paper: *Eric Maris, Robert Oostenveld, Nonparametric statistical testing of EEG- and MEG-data, Journal of Neuroscience Methods, Volume 164, Issue 1, 15 August 2007, Pages 177-190, ISSN 0165-0270, DOI: 10.1016/j.jneumeth.2007.03.024. (http://www.sciencedirect.com/science/article/B6T04-4NFXDDW-1/2/ebd219fd45cb52bf39c710fe25635040) Keywords: Nonparametric statistical testing; Hypothesis testing; EEG; MEG; Multiple comparisons problem* Also, this mailing list is not a help desk but is read by fellow researchers also using fieldtrip. And I would like to say that although it sometimes takes a little while before you get your answer, that is because everybody is busy and I am impressed and happy with the way everybody on this list is nice enough to take the time to help eachother! Best, Hanneke On Fri, Sep 18, 2009 at 9:15 PM, Bonin, Claudia (NIH/NINDS) [F] < boninc at ninds.nih.gov> wrote: > DOES ANYONE KNOW HOW TO USE THE FIELDTRIP FUNCTION FREQSTATISTICS TO RUN A > KRUSKALWALLIS TEST? > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Bonin, Claudia (NIH/NINDS) [F] > Sent: Wednesday, September 16, 2009 1:06 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] freqstastics script > > Hi. I am having trouble getting a freqstastics script to run to do a > Kruskalwallis test. Thre freqgrandaverage works but I am having trouble with > the arguments for the Kruskalwallis. I have pasted in the script and the > error message in this email. Has anyone written a script using > freqsstatistics to do Kruskalwallis? I would love to see it or get some > direction on the arguments that need to be assigned....Also I made up an > argument for cfg.design but I don't really understand what this assignment > is. Could anyone elaborate? > Thank you! > claudia Bonin > > > > > > here's the error message > > isnan(data.time) > ??? Undefined function or method 'isnan' for input arguments of type > 'cell'. > > computing average power over 21 subjects > Warning: discarding gradiometer information > > In freqgrandaverage at 121 > In tf2_virt_all_plot at 11 > > here's the script..... > > > Nsubj = 21; > > for subj = 1:Nsubj > fname = ['/home/boninc/tfresults/subj' 64 + subj]; > clear fr > load(fname); > frs(subj) = fr; > end > > cfg = []; > [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), > frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), > frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); > > %cfg = []; > %cfg.alpha = .05; > %cfg.method = 'stats'; > %cfg.design = 1:21; > %cfg.statistic = 'kruskalwallis'; > %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), > frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), > frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); > > clf > contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar > %contourf(gr.time, gr.freq, gr.powspctrm); colorbar > > title '21 Subjects, RandL, RIGHT Central Motor' > xlabel 'time, sec' > ylabel 'frequency, Hz' > > > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of > Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] > Sent: Thursday, September 10, 2009 7:21 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script > > Dear Claudia, > > Normally when matlab says 'undefined function for input of type ....' it > means it cannot find the specific function in the paths you have defined. > You can check whether neighbourselection.m is in your fieldtrip folder, if > not I have attached it (version 20090428) so you can put it there. If this > doesn't fix it please let me know! > > Groetjes Hanneke > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) > [F] > Gesendet: Mi 09.09.2009 18:26 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] freqstastics script > > I am trying to do statistics on time-frequency data across 16 subjects, > averaging over channels. I received back the following error about > 'neighbourselection' which means nothing to me.....Does anyone have any idea > what might be wrong here? I have pasted in the exact message below. > thanks! > claudia > > > >> cfg.statistic = 'kruskalwallis'; > >> cfg.method = 'stats'; > >> [s] = freqstatistics(cfg, fr, fr); > averaging over 3 channels > selected 50 time bins > selected 41 frequency bins > Warning: PACK can only be used from the MATLAB command line. > > In fieldtrip/private/prepare_timefreq_data at 305 > In fieldtrip/private/statistics_wrapper at 167 > In freqstatistics at 44 > ??? Undefined function or method 'neighbourselection' for input arguments > of type > 'struct'. > > Error in ==> statistics_wrapper at 181 > cfg = neighbourselection(cfg,varargin{1}); > > Error in ==> freqstatistics at 44 > [stat] = statistics_wrapper(cfg, varargin{:}); > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hanneke.p.van.dijk at GMAIL.COM Wed Sep 23 09:31:18 2009 From: hanneke.p.van.dijk at GMAIL.COM (Hanneke van Dijk) Date: Wed, 23 Sep 2009 09:31:18 +0200 Subject: freqstastics script In-Reply-To: <200909192134.n8JLYAE8012315@kurage.nimh.nih.gov> Message-ID: Hi Tom, I hope I understood your question right, let's say you have 2 conditions, 1 group of 3 subjects; nSubj=3; cfg.design(1:Nsubj) = 1; cfg.design(nSubj+1:(2*nSubj)) = 2; cfg.design: 1 1 1 2 2 2 I don't think there is anything special about time-frequency plots compared to timelock - or sourcestatistics. Although you can make things as complicated as you want of course! Yours, Hanneke On Sat, Sep 19, 2009 at 11:34 PM, Tom Holroyd wrote: > the cfg.design in particular, how would one set that up for a group > of time-frequency plots? > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ndavid at UKE.DE Wed Sep 23 11:26:08 2009 From: ndavid at UKE.DE (Nicole David) Date: Wed, 23 Sep 2009 11:26:08 +0200 Subject: open PhD position Message-ID: Hi, I hope you don't mind me announcing a job opening for a PhD position at our Department in Hamburg (see below). Best, Nicole --------- PhD Position at the Dept. of Neurophysiology and Pathophysiology, Hamburg The Dept. of Neurophysiology and Pathophysiology (Head: Prof. Dr. Andreas K. Engel) at the University Medical Center Hamburg-Eppendorf (Germany) invites applications for a PhD student position. The position is available with immediate start. The appointment will be for 3 years. Areas of interest comprise the investigation of dynamic, large-scale neural interactions and the characterization of functional networks during perceptual and attentional processes in autism spectrum disorders, using techniques such as eye tracking and EEG/ MEG (possibly also fMRI). Recruitment of individuals with autism will be performed in collaboration with the Department of Psychiatrie in Cologne (http://www.medizin.uni- koeln.de/kliniken/psychiatrie/Autismus-Sprechstunde/). Main research interests in the Department are dynamics of distributed sensory processing, intermodal and sensorimotor integration, as well as theories of perception, action and consciousness. Current projects involve EEG/MEG studies in humans or physiological studies in animals. Further information on research at the Department of Neurophysiology can be obtained at http://www.uke.uni-hamburg.de or http://www.40hz.net. Applicants should have a background in psychology, medicine, biology or neuro-/ cognitive sciences, and ideally show experience in human EEG/ MEG studies, neuroimaging or biosignal analysis. Programming experience (Matlab, Presentation) is considered mandatory. You will be responsible for the management and implementation of research paradigms, recruitment and neuropsychological testing of volunteers, data acquisition and analysis. Interest in clinical neuroscience and neuropsychology is desirable as well as knowledge of the German language. For further details, please contact Nicole David (phone +49-40-7410-53188, email: ndavid at uke.de) or Prof. Dr. Andreas K. Engel (phone +49-40-7410-56170, email: ak.engel at uke.de). Applicants are asked to submit their CV and documentation of relevant qualification to Prof. Dr. Andreas K. Engel, Dept. of Neurophysiology and Pathophysiology, University Medical Center Hamburg-Eppendorf, Martinistr. 52, 20246 Hamburg, Germany. Applications can also be sent via email to N. David or A. K. Engel. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Sep 23 17:47:18 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 23 Sep 2009 17:47:18 +0200 Subject: EEG forward modelling using BEM In-Reply-To: <972d6afe0909151441w6d75afbfyb3e92eb3825183b7@mail.gmail.com> Message-ID: Hi Fabio On the ftp server you can find a file standard_BEM.zip which contains a precomputed BEM model that you can use. The geometry is based on the collin27 brain, and I believe it also includes the collin27 MRI. I.e., it is aligned with MNI152, but uses a crisp MRI and not the fuzzy MNI152, because from the latter one you cannot get a reasonable estimate of the skull geometry. The mesh vertex coordinates are expressed in MNI coordinates (in mm). You should carefully align your electrodes with the skin surface, i.e. plotting the mesh and electrodes in one figure should give a meaningfull figure. Have a look at the electroderealign function and at http://fieldtrip.fcdonders.nl/example . Also look at the fieldtrip/plotting/plot_mesh and plot_sens functions, which will be usefull for the realignment of your electrodes with the model skin. Hope this helps to get you started. Robert On 15 Sep 2009, at 23:41, Fabio Meneghini wrote: > Hi to all, > Please help me, it took me a lot of trials and troubles to avoid > annoying people with (possibly) trivial issues....but eventually I > don't know what else remains to try... > I'm new using FieldTrip, and I'm mainly interested in computing the > EEG forward model on a standard MNI head model (MNI152, the one you > can find in FSL software package), using BEM algorithm on 3, or better > 4 surfaces. > First of all: has anyone ever done this before? If so, this might save > me a lot of hard times... > > I read the the tutorial about building BEM meshes models, but let's > suppose I already have my model segmentation image (182x217x182 > voxels, filled with integers numbers). Can I start from that, ignoring > the original MRI images? > > I got my eeg channels coordinates. Are they supposed to be expressed > in mm, rather than meters? What is the origin of the coordinates > intended to be? And what about the conductivities of the various > compartments? where can I set them? > > Waiting for some light in the dark, thank you for your attention. > > best, > > Fabio Meneghini > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From smaraujo at UALG.PT Thu Sep 24 12:56:59 2009 From: smaraujo at UALG.PT (=?iso-8859-1?Q?Susana_Ara=FAjo?=) Date: Thu, 24 Sep 2009 11:56:59 +0100 Subject: data file format problem Message-ID: Hello everyone, I ran an EEG experiment and, exceptionally, I recorded two files to one of the subjects. I’m trying to join these two data files (bdfra format) into a single data file using BESA. When I joined these two “bdf” files using BESA, I got one file “.foc”. The problem is that when I try to run the “read_event” fieldrip function I get an error message because the file format (.foc) is not supported and even recognized. Does anyone already had this problem and know how can I solve it? Thanks a lot! Susana Araújo ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at GMAIL.COM Thu Sep 24 13:16:06 2009 From: julian.keil at GMAIL.COM (Julian Keil) Date: Thu, 24 Sep 2009 13:16:06 +0200 Subject: data file format problem In-Reply-To: <20090924105656.4C2851674C@smtp3.ualg.pt> Message-ID: Hi, i would suggest exporting to ASCII (.mul or .avr) in BESA and then reading these files into fieldtrip. Good luck Julian Am 24.09.2009 um 12:56 schrieb Susana Araújo: > Hello everyone, > > > > I ran an EEG experiment and, exceptionally, I recorded two files to > one of the subjects. I’m trying to join these two data files (bdfra > format) into a single data file using BESA. When I joined these two > “bdf” files using BESA, I got one file “.foc”. The problem is that > when I try to run the “read_event” fieldrip function I get an error > message because the file format (.foc) is not supported and even > recognized. Does anyone already had this problem and know how can I > solve it? > > > > Thanks a lot! > > > > Susana Araújo > > > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: julian.keil at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bernhard.spitzer at BCCN-BERLIN.DE Thu Sep 24 13:42:12 2009 From: bernhard.spitzer at BCCN-BERLIN.DE (Bernhard Spitzer) Date: Thu, 24 Sep 2009 13:42:12 +0200 Subject: data file format problem In-Reply-To: <20090924105656.4C2851674C@smtp3.ualg.pt> Message-ID: Dear Susana, for .bdf files, there is a tool called "merger" you can use to join the files into a single .bdf file before you load them into BESA. (http://www.biosemi.com/download/Merger.zip) Alternatively, if you prefer to export your .foc file to ASCII/multiplexed, you' may have to export the events (markers, triggers, etc.) separately to an .evt file which can then be read into FieldTrip hope this helps, best wishes Bernhard Susana Araújo wrote: > > Hello everyone, > > I ran an EEG experiment and, exceptionally, I recorded two files to > one of the subjects. I’m trying to join these two data files (bdfra > format) into a single data file using BESA. When I joined these two > “bdf” files using BESA, I got one file “.foc”. The problem is that > when I try to run the “read_event” fieldrip function I get an error > message because the file format (.foc) is not supported and even > recognized. Does anyone already had this problem and know how can I > solve it? > > Thanks a lot! > > Susana Araújo > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From irina.simanova at MPI.NL Thu Sep 24 13:47:21 2009 From: irina.simanova at MPI.NL (Irina Simanova) Date: Thu, 24 Sep 2009 13:47:21 +0200 Subject: data file format problem In-Reply-To: <20090924105656.4C2851674C@smtp3.ualg.pt> Message-ID: Hi Susanna, You could also read two files with Fieldtrip separately and then use "appenddata" command. It combines multiple datasets that has been preprocessed separately into one large dataset. Best, Irina On Sep 24, 2009, at 12:56 PM, Susana Araújo wrote: > Hello everyone, > > I ran an EEG experiment and, exceptionally, I recorded two files to > one of the subjects. I’m trying to join these two data files (bdfra > format) into a single data file using BESA. When I joined these two > “bdf” files using BESA, I got one file “.foc”. The problem is that > when I try to run the “read_event” fieldrip function I get an error > message because the file format (.foc) is not supported and even > recognized. Does anyone already had this problem and know how can I > solve it? > > Thanks a lot! > > Susana Araújo > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From P.PRAAMSTRA at BHAM.AC.UK Thu Sep 24 14:09:15 2009 From: P.PRAAMSTRA at BHAM.AC.UK (Peter Praamstra) Date: Thu, 24 Sep 2009 13:09:15 +0100 Subject: data file format problem In-Reply-To: <20090924105656.4C2851674C@smtp3.ualg.pt> Message-ID: Susana, You can merge bdf files with a utility provided by BioSemi. Go to: http://www.biosemi.com/download.htm Peter Praamstra On 24 Sep 2009 at 11:56, Susana Araújo wrote: > > Hello everyone, > > I ran an EEG experiment and, exceptionally, I recorded two files to > one of the subjects. I´m trying > to join these two data files (bdfra format) into a single data file > using BESA. When I joined these > two "bdf"files using BESA, I got one file ".foc". The > problem is that when I try to run the > "read_event" fieldrip function I get an error message because > the file format (.foc) is not > supported and even recognized. Does anyone already had this problem > and know how can I > solve it? > > Thanks a lot! > > Susana Araújo > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share > experiences and to discuss new ideas for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ ###################################### Peter Praamstra, MD, PhD Reader in Cognitive Neurophysiology Honorary Consultant Neurology Behavioural Brain Sciences Centre School of Psychology, University of Birmingham Birmingham, B15 2TT tel. 0121 414 7211 fax 0121 414 4897 Disclaimer: This e-mail and any attachments hereto contains proprietary information, some or all of which may be confidential or legally privileged. It is for the exclusive use of the intended recipient(s) only. If an addressing or transmission error has misdirected this e-mail and you are not the intended recipient(s), please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail or any attachments, as this may be unlawful. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From smaraujo at UALG.PT Thu Sep 24 14:47:13 2009 From: smaraujo at UALG.PT (=?iso-8859-1?Q?Susana_Ara=FAjo?=) Date: Thu, 24 Sep 2009 13:47:13 +0100 Subject: data file format problem In-Reply-To: <4ABB5B14.2010104@bccn-berlin.de> Message-ID: Thanks a lot!! I already solved my problem! Best whishes -----Mensagem original----- De: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] Em nome de Bernhard Spitzer Enviada: quinta-feira, 24 de Setembro de 2009 12:42 Para: FIELDTRIP at NIC.SURFNET.NL Assunto: Re: [FIELDTRIP] data file format problem Dear Susana, for .bdf files, there is a tool called "merger" you can use to join the files into a single .bdf file before you load them into BESA. (http://www.biosemi.com/download/Merger.zip) Alternatively, if you prefer to export your .foc file to ASCII/multiplexed, you' may have to export the events (markers, triggers, etc.) separately to an .evt file which can then be read into FieldTrip hope this helps, best wishes Bernhard Susana Araújo wrote: > > Hello everyone, > > I ran an EEG experiment and, exceptionally, I recorded two files to > one of the subjects. I’m trying to join these two data files (bdfra > format) into a single data file using BESA. When I joined these two > “bdf” files using BESA, I got one file “.foc”. The problem is that > when I try to run the “read_event” fieldrip function I get an error > message because the file format (.foc) is not supported and even > recognized. Does anyone already had this problem and know how can I > solve it? > > Thanks a lot! > > Susana Araújo > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From bernhard.spitzer at BCCN-BERLIN.DE Thu Sep 24 15:27:43 2009 From: bernhard.spitzer at BCCN-BERLIN.DE (Bernhard Spitzer) Date: Thu, 24 Sep 2009 15:27:43 +0200 Subject: time-frequency - zero padding? Message-ID: Dear Fieldtrip experts, I have a question regarding the cfg.pad settings in frequanalysis. For TF analysis of my epochs (6s), with a fixed window length (e.g., 0.4s), i'm using sth like cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 2.5:2.5:30; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.4; cfg.toi = -0.5:0.05:4; now I would like to increase the frequency resolution to, say 1Hz, in order to get a smoother TF map, but keep the data window length at 400msec. I understand that one can get a higher (interpolated) frequency resolution by zero padding the data window for fft, but it is unclear to me how or whether this can be done with frequanalysis/cfg.pad using a sliding window. with a sliding window, does cfg.pad add zeros to the windowed signal (cfg.t_ftimwin), or to the interval specified in cfg.toi, or to the data epoch ? Can I use cfg.pad to interpolate a higher frequency resolution for my analysis, or is there another way to do that? many thanks in advance! Bernhard -- ----------------------------------------------- Dr. Bernhard Spitzer Bernstein Center for Computational Neuroscience Charité Universitätsmedizin Berlin Philippstr. 13 House 6 10115 Berlin Germany Phone: +49 (0)30 2093-6789 Fax: +49 (0)30 2093-6771 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK Mon Sep 28 21:29:08 2009 From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith) Date: Mon, 28 Sep 2009 20:29:08 +0100 Subject: Reference electrode in lead field Message-ID: Hi all I am experimenting with source reconstruction and was wondering how a reference electrode is defined in the lead field. Looking through the scripts it looks like the average reference is used, but this is a physical impossibility, as there must be a physical reference to which differences in electrical potential can be measured. The lead field will be differ depending on the location of the reference electrode. Firstly, is there a way to specify a reference electrode when constructing an EEG lead field in fieldtri p and not jsut use the average reference. Secondly, looking through the code for 'inf_medium_leadfield' (called from prepare_leadfield -> compute_leadfield -> eeg_leadfieldb), the equations used for calculating the lead field look a little strange: radius = position (vox) - position(elec) R (resistivity?) = 4 x pi x conductivity x sum(radius^2)^(1.5) lead field(vox,elec)=radius / R. Where the the exponential to 1.5 come from? Is there a reference to somewhere where this method is used. I'm confused as to sure how this calculation works. Many thanks Mark -- Mark Drakesmith PhD Student Neuroscience and Aphasia Research Unit (NARU) University of Manchester ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From maess at CBS.MPG.DE Tue Sep 29 09:09:16 2009 From: maess at CBS.MPG.DE (Dr. Burkhard Maess) Date: Tue, 29 Sep 2009 09:09:16 +0200 Subject: Reference electrode in lead field In-Reply-To: <21132649.294471254208139700.JavaMail.root@zimbra> Message-ID: Dear Mark, concerning the average reference. ... You are right the voltage is defined as difference of potentials. Therefore one always needs a reference point, but there is no need for a physical existence of a reference point as long as a mathematical definition exists. Classical unipolar electrodes provide voltage signals like e.g. : (1) U_i_ref = V_i - V_ref The average reference is computed as the mean signal over all N electrodes: (2) U_avref = \frac{1}{N} \sum{i=1}^{N}U_i_ref You can rewrite this using expression (1) (3) U_avref = \frac{1}{N}\sum{i=1}^{N}V_i - V_ref = mean(V_i) - V_ref One can see that the reference point for the average reference is the same as for all single electrodes. Now, we rerefence all electrodes to the average reference: (4) U_i_avref = U_i_ref - U_avref = V_i - V_ref - mean(V_i) - V_ref The simplified expression does not contain the original V_ref! (5) U_i_avref = V_i - mean(V_i) Introducing the average reference is loss free as long as you store the mean average signal. Otherwise some data is lost because the V_ref signals vanishes from the expressions. Why to transform to average reference? As you said the lead field is dependent on the location of the reference electrode. Introducing the average reference means to become less dependent on the location of a single (reference) electrode. All the best, Burkhard Dr. Burkhard Maess Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a, P.O. Box 500355, D-04303 Leipzig Aussenstelle Bennewitz, phone/fax: +49(3425)8875-2526/-2511 mail: maess 'at' cbs.mpg.de, http://www.cbs.mpg.de ----- Original Message ----- From: "Mark Drakesmith" To: FIELDTRIP at NIC.SURFNET.NL Sent: Monday, September 28, 2009 9:29:08 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [FIELDTRIP] Reference electrode in lead field Hi all I am experimenting with source reconstruction and was wondering how a reference electrode is defined in the lead field. Looking through the scripts it looks like the average reference is used, but this is a physical impossibility, as there must be a physical reference to which differences in electrical potential can be measured. The lead field will be differ depending on the location of the reference electrode. Firstly, is there a way to specify a reference electrode when constructing an EEG lead field in fieldtri p and not jsut use the average reference. Secondly, looking through the code for 'inf_medium_leadfield' (called from prepare_leadfield -> compute_leadfield -> eeg_leadfieldb), the equations used for calculating the lead field look a little strange: radius = position (vox) - position(elec) R (resistivity?) = 4 x pi x conductivity x sum(radius^2)^(1.5) lead field(vox,elec)=radius / R. Where the the exponential to 1.5 come from? Is there a reference to somewhere where this method is used. I'm confused as to sure how this calculation works. Many thanks Mark -- Mark Drakesmith PhD Student Neuroscience and Aphasia Research Unit (NARU) University of Manchester ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jdien07 at MAC.COM Wed Sep 30 04:10:50 2009 From: jdien07 at MAC.COM (Joseph Dien) Date: Tue, 29 Sep 2009 22:10:50 -0400 Subject: Reference electrode in lead field In-Reply-To: <4AC10E84.50708@postgrad.manchester.ac.uk> Message-ID: The reasoning behind the average reference is that it is a physics principle that the sum of the voltages over an enclosed surface must equal zero. To the extent that the electrode locations provide a representative even sampling of the head surface (an important caveat) the sum of the voltages therefore provides an estimate of the true zero voltage. The reason for using the average reference rather than a single reference site is that using a reference site arbitrarily defines that point as being zero voltage (which is to say, inactive), which is not biophysically reasonable as there are no inactive sites on the head (due to volume conduction). Also, to clarify, an average reference does not result in a reference-free solution since, as you say, a voltage measurement is by definition a relative measure (although ideally it should be relatively independent of the electrode montage, given enough electrodes). It's just that the comparison "site", which is the zero equipotential line (as estimated by the average reference computation), is a more biophysically reasonable one (given enough recording sites) than arbitrarily picking a single fixed electrode site as the reference. For an extended discussion of these issues, see: Dien, J. (1998). Issues in the application of the average reference: Review, critiques, and recommendations. Behavior Research Methods, Instruments, and Computers, 30(1), 34-43. Cheers! Joe On Sep 28, 2009, at 3:29 PM, Mark Drakesmith wrote: > Hi all > > I am experimenting with source reconstruction and was wondering how > a reference electrode is defined in the lead field. Looking through > the scripts it looks like the average reference is used, but this is > a physical impossibility, as there must be a physical reference to > which differences in electrical potential can be measured. The lead > field will be differ depending on the location of the reference > electrode. > > Firstly, is there a way to specify a reference electrode when > constructing an EEG lead field in fieldtri p and not jsut use the > average reference. > > Secondly, looking through the code for > 'inf_medium_leadfield' (called from prepare_leadfield -> > compute_leadfield -> eeg_leadfieldb), the equations used for > calculating the lead field look a little strange: > > radius = position (vox) - position(elec) > R (resistivity?) = 4 x pi x conductivity x sum(radius^2)^(1.5) > lead field(vox,elec)=radius / R. > > Where the the exponential to 1.5 come from? Is there a reference to > somewhere where this method is used. I'm confused as to sure how > this calculation works. > > Many thanks > > Mark > > -- > > Mark Drakesmith > PhD Student > > Neuroscience and Aphasia Research Unit (NARU) > University of Manchester > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist Center for Advanced Study of Language University of Maryland 7005 52nd Avenue College Park, MD 20742-0025 E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://homepage.mac.com/jdien07/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From dimitri.papadopoulos at CEA.FR Tue Sep 1 01:36:49 2009 From: dimitri.papadopoulos at CEA.FR (Dimitri Papadopoulos-Orfanos) Date: Tue, 1 Sep 2009 01:36:49 +0200 Subject: fileio/README Message-ID: Hi, From fieldtrip-20090831/fileio/README: The following files were downloaded from http://www.koders.com/ base64.c base64.h I cannot find these files anywhere. Have they been removed? Has the source code been integrated elsewhere? Regards, -- Dimitri Papadopoulos CEA, I2BM, NeuroSpin 91191 Gif-sur-Yvette cedex, France ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4743 bytes Desc: S/MIME Cryptographic Signature URL: From dimitri.papadopoulos at CEA.FR Tue Sep 1 01:55:48 2009 From: dimitri.papadopoulos at CEA.FR (Dimitri Papadopoulos-Orfanos) Date: Tue, 1 Sep 2009 01:55:48 +0200 Subject: 64-bit Linux Message-ID: Hi, I'm planning the deployment of Fieldtrip on 64-bit Linux machines. I have compared the availability of 32-bit and 64-bit Linux MEX files. Some MEX files are 32-bit only, for example: external/biosig/mexSLOAD.mexglx external/eeprobe/read_eep_avr.mexglx external/eeprobe/read_eep_cnt.mexglx private/ltrisect.mexglx private/ptriproj.mexglx classification/toolboxes/gerven/bayesbrain/utilities/myrepmat.mexglx classification/toolboxes/gerven/gmrflab/fastinv.mexglx classification/toolboxes/gerven/gmrflab/fastinvex.mexglx [...] classification/toolboxes/external/gpml-matlab/gpml/sq_dist.mexglx classification/toolboxes/external/libsvm-mat-2.87-1/read_sparse.mexglx [...] Then some MEX files are 64-bit only, some probably on purpose: @uint64/abs.mexa64 fileio/@uint64/abs.mexa64 and some probably not: external/bci2000/load_bcidat.mexa64 fileio/private/mxDeserialize.mexa64 Might the 64-bit (or 32-bit) version miss functionality? Should we compile 64-bit (or 32-bit) MEX files when source files are available? Regards, -- Dimitri Papadopoulos CEA, I2BM, NeuroSpin 91191 Gif-sur-Yvette cedex, France ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4743 bytes Desc: S/MIME Cryptographic Signature URL: From dimitri.papadopoulos at CEA.FR Tue Sep 1 03:00:36 2009 From: dimitri.papadopoulos at CEA.FR (Dimitri Papadopoulos-Orfanos) Date: Tue, 1 Sep 2009 03:00:36 +0200 Subject: compile the mex file on the fly Message-ID: Hi, I see a few FieldTrip files attempt to compile MEX files on the fly. For example @uint64/abs.m: % determine the name and full path of this function funname = mfilename('fullpath'); mexsrc = [funname '.c']; [mexdir, mexname] = fileparts(funname); try % try to compile the mex file on the fly warning('trying to compile MEX file from %s', mexsrc); cd(mexdir); mex(mexsrc); I fear this may fail when FieldTrip is installed on an application server and run by users who cannot write into the FieldTrip directory. I understand this is a reasonable fallback for exotic platforms which lack the proper MEX file. It is also a good way to always have the MEX file rebuilt after a change in the associated C file. Unfortunately it also breaks FieldTrip installations on application servers - quite common on 32-bit or 64-bit Linux using NFS. Making MEX files available for such common platforms would fix this issue, wouldn't it? Also see my previous "64-bit Linux" message. I hope I'm not completely misunderstanding the issue at hand. Here is a list of Matlab files which call mex() and their associated C and MEX files: @uint64/max.m @uint64/max.c @uint64/max.mexa64 @uint64/max.mexglx @uint64/max.mexmac @uint64/max.mexmaci @uint64/max.mexw32 @uint64/min.m @uint64/min.c @uint64/min.mexa64 @uint64/min.mexglx @uint64/min.mexmac @uint64/min.mexmaci @uint64/min.mexw32 @uint64/minus.m @uint64/minus.c @uint64/minus.mexa64 @uint64/minus.mexglx @uint64/minus.mexmac @uint64/minus.mexmaci @uint64/minus.mexw32 @uint64/plus.m @uint64/plus.c @uint64/plus.mexa64 @uint64/plus.mexglx @uint64/plus.mexmac @uint64/plus.mexmaci @uint64/plus.mexw32 @uint64/rdivide.m @uint64/rdivide.c @uint64/rdivide.mexa64 @uint64/rdivide.mexglx @uint64/rdivide.mexmac @uint64/rdivide.mexmaci @uint64/rdivide.mexw32 @uint64/times.m @uint64/times.c @uint64/times.mexa64 @uint64/times.mexglx @uint64/times.mexmac @uint64/times.mexmaci @uint64/times.mexw32 @uint64/abs.m @uint64/abs.c @uint64/abs.mexa64 @uint64/abs.mexmaci fileio/private/mxDeserialize.m fileio/private/mxDeserialize.c fileio/private/mxDeserialize.mexa64 fileio/private/mxDeserialize.mexmac fileio/private/mxDeserialize.mexw32 fileio/private/mxSerialize.m fileio/private/mxSerialize.c fileio/private/mxSerialize.mexa64 fileio/private/mxSerialize.mexglx fileio/private/mxSerialize.mexmac fileio/private/mxSerialize.mexw32 fileio/private/read_24bit.m fileio/private/read_24bit.c fileio/private/read_24bit.mexa64 fileio/private/read_24bit.mexglx fileio/private/read_24bit.mexmac fileio/private/read_24bit.mexmaci fileio/private/read_24bit.mexw32 fileio/private/read_ctf_shm.m fileio/private/read_ctf_shm.c fileio/private/read_ctf_shm.mexa64 fileio/private/read_ctf_shm.mexglx fileio/private/read_ctf_shm.mexmaci fileio/private/write_ctf_shm.m fileio/private/write_ctf_shm.c fileio/private/write_ctf_shm.mexa64 fileio/private/write_ctf_shm.mexglx fileio/private/write_ctf_shm.mexmaci forwinv/private/meg_leadfield1.m forwinv/private/meg_leadfield1.c forwinv/private/meg_leadfield1.mexa64 forwinv/private/meg_leadfield1.mexglx forwinv/private/meg_leadfield1.mexmac forwinv/private/meg_leadfield1.mexmaci forwinv/private/meg_leadfield1.mexw32 forwinv/private/plgndr.m forwinv/private/plgndr.c forwinv/private/plgndr.mexa64 forwinv/private/plgndr.mexglx forwinv/private/plgndr.mexmac forwinv/private/plgndr.mexmaci forwinv/private/plgndr.mexw32 private/write_ctf_shm.m private/read_ctf_shm.m private/meg_leadfield1.m private/meg_leadfield1.c private/meg_leadfield1.mexa64 private/meg_leadfield1.mexglx private/meg_leadfield1.mexmac private/meg_leadfield1.mexmaci private/meg_leadfield1.mexw32 private/splint_gh.m private/splint_gh.c private/splint_gh.mexa64 private/splint_gh.mexglx private/splint_gh.mexmac private/splint_gh.mexmaci private/splint_gh.mexw32 private/read_24bit.m private/read_24bit.c private/read_24bit.mexa64 private/read_24bit.mexglx private/read_24bit.mexmac private/read_24bit.mexmaci private/read_24bit.mexw32 private/plgndr.m private/plgndr.c private/plgndr.mexa64 private/plgndr.mexglx private/plgndr.mexmac private/plgndr.mexmaci private/plgndr.mexw32 classification/utilities/repop/repop.m classification/utilities/repop/repop.c classification/utilities/repop/repop.mexglx classification/utilities/tprod/tprod.m classification/utilities/tprod/tprod.c classification/utilities/tprod/tprod.mexglx @config/private/deepcopy.m @config/private/deepcopy.c @config/private/deepcopy.mexa64 @config/private/deepcopy.mexglx @config/private/deepcopy.mexmac @config/private/deepcopy.mexmaci @config/private/increment.m @config/private/increment.c @config/private/increment.mexa64 @config/private/increment.mexglx @config/private/increment.mexmac @config/private/increment.mexmaci @config/private/reset.m @config/private/reset.c @config/private/reset.mexa64 @config/private/reset.mexglx @config/private/reset.mexmac @config/private/reset.mexmaci A few remarks: 1. Files private/write_ctf_shm.m and private/read_ctf_shm.m are duplicates of fileio/private/read_ctf_shm.m and fileio/private/read_ctf_shm.m and they are missing associated C files. They are therefore broken. Shouldn't they be deleted? 2. I've left out all files in fileio/@uint64/ since they directory is identical to: @uint64/ 3. When a *.c file is changed, does your distribution process rebuild relevant MEX files before distribution? I guess not... In which case all users using FieldTrip from an application server may be using outdated MEX files. Regards, -- Dimitri Papadopoulos CEA, I2BM, NeuroSpin 91191 Gif-sur-Yvette cedex, France ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4743 bytes Desc: S/MIME Cryptographic Signature URL: From j.schoffelen at PSY.GLA.AC.UK Tue Sep 1 11:09:53 2009 From: j.schoffelen at PSY.GLA.AC.UK (Jan-Mathijs Schoffelen) Date: Tue, 1 Sep 2009 09:09:53 +0000 Subject: freqdescriptives/statistics Message-ID: Dear Dahlia, Hemant Bokil indeed uses the jackknife to obtain variance estimates of power (and coherence), see also for example his 2007 paper in J.Neurosci.Methods. More specifically, if your data is 'well-behaved', he has shown that by applying a specific correction to the power estimate, in combination of the jackknife, generates a test-statistic from a differential (i.e. contrast) power spectrum which has a standard normal distribution (i.e. the jackknife estimate of the variance is expected to be 1 and the estimate of the mean 0). Unfortunately, MEG data is hardly ever well-behaved, so we prefer to use non-parametric techniques to do statistical inference. Freqdescriptives in this respect still historically has the option of computing a jackknife estimate of the SEM of the powerspectrum/ coherencespectrum, which can be used to compute a T-statistic across two conditions for example. However, I you would choose this path, you have to write some code which does this, because it is not in fieldtrip. The biascorrect option has been taken out altogether as far as I can see, (and had been designed only to correct the bias in the coherence spectra, and not in the power spectra if I remember correctly), and any reference in the documentation should be removed. Unfortunately, we did not yet have time to considerably clean up freqdescriptives, but this is quite high on the developer's to do list. The bottom line is: ignore biascorrect, and if you use the jackknife estimate of the SEM, you have to come up with some code of your own. Alternatively, you could look into freqstatistics and use cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do statistical inference. Best, Jan-Mathijs On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > Hi all, > > Is there a more detailed explanation of usage for the jackknife and > biascorrect options for freqdescriptives than the one in the > freqdescriptives reference page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? > > More specifically, are these options related to Bokil et al NeuroIm > 2007? How should they be employed to determine significance of > difference between conditions? (Is there somewhere a tutorial for > the use of these options analogous to the one about cluster-based > permutation testing?) > > Also, for the permutation analysis of TFRs (http://fieldtrip.fcdonders.nl/tutorial/statistics?s > []=freqstatistics), if I don't want to employ the planar gradient > step (what exactly IS combineplanar? sorry I couldn't find it), can > I simply skip it and calculate the TFRs of the raw sensor data? > > Many thanks! > Dahlia. > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gsudre at POBOX.COM Tue Sep 1 21:16:13 2009 From: gsudre at POBOX.COM (Gustavo Sudre) Date: Tue, 1 Sep 2009 15:16:13 -0400 Subject: Neuromag coordinate frames Message-ID: Hello, I have a question about the transformation matrix used when reading in Neuromag FIF MRI files. Looking at the read_mri function, the matrix stored in hdr.trans.trans by MNE toolbox is copied to mri.transform. The fieldtrip wiki says that the matrix in mri.transform transforms from the native voxel-coordinate system of the MRI to the head coordinate system. However, the matrix stored in hdr.trans.trans goes from 4 to 5 (as seen in mri.hdr.trans), which means from head to MRI. So, shouldn't mri.transform = inv(hdr.trans.trans)? Please let me know if I'm mistaken on how the coordinate systems interact in these toolboxes. Thank you, Gus ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From dahliash at STANFORD.EDU Wed Sep 2 00:40:24 2009 From: dahliash at STANFORD.EDU (Dahlia Sharon) Date: Wed, 2 Sep 2009 00:40:24 +0200 Subject: freqdescriptives/statistics Message-ID: Thanks Jan-Mathijs for that useful reply. Regarding permutation analysis, we're running into some difficulty understanding what the code does. Could you clarify these points? 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate layout file (all channels). Does fieldtrip take into account which channels are gradiometers and which magnetometers when it calculates adjacency for clustering? 2. How does fieldtrip calculate adjacency for channels? (time and frequency are obvious...) 3. How is the clustering performed? We're getting a significant cluster but it doesn't look like a single blob in the time-frequency domain (averaging over sensors) but like two very distant blobs, which is very strange... On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen wrote: >Dear Dahlia, > >Hemant Bokil indeed uses the jackknife to obtain variance estimates of >power (and coherence), see also for example his 2007 paper in >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', >he has shown that by applying a specific correction to the power >estimate, in combination of the jackknife, generates a test-statistic >from a differential (i.e. contrast) power spectrum which has a >standard normal distribution (i.e. the jackknife estimate of the >variance is expected to be 1 and the estimate of the mean 0). >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to >use non-parametric techniques to do statistical inference. >Freqdescriptives in this respect still historically has the option of >computing a jackknife estimate of the SEM of the powerspectrum/ >coherencespectrum, which can be used to compute a T-statistic across >two conditions for example. However, I you would choose this path, you >have to write some code which does this, because it is not in >fieldtrip. The biascorrect option has been taken out altogether as far >as I can see, (and had been designed only to correct the bias in the >coherence spectra, and not in the power spectra if I remember >correctly), and any reference in the documentation should be removed. >Unfortunately, we did not yet have time to considerably clean up >freqdescriptives, but this is quite high on the developer's to do list. >The bottom line is: ignore biascorrect, and if you use the jackknife >estimate of the SEM, you have to come up with some code of your own. >Alternatively, you could look into freqstatistics and use >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do >statistical inference. > >Best, > >Jan-Mathijs > > >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > >> Hi all, >> >> Is there a more detailed explanation of usage for the jackknife and >> biascorrect options for freqdescriptives than the one in the >> freqdescriptives reference page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? >> >> More specifically, are these options related to Bokil et al NeuroIm >> 2007? How should they be employed to determine significance of >> difference between conditions? (Is there somewhere a tutorial for >> the use of these options analogous to the one about cluster-based >> permutation testing?) >> >> Also, for the permutation analysis of TFRs (http://fieldtrip.fcdonders.nl/tutorial/statistics?s >> []=freqstatistics), if I don't want to employ the planar gradient >> step (what exactly IS combineplanar? sorry I couldn't find it), can >> I simply skip it and calculate the TFRs of the raw sensor data? >> >> Many thanks! >> Dahlia. >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> http://listserv.surfnet.nl/archives/fieldtrip.html >> http://www.ru.nl/fcdonders/fieldtrip/ > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of >the FieldTrip toolbox, to share experiences and to discuss new ideas >for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ > > > > > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Wed Sep 2 09:47:33 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 2 Sep 2009 09:47:33 +0200 Subject: freqdescriptives/statistics (spatial clustering for planar gradiometers and magnetometers __ Neuromag) In-Reply-To: Message-ID: Hi Dahlia, My name is Eric Maris and, together with Robert Oostenveld, I implemented the permutation statistics in Fieldtrip. > 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate > layout file (all channels). Does fieldtrip take into account which channels > are gradiometers and which magnetometers when it calculates adjacency for > clustering? > > 2. How does fieldtrip calculate adjacency for channels? (time and frequency > are obvious...) > > 3. How is the clustering performed? > > We're getting a significant cluster but it doesn't look like a single blob > in the time-frequency domain (averaging over sensors) but like two very > distant blobs, which is very strange... These are important points. As far as I know, you are the first to use the cluster-based permutation tests on Neuromag data. This means that you have to do some more work than the people who work with a system that only has axial gradiometers (like the CTF system). For axial gradiometers, Fieldtrip can calculate the adjacency in a straightforward way, using the positions of the coils in the helmet. Working with planar gradiometers and magnetometers, you have to define yourself the adjacency structure for the channels in your system (both gradiometers and magnetomers). Fieldtrip doesn't care about the way you define adjacency. You can give Fieldtrip any adjacency structure via the configuration field cfg.neighbours. (Type "help neighbourselection" to get info about how to define and adjacency structure.) Defining adjacency on planar gradiometers requires some thinking. Things become easier if you (1) ignore the magnetometers, and (2) sum the power at the pairs of orthogonal planar gradiometers. This maps the data on a new set of channels for which adjacency is defined in a straightforward way. (Of course, you may also decide to retain the orientation information in your original planar gradiometers, but than you have to come up with a sensible definition of adjacency that takes this orientation information into account.) Finally, a minor point, do not start with cluster-based permutation tests with both time and frequency resolution. If you are interested in oscillations, only keep the frequency resolution in you first analyses. You can later add the time axis if you want to know how the effect develops over time. Good luck, Eric dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 E: e.maris at donders.ru.nl MSc Cognitive Neuroscience: www.ru.nl/master/cns/ > > On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen > wrote: > > >Dear Dahlia, > > > >Hemant Bokil indeed uses the jackknife to obtain variance estimates of > >power (and coherence), see also for example his 2007 paper in > >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', > >he has shown that by applying a specific correction to the power > >estimate, in combination of the jackknife, generates a test-statistic > >from a differential (i.e. contrast) power spectrum which has a > >standard normal distribution (i.e. the jackknife estimate of the > >variance is expected to be 1 and the estimate of the mean 0). > >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to > >use non-parametric techniques to do statistical inference. > >Freqdescriptives in this respect still historically has the option of > >computing a jackknife estimate of the SEM of the powerspectrum/ > >coherencespectrum, which can be used to compute a T-statistic across > >two conditions for example. However, I you would choose this path, you > >have to write some code which does this, because it is not in > >fieldtrip. The biascorrect option has been taken out altogether as far > >as I can see, (and had been designed only to correct the bias in the > >coherence spectra, and not in the power spectra if I remember > >correctly), and any reference in the documentation should be removed. > >Unfortunately, we did not yet have time to considerably clean up > >freqdescriptives, but this is quite high on the developer's to do list. > >The bottom line is: ignore biascorrect, and if you use the jackknife > >estimate of the SEM, you have to come up with some code of your own. > >Alternatively, you could look into freqstatistics and use > >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do > >statistical inference. > > > >Best, > > > >Jan-Mathijs > > > > > >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > > > >> Hi all, > >> > >> Is there a more detailed explanation of usage for the jackknife and > >> biascorrect options for freqdescriptives than the one in the > >> freqdescriptives reference > page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? > >> > >> More specifically, are these options related to Bokil et al NeuroIm > >> 2007? How should they be employed to determine significance of > >> difference between conditions? (Is there somewhere a tutorial for > >> the use of these options analogous to the one about cluster-based > >> permutation testing?) > >> > >> Also, for the permutation analysis of TFRs > (http://fieldtrip.fcdonders.nl/tutorial/statistics?s > >> []=freqstatistics), if I don't want to employ the planar gradient > >> step (what exactly IS combineplanar? sorry I couldn't find it), can > >> I simply skip it and calculate the TFRs of the raw sensor data? > >> > >> Many thanks! > >> Dahlia. > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > >> of the FieldTrip toolbox, to share experiences and to discuss new > >> ideas for MEG and EEG analysis. > >> http://listserv.surfnet.nl/archives/fieldtrip.html > >> http://www.ru.nl/fcdonders/fieldtrip/ > > > >---------------------------------- > > > >The aim of this list is to facilitate the discussion between users of > >the FieldTrip toolbox, to share experiences and to discuss new ideas > >for MEG and EEG analysis. > > > >http://listserv.surfnet.nl/archives/fieldtrip.html > > > >http://www.ru.nl/fcdonders/fieldtrip/ > > > > > > > > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Wed Sep 2 10:56:27 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Wed, 2 Sep 2009 10:56:27 +0200 Subject: megpalnar.m and statistical testing Message-ID: Dear Fieldtrip developers & users, I have some questions regarding planar gradiometers and averaging / statistical testing in fieldtrip and in general: Computing the vector valued gradient of the field is a linear operation and - as such - fully exchangeable with any kind of other linear operation such as averaging over trials, subjects and computing differences between conditions. This obviously does not hold for the pythagoras-like computation of the gradient vector's magnitude, because this is a non-linear operation. As an example think of to sources in two subjects that are (roughly) in the same spot (sulcus) but, say, on opposing walls of this said sulcus. Therefore, the fields in these two subjects will have opposing signs. As a consequence their fileds will cancel in the average over subjects - as it should be, perhaps, because they are not the same source but represent individual variance. If I now take the planar gradient magnitude using megplanar and combineplanar in each subject these two sources will be in the same spot on the scalp and with the same sign (because magnitude is confined between 0 and +INF) and will not cancel. This is different from taking the planar gradient's magnitude after averaging - this latter planar gradient amplitude will be close to zero. So far this is not surprising as taking the magnitude is a nonlinear operation and not permuatble with linear operations. My question is whether there any advice on where an when combineplanar should be used? Or would recommend it just for visualization purposes? Thanks you very much for your help, Michael > -----Ursprüngliche Nachricht----- > Von: "Eric Maris" > Gesendet: 02.09.09 09:52:37 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] freqdescriptives/statistics (spatial clustering for planar gradiometers and magnetometers __ Neuromag) > Hi Dahlia, > > > My name is Eric Maris and, together with Robert Oostenveld, I implemented > the permutation statistics in Fieldtrip. > > > 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate > > layout file (all channels). Does fieldtrip take into account which > channels > > are gradiometers and which magnetometers when it calculates adjacency for > > clustering? > > > > 2. How does fieldtrip calculate adjacency for channels? (time and > frequency > > are obvious...) > > > > 3. How is the clustering performed? > > > > We're getting a significant cluster but it doesn't look like a single blob > > in the time-frequency domain (averaging over sensors) but like two very > > distant blobs, which is very strange... > > These are important points. As far as I know, you are the first to use the > cluster-based permutation tests on Neuromag data. This means that you have > to do some more work than the people who work with a system that only has > axial gradiometers (like the CTF system). For axial gradiometers, Fieldtrip > can calculate the adjacency in a straightforward way, using the positions of > the coils in the helmet. Working with planar gradiometers and magnetometers, > you have to define yourself the adjacency structure for the channels in your > system (both gradiometers and magnetomers). Fieldtrip doesn't care about the > way you define adjacency. You can give Fieldtrip any adjacency structure via > the configuration field cfg.neighbours. (Type "help neighbourselection" to > get info about how to define and adjacency structure.) > > Defining adjacency on planar gradiometers requires some thinking. Things > become easier if you (1) ignore the magnetometers, and (2) sum the power at > the pairs of orthogonal planar gradiometers. This maps the data on a new set > of channels for which adjacency is defined in a straightforward way. (Of > course, you may also decide to retain the orientation information in your > original planar gradiometers, but than you have to come up with a sensible > definition of adjacency that takes this orientation information into > account.) > > Finally, a minor point, do not start with cluster-based permutation tests > with both time and frequency resolution. If you are interested in > oscillations, only keep the frequency resolution in you first analyses. You > can later add the time axis if you want to know how the effect develops over > time. > > > Good luck, > > Eric > > > dr. Eric Maris > Donders Institute for Brain, Cognition and Behavior > Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging > Radboud University > P.O. Box 9104 > 6500 HE Nijmegen > The Netherlands > T:+31 24 3612651 > Mobile: 06 39584581 > F:+31 24 3616066 > E: e.maris at donders.ru.nl > > MSc Cognitive Neuroscience: www.ru.nl/master/cns/ > > > > > > > > On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen > > wrote: > > > > >Dear Dahlia, > > > > > >Hemant Bokil indeed uses the jackknife to obtain variance estimates of > > >power (and coherence), see also for example his 2007 paper in > > >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', > > >he has shown that by applying a specific correction to the power > > >estimate, in combination of the jackknife, generates a test-statistic > > >from a differential (i.e. contrast) power spectrum which has a > > >standard normal distribution (i.e. the jackknife estimate of the > > >variance is expected to be 1 and the estimate of the mean 0). > > >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to > > >use non-parametric techniques to do statistical inference. > > >Freqdescriptives in this respect still historically has the option of > > >computing a jackknife estimate of the SEM of the powerspectrum/ > > >coherencespectrum, which can be used to compute a T-statistic across > > >two conditions for example. However, I you would choose this path, you > > >have to write some code which does this, because it is not in > > >fieldtrip. The biascorrect option has been taken out altogether as far > > >as I can see, (and had been designed only to correct the bias in the > > >coherence spectra, and not in the power spectra if I remember > > >correctly), and any reference in the documentation should be removed. > > >Unfortunately, we did not yet have time to considerably clean up > > >freqdescriptives, but this is quite high on the developer's to do list. > > >The bottom line is: ignore biascorrect, and if you use the jackknife > > >estimate of the SEM, you have to come up with some code of your own. > > >Alternatively, you could look into freqstatistics and use > > >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do > > >statistical inference. > > > > > >Best, > > > > > >Jan-Mathijs > > > > > > > > >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > > > > > >> Hi all, > > >> > > >> Is there a more detailed explanation of usage for the jackknife and > > >> biascorrect options for freqdescriptives than the one in the > > >> freqdescriptives reference > > page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? > > >> > > >> More specifically, are these options related to Bokil et al NeuroIm > > >> 2007? How should they be employed to determine significance of > > >> difference between conditions? (Is there somewhere a tutorial for > > >> the use of these options analogous to the one about cluster-based > > >> permutation testing?) > > >> > > >> Also, for the permutation analysis of TFRs > > (http://fieldtrip.fcdonders.nl/tutorial/statistics?s > > >> []=freqstatistics), if I don't want to employ the planar gradient > > >> step (what exactly IS combineplanar? sorry I couldn't find it), can > > >> I simply skip it and calculate the TFRs of the raw sensor data? > > >> > > >> Many thanks! > > >> Dahlia. > > >> ---------------------------------- > > >> The aim of this list is to facilitate the discussion between users > > >> of the FieldTrip toolbox, to share experiences and to discuss new > > >> ideas for MEG and EEG analysis. > > >> http://listserv.surfnet.nl/archives/fieldtrip.html > > >> http://www.ru.nl/fcdonders/fieldtrip/ > > > > > >---------------------------------- > > > > > >The aim of this list is to facilitate the discussion between users of > > >the FieldTrip toolbox, to share experiences and to discuss new ideas > > >for MEG and EEG analysis. > > > > > >http://listserv.surfnet.nl/archives/fieldtrip.html > > > > > >http://www.ru.nl/fcdonders/fieldtrip/ > > > > > > > > > > > > > > > > > >---------------------------------- > > >The aim of this list is to facilitate the discussion between users of the > > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > > and EEG analysis. See also > > http://listserv.surfnet.nl/archives/fieldtrip.html and > > http://www.ru.nl/neuroimaging/fieldtrip. > > > > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip > > toolbox, to share experiences and to discuss new ideas for MEG and EEG > analysis. > > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Wed Sep 2 13:25:49 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 2 Sep 2009 13:25:49 +0200 Subject: megpalnar.m and statistical testing In-Reply-To: <1050813170@web.de> Message-ID: Dear Michael, > I have some questions regarding planar gradiometers and averaging / statistical > testing in fieldtrip and in general: > > Computing the vector valued gradient of the field is a linear operation and - as such > - fully exchangeable with any kind of other linear operation such as averaging over > trials, subjects and computing differences between conditions. > > This obviously does not hold for the pythagoras-like computation of the gradient > vector's magnitude, because this is a non-linear operation. > > As an example think of to sources in two subjects that are (roughly) in the same > spot (sulcus) but, say, on opposing walls of this said sulcus. Therefore, the fields in > these two subjects will have opposing signs. As a consequence their fileds will cancel > in the average over subjects - as it should be, perhaps, because they are not the > same source but represent individual variance. If I now take the planar gradient > magnitude using megplanar and combineplanar in each subject these two sources > will be in the same spot on the scalp and with the same sign (because magnitude is > confined between 0 and +INF) and will not cancel. This is different from taking the > planar gradient's magnitude after averaging - this latter planar gradient amplitude > will be close to zero. So far this is not surprising as taking the magnitude is a > nonlinear operation and not permuatble with linear operations. > > My question is whether there any advice on where an when combineplanar should > be used? Or would recommend it just for visualization purposes? I think you already gave the answer in the previous paragraph. In my opinion, one should use megplanar-followed-by-combineplanar whenever the sources of different subjects have clearly different orientations. This holds for visualization as well as for statistics. Best, Eric Maris > > Thanks you very much for your help, > Michael > > > > > > > -----Ursprüngliche Nachricht----- > > Von: "Eric Maris" > > Gesendet: 02.09.09 09:52:37 > > An: FIELDTRIP at NIC.SURFNET.NL > > Betreff: Re: [FIELDTRIP] freqdescriptives/statistics (spatial clustering for planar > gradiometers and magnetometers __ Neuromag) > > > > Hi Dahlia, > > > > > > My name is Eric Maris and, together with Robert Oostenveld, I implemented > > the permutation statistics in Fieldtrip. > > > > > 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate > > > layout file (all channels). Does fieldtrip take into account which > > channels > > > are gradiometers and which magnetometers when it calculates adjacency for > > > clustering? > > > > > > 2. How does fieldtrip calculate adjacency for channels? (time and > > frequency > > > are obvious...) > > > > > > 3. How is the clustering performed? > > > > > > We're getting a significant cluster but it doesn't look like a single blob > > > in the time-frequency domain (averaging over sensors) but like two very > > > distant blobs, which is very strange... > > > > These are important points. As far as I know, you are the first to use the > > cluster-based permutation tests on Neuromag data. This means that you have > > to do some more work than the people who work with a system that only has > > axial gradiometers (like the CTF system). For axial gradiometers, Fieldtrip > > can calculate the adjacency in a straightforward way, using the positions of > > the coils in the helmet. Working with planar gradiometers and magnetometers, > > you have to define yourself the adjacency structure for the channels in your > > system (both gradiometers and magnetomers). Fieldtrip doesn't care about the > > way you define adjacency. You can give Fieldtrip any adjacency structure via > > the configuration field cfg.neighbours. (Type "help neighbourselection" to > > get info about how to define and adjacency structure.) > > > > Defining adjacency on planar gradiometers requires some thinking. Things > > become easier if you (1) ignore the magnetometers, and (2) sum the power at > > the pairs of orthogonal planar gradiometers. This maps the data on a new set > > of channels for which adjacency is defined in a straightforward way. (Of > > course, you may also decide to retain the orientation information in your > > original planar gradiometers, but than you have to come up with a sensible > > definition of adjacency that takes this orientation information into > > account.) > > > > Finally, a minor point, do not start with cluster-based permutation tests > > with both time and frequency resolution. If you are interested in > > oscillations, only keep the frequency resolution in you first analyses. You > > can later add the time axis if you want to know how the effect develops over > > time. > > > > > > Good luck, > > > > Eric > > > > > > dr. Eric Maris > > Donders Institute for Brain, Cognition and Behavior > > Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging > > Radboud University > > P.O. Box 9104 > > 6500 HE Nijmegen > > The Netherlands > > T:+31 24 3612651 > > Mobile: 06 39584581 > > F:+31 24 3616066 > > E: e.maris at donders.ru.nl > > > > MSc Cognitive Neuroscience: www.ru.nl/master/cns/ > > > > > > > > > > > > > > On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen > > > wrote: > > > > > > >Dear Dahlia, > > > > > > > >Hemant Bokil indeed uses the jackknife to obtain variance estimates of > > > >power (and coherence), see also for example his 2007 paper in > > > >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', > > > >he has shown that by applying a specific correction to the power > > > >estimate, in combination of the jackknife, generates a test-statistic > > > >from a differential (i.e. contrast) power spectrum which has a > > > >standard normal distribution (i.e. the jackknife estimate of the > > > >variance is expected to be 1 and the estimate of the mean 0). > > > >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to > > > >use non-parametric techniques to do statistical inference. > > > >Freqdescriptives in this respect still historically has the option of > > > >computing a jackknife estimate of the SEM of the powerspectrum/ > > > >coherencespectrum, which can be used to compute a T-statistic across > > > >two conditions for example. However, I you would choose this path, you > > > >have to write some code which does this, because it is not in > > > >fieldtrip. The biascorrect option has been taken out altogether as far > > > >as I can see, (and had been designed only to correct the bias in the > > > >coherence spectra, and not in the power spectra if I remember > > > >correctly), and any reference in the documentation should be removed. > > > >Unfortunately, we did not yet have time to considerably clean up > > > >freqdescriptives, but this is quite high on the developer's to do list. > > > >The bottom line is: ignore biascorrect, and if you use the jackknife > > > >estimate of the SEM, you have to come up with some code of your own. > > > >Alternatively, you could look into freqstatistics and use > > > >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do > > > >statistical inference. > > > > > > > >Best, > > > > > > > >Jan-Mathijs > > > > > > > > > > > >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > > > > > > > >> Hi all, > > > >> > > > >> Is there a more detailed explanation of usage for the jackknife and > > > >> biascorrect options for freqdescriptives than the one in the > > > >> freqdescriptives reference > > > page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? > > > >> > > > >> More specifically, are these options related to Bokil et al NeuroIm > > > >> 2007? How should they be employed to determine significance of > > > >> difference between conditions? (Is there somewhere a tutorial for > > > >> the use of these options analogous to the one about cluster-based > > > >> permutation testing?) > > > >> > > > >> Also, for the permutation analysis of TFRs > > > (http://fieldtrip.fcdonders.nl/tutorial/statistics?s > > > >> []=freqstatistics), if I don't want to employ the planar gradient > > > >> step (what exactly IS combineplanar? sorry I couldn't find it), can > > > >> I simply skip it and calculate the TFRs of the raw sensor data? > > > >> > > > >> Many thanks! > > > >> Dahlia. > > > >> ---------------------------------- > > > >> The aim of this list is to facilitate the discussion between users > > > >> of the FieldTrip toolbox, to share experiences and to discuss new > > > >> ideas for MEG and EEG analysis. > > > >> http://listserv.surfnet.nl/archives/fieldtrip.html > > > >> http://www.ru.nl/fcdonders/fieldtrip/ > > > > > > > >---------------------------------- > > > > > > > >The aim of this list is to facilitate the discussion between users of > > > >the FieldTrip toolbox, to share experiences and to discuss new ideas > > > >for MEG and EEG analysis. > > > > > > > >http://listserv.surfnet.nl/archives/fieldtrip.html > > > > > > > >http://www.ru.nl/fcdonders/fieldtrip/ > > > > > > > > > > > > > > > > > > > > > > > >---------------------------------- > > > >The aim of this list is to facilitate the discussion between users of the > > > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > > > and EEG analysis. See also > > > http://listserv.surfnet.nl/archives/fieldtrip.html and > > > http://www.ru.nl/neuroimaging/fieldtrip. > > > > > > > > > > ---------------------------------- > > > The aim of this list is to facilitate the discussion between users of the > > FieldTrip > > > toolbox, to share experiences and to discuss new ideas for MEG and EEG > > analysis. > > > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > > > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From dahliash at STANFORD.EDU Thu Sep 3 00:17:48 2009 From: dahliash at STANFORD.EDU (Dahlia Sharon) Date: Thu, 3 Sep 2009 00:17:48 +0200 Subject: freqdescriptives/statistics (spatial clustering for planar gradiometers and magnetometers __ Neuromag) Message-ID: Thanks Eric for this helpful reply. We will look into summing the power over grad pairs and ignoring mags. My problem with collapsing over time is that if there is a transient difference between conditions then it might not reach significance this way. Or do you have experience to the contrary? On Wed, 2 Sep 2009 09:47:33 +0200, Eric Maris wrote: >Hi Dahlia, > > >My name is Eric Maris and, together with Robert Oostenveld, I implemented >the permutation statistics in Fieldtrip. > >> 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate >> layout file (all channels). Does fieldtrip take into account which >channels >> are gradiometers and which magnetometers when it calculates adjacency for >> clustering? >> >> 2. How does fieldtrip calculate adjacency for channels? (time and >frequency >> are obvious...) >> >> 3. How is the clustering performed? >> >> We're getting a significant cluster but it doesn't look like a single blob >> in the time-frequency domain (averaging over sensors) but like two very >> distant blobs, which is very strange... > >These are important points. As far as I know, you are the first to use the >cluster-based permutation tests on Neuromag data. This means that you have >to do some more work than the people who work with a system that only has >axial gradiometers (like the CTF system). For axial gradiometers, Fieldtrip >can calculate the adjacency in a straightforward way, using the positions of >the coils in the helmet. Working with planar gradiometers and magnetometers, >you have to define yourself the adjacency structure for the channels in your >system (both gradiometers and magnetomers). Fieldtrip doesn't care about the >way you define adjacency. You can give Fieldtrip any adjacency structure via >the configuration field cfg.neighbours. (Type "help neighbourselection" to >get info about how to define and adjacency structure.) > >Defining adjacency on planar gradiometers requires some thinking. Things >become easier if you (1) ignore the magnetometers, and (2) sum the power at >the pairs of orthogonal planar gradiometers. This maps the data on a new set >of channels for which adjacency is defined in a straightforward way. (Of >course, you may also decide to retain the orientation information in your >original planar gradiometers, but than you have to come up with a sensible >definition of adjacency that takes this orientation information into >account.) > >Finally, a minor point, do not start with cluster-based permutation tests >with both time and frequency resolution. If you are interested in >oscillations, only keep the frequency resolution in you first analyses. You >can later add the time axis if you want to know how the effect develops over >time. > > >Good luck, > >Eric > > >dr. Eric Maris >Donders Institute for Brain, Cognition and Behavior >Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging >Radboud University >P.O. Box 9104 >6500 HE Nijmegen >The Netherlands >T:+31 24 3612651 >Mobile: 06 39584581 >F:+31 24 3616066 >E: e.maris at donders.ru.nl > >MSc Cognitive Neuroscience: www.ru.nl/master/cns/ > > > > >> >> On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen >> wrote: >> >> >Dear Dahlia, >> > >> >Hemant Bokil indeed uses the jackknife to obtain variance estimates of >> >power (and coherence), see also for example his 2007 paper in >> >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', >> >he has shown that by applying a specific correction to the power >> >estimate, in combination of the jackknife, generates a test-statistic >> >from a differential (i.e. contrast) power spectrum which has a >> >standard normal distribution (i.e. the jackknife estimate of the >> >variance is expected to be 1 and the estimate of the mean 0). >> >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to >> >use non-parametric techniques to do statistical inference. >> >Freqdescriptives in this respect still historically has the option of >> >computing a jackknife estimate of the SEM of the powerspectrum/ >> >coherencespectrum, which can be used to compute a T-statistic across >> >two conditions for example. However, I you would choose this path, you >> >have to write some code which does this, because it is not in >> >fieldtrip. The biascorrect option has been taken out altogether as far >> >as I can see, (and had been designed only to correct the bias in the >> >coherence spectra, and not in the power spectra if I remember >> >correctly), and any reference in the documentation should be removed. >> >Unfortunately, we did not yet have time to considerably clean up >> >freqdescriptives, but this is quite high on the developer's to do list. >> >The bottom line is: ignore biascorrect, and if you use the jackknife >> >estimate of the SEM, you have to come up with some code of your own. >> >Alternatively, you could look into freqstatistics and use >> >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do >> >statistical inference. >> > >> >Best, >> > >> >Jan-Mathijs >> > >> > >> >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: >> > >> >> Hi all, >> >> >> >> Is there a more detailed explanation of usage for the jackknife and >> >> biascorrect options for freqdescriptives than the one in the >> >> freqdescriptives reference >> page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? >> >> >> >> More specifically, are these options related to Bokil et al NeuroIm >> >> 2007? How should they be employed to determine significance of >> >> difference between conditions? (Is there somewhere a tutorial for >> >> the use of these options analogous to the one about cluster-based >> >> permutation testing?) >> >> >> >> Also, for the permutation analysis of TFRs >> (http://fieldtrip.fcdonders.nl/tutorial/statistics?s >> >> []=freqstatistics), if I don't want to employ the planar gradient >> >> step (what exactly IS combineplanar? sorry I couldn't find it), can >> >> I simply skip it and calculate the TFRs of the raw sensor data? >> >> >> >> Many thanks! >> >> Dahlia. >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> >> of the FieldTrip toolbox, to share experiences and to discuss new >> >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> > >> >---------------------------------- >> > >> >The aim of this list is to facilitate the discussion between users of >> >the FieldTrip toolbox, to share experiences and to discuss new ideas >> >for MEG and EEG analysis. >> > >> >http://listserv.surfnet.nl/archives/fieldtrip.html >> > >> >http://www.ru.nl/fcdonders/fieldtrip/ >> > >> > >> > >> > >> > >> >---------------------------------- >> >The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. >> > >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >FieldTrip >> toolbox, to share experiences and to discuss new ideas for MEG and EEG >analysis. >> See also http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Thu Sep 3 07:26:47 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Thu, 3 Sep 2009 07:26:47 +0200 Subject: freqdescriptives/statistics (spatial clustering for planar gradiometers and magnetometers __ Neuromag) In-Reply-To: Message-ID: > My problem with collapsing over time is that if there is a transient > difference between conditions then it might not reach significance this way. My advice is intended to makd life easy in your first cluster-based permutation analyses. Clustering in space, frequency AND time sometimes produces nonfocal 3D clusters. Best, Eric > > On Wed, 2 Sep 2009 09:47:33 +0200, Eric Maris > wrote: > > >Hi Dahlia, > > > > > >My name is Eric Maris and, together with Robert Oostenveld, I implemented > >the permutation statistics in Fieldtrip. > > > >> 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate > >> layout file (all channels). Does fieldtrip take into account which > >channels > >> are gradiometers and which magnetometers when it calculates adjacency for > >> clustering? > >> > >> 2. How does fieldtrip calculate adjacency for channels? (time and > >frequency > >> are obvious...) > >> > >> 3. How is the clustering performed? > >> > >> We're getting a significant cluster but it doesn't look like a single blob > >> in the time-frequency domain (averaging over sensors) but like two very > >> distant blobs, which is very strange... > > > >These are important points. As far as I know, you are the first to use the > >cluster-based permutation tests on Neuromag data. This means that you have > >to do some more work than the people who work with a system that only has > >axial gradiometers (like the CTF system). For axial gradiometers, Fieldtrip > >can calculate the adjacency in a straightforward way, using the positions of > >the coils in the helmet. Working with planar gradiometers and magnetometers, > >you have to define yourself the adjacency structure for the channels in your > >system (both gradiometers and magnetomers). Fieldtrip doesn't care about the > >way you define adjacency. You can give Fieldtrip any adjacency structure via > >the configuration field cfg.neighbours. (Type "help neighbourselection" to > >get info about how to define and adjacency structure.) > > > >Defining adjacency on planar gradiometers requires some thinking. Things > >become easier if you (1) ignore the magnetometers, and (2) sum the power at > >the pairs of orthogonal planar gradiometers. This maps the data on a new set > >of channels for which adjacency is defined in a straightforward way. (Of > >course, you may also decide to retain the orientation information in your > >original planar gradiometers, but than you have to come up with a sensible > >definition of adjacency that takes this orientation information into > >account.) > > > >Finally, a minor point, do not start with cluster-based permutation tests > >with both time and frequency resolution. If you are interested in > >oscillations, only keep the frequency resolution in you first analyses. You > >can later add the time axis if you want to know how the effect develops over > >time. > > > > > >Good luck, > > > >Eric > > > > > >dr. Eric Maris > >Donders Institute for Brain, Cognition and Behavior > >Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging > >Radboud University > >P.O. Box 9104 > >6500 HE Nijmegen > >The Netherlands > >T:+31 24 3612651 > >Mobile: 06 39584581 > >F:+31 24 3616066 > >E: e.maris at donders.ru.nl > > > >MSc Cognitive Neuroscience: www.ru.nl/master/cns/ > > > > > > > > > >> > >> On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen > >> wrote: > >> > >> >Dear Dahlia, > >> > > >> >Hemant Bokil indeed uses the jackknife to obtain variance estimates of > >> >power (and coherence), see also for example his 2007 paper in > >> >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', > >> >he has shown that by applying a specific correction to the power > >> >estimate, in combination of the jackknife, generates a test-statistic > >> >from a differential (i.e. contrast) power spectrum which has a > >> >standard normal distribution (i.e. the jackknife estimate of the > >> >variance is expected to be 1 and the estimate of the mean 0). > >> >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to > >> >use non-parametric techniques to do statistical inference. > >> >Freqdescriptives in this respect still historically has the option of > >> >computing a jackknife estimate of the SEM of the powerspectrum/ > >> >coherencespectrum, which can be used to compute a T-statistic across > >> >two conditions for example. However, I you would choose this path, you > >> >have to write some code which does this, because it is not in > >> >fieldtrip. The biascorrect option has been taken out altogether as far > >> >as I can see, (and had been designed only to correct the bias in the > >> >coherence spectra, and not in the power spectra if I remember > >> >correctly), and any reference in the documentation should be removed. > >> >Unfortunately, we did not yet have time to considerably clean up > >> >freqdescriptives, but this is quite high on the developer's to do list. > >> >The bottom line is: ignore biascorrect, and if you use the jackknife > >> >estimate of the SEM, you have to come up with some code of your own. > >> >Alternatively, you could look into freqstatistics and use > >> >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do > >> >statistical inference. > >> > > >> >Best, > >> > > >> >Jan-Mathijs > >> > > >> > > >> >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > >> > > >> >> Hi all, > >> >> > >> >> Is there a more detailed explanation of usage for the jackknife and > >> >> biascorrect options for freqdescriptives than the one in the > >> >> freqdescriptives reference > >> page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? > >> >> > >> >> More specifically, are these options related to Bokil et al NeuroIm > >> >> 2007? How should they be employed to determine significance of > >> >> difference between conditions? (Is there somewhere a tutorial for > >> >> the use of these options analogous to the one about cluster-based > >> >> permutation testing?) > >> >> > >> >> Also, for the permutation analysis of TFRs > >> (http://fieldtrip.fcdonders.nl/tutorial/statistics?s > >> >> []=freqstatistics), if I don't want to employ the planar gradient > >> >> step (what exactly IS combineplanar? sorry I couldn't find it), can > >> >> I simply skip it and calculate the TFRs of the raw sensor data? > >> >> > >> >> Many thanks! > >> >> Dahlia. > >> >> ---------------------------------- > >> >> The aim of this list is to facilitate the discussion between users > >> >> of the FieldTrip toolbox, to share experiences and to discuss new > >> >> ideas for MEG and EEG analysis. > >> >> http://listserv.surfnet.nl/archives/fieldtrip.html > >> >> http://www.ru.nl/fcdonders/fieldtrip/ > >> > > >> >---------------------------------- > >> > > >> >The aim of this list is to facilitate the discussion between users of > >> >the FieldTrip toolbox, to share experiences and to discuss new ideas > >> >for MEG and EEG analysis. > >> > > >> >http://listserv.surfnet.nl/archives/fieldtrip.html > >> > > >> >http://www.ru.nl/fcdonders/fieldtrip/ > >> > > >> > > >> > > >> > > >> > > >> >---------------------------------- > >> >The aim of this list is to facilitate the discussion between users of the > >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > >> and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > >> > > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users of the > >FieldTrip > >> toolbox, to share experiences and to discuss new ideas for MEG and EEG > >analysis. > >> See also http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From nadia.mueller at UNI-KONSTANZ.DE Fri Sep 4 15:50:28 2009 From: nadia.mueller at UNI-KONSTANZ.DE (=?ISO-8859-1?Q?Nadia_M=FCller?=) Date: Fri, 4 Sep 2009 15:50:28 +0200 Subject: depsamplesF In-Reply-To: <20090805195249.26517.qmail@f4mail-235-238.rediffmail.com> Message-ID: Dear all, I've a question regarding the statfun_depsamplesF. I'd like to compare source data of 9 subjects x 5 conditions. Therefore I performed a repeated dependent samples F-statistic on source level. When looking at the data I was surprised by the very high F-values and, at the same time, very low p-values. So we debugged the statfun to get an idea of how the F-statistic is calculated. Thereby, we came across the 'scaledstat' where the F- values are dramatically reduced, resulting in very low F-values and consequently p-values. We also got different degrees of freedom compared to an anova calculated elsewhere. It would be great if you could give me some background of how this F- statistic is performed and why for example we need the scaledstat. Thanks a lot, nadia ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From hungptit at GMAIL.COM Mon Sep 7 09:00:02 2009 From: hungptit at GMAIL.COM (Hung Dang) Date: Mon, 7 Sep 2009 01:00:02 -0600 Subject: EEG beamforming Message-ID: Dear all, I try to combine Fieldtrip with my finite different head model and haven't figured out how to register a Biosemi 128 electrode system with a segmented realistic head model in Fieldtrip. I would be great if you could give me some hints or suggestions about my problem. Thanks a lot Hung ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Tue Sep 8 09:38:46 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 8 Sep 2009 09:38:46 +0200 Subject: removed external/biosig Message-ID: Dear all I have released the external/biosig directory from the FieldTrip release version, because it is causing problems with some of the functions having the same name as a Matlab builtin. If needed, you can get a condensed version of the biosig code from ftp://ftp.fcdonders.nl/pub/fieldtrip/external or the full code from the BIOSIG website at http://biosig.sourceforge.net/ . best regards, Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher 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 ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.glerean at GMAIL.COM Tue Sep 8 10:44:23 2009 From: e.glerean at GMAIL.COM (Enrico Glerean) Date: Tue, 8 Sep 2009 11:44:23 +0300 Subject: bug report- error with prepare_concentricspheres.m Message-ID: Hello I am having an error running the example giving in the help of prepare_concentricspheres.m (using most recent version Revision 1.8 2009/07/16 09:14:52, se below). I think it's due to the fact that unique wants a simple array as input, not structs. Any chances it could be resolved quickly? Otherwise, could you just point out the final structure of the vol? is it: for i=1:4 vol(i).r = ... vol(i).o = ... vol(i).c= .. or is it vol.r = [r1 r2 r3 r4] vol.o=[o1;o2;o3;o4] vol.c=[c1 c2 c3 c4] best regards Enrico -------- code from help prepare_concentricspheres Example: % first create 4 surfaces that represent the brain, csf, skull and skin radius = [86 88 92 100]; headshape = []; for i=1:4 pnt = randn(100,3); for j=1:size(pnt,1) pnt(j,:) = pnt(j,:) ./ norm(pnt(j,:)); end headshape(i).pnt = radius(i) .* pnt + 0.1*randn(size(pnt)); end % then construct a volume conduction model of the head by fitting 4 concentric spheres cfg = []; cfg.headshape = headshape; cfg.conductivity = [0.3300 1 0.0042 0.3300] [vol, cfg] = prepare_concentricspheres(cfg) ??? Error using ==> unique Too many input arguments. Error in ==> prepare_mesh_headshape at 30 headshape.pnt = unique(headshape.pnt, 'rows'); Error in ==> prepare_concentricspheres at 82 headshape = prepare_mesh_headshape(cfg); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Tue Sep 8 11:20:31 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Tue, 8 Sep 2009 11:20:31 +0200 Subject: depsamplesF In-Reply-To: <4CD6CD94-A7AE-48B7-BCEE-9C1DE16A98CD@uni-konstanz.de> Message-ID: Hi Nadia, Statfun_depsamplesF calculates a Hotelling's T^2-statistic. This statistic has a scaled F-distribution under the null hypothesis that the levels of the within-subjects independent variable have identical means. When programming this statfun, I used the book by Johnson & Wichern, Applied Multivariate Statistical Analysis, which I can advise to everyone who is not afraid of matrices. The statistic that is (or should be ...) implemented is on the top of p. 218 (edition 1988 of the book). Can you check the code? I know that Tineke Snijders (Donders PhD student) has also used this statfun (actually, I programmed it especially for her) and did not obtain strange results. Good luck, Eric Maris > -----Oorspronkelijk bericht----- > Van: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] Namens Nadia > Müller > Verzonden: vrijdag 4 september 2009 15:50 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: [FIELDTRIP] depsamplesF > > Dear all, > > I've a question regarding the statfun_depsamplesF. > > I'd like to compare source data of 9 subjects x 5 conditions. > Therefore I performed a repeated dependent samples F-statistic on > source level. When looking at the data I was surprised by the very > high F-values and, at the same time, very low p-values. So we > debugged the statfun to get an idea of how the F-statistic is > calculated. Thereby, we came across the 'scaledstat' where the F- > values are dramatically reduced, resulting in very low F-values and > consequently p-values. We also got different degrees of freedom > compared to an anova calculated elsewhere. > > It would be great if you could give me some background of how this F- > statistic is performed and why for example we need the scaledstat. > > Thanks a lot, > nadia > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From fedeletommaso at YAHOO.IT Tue Sep 8 12:16:52 2009 From: fedeletommaso at YAHOO.IT (tommaso fedele) Date: Tue, 8 Sep 2009 10:16:52 +0000 Subject: I: [Fwd: Re: [Fwd: Re: FieldTrip download request]] Message-ID: > Dear all, > I am trying to perform a TF analysis with my new fresh FieldTrip > toolbox, > version "fieldtrip-20090823". I attached a mat file with data and and > results, and I am going to expalin breigly my problems: > > 1. I have built my dataset as suggested in the documentation > (http://fieldtrip.fcdonders.nl/faq/ > how_can_i_import_my_own_dataformat): > > > data.label % cell-array containing strings, Nchan X 1 > data.fsample % sampling frequency in Hz, single number > data.trial % cell-array containing a data matrix for each trial (1 X > Ntrial), each data matrix is Nchan X Nsamples > data.time % cell-array containing a time axis for each trial (1 X > Ntrial), each time axis is a 1 X Nsamples vector > > > > 2. I executed the following script copied and modified from > http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis > as follows: > > %% Fixed wondow length > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'MEG'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.foi = 100:100:1000; % analysis > 2 to > 30 Hz in steps of 2 Hz > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.01; % length of time > window = 0.5 sec > cfg.toi = -0.01:0.01:0.08; % time > window > "slides" from -0.5 to 1.5 sec in steps of 0.05 sec (50 ms) > TFRhann = freqanalysis(cfg, data); > > but as you can see from the data file attached I get and empty > powerspectrum matrix. > > Do you have any suggestion for me? > > Thanks > > Tommaso Fedele > > > >> Thank you for your interest in the FieldTrip toolbox. >> >> You can download it from the F.C. Donders public FTP server >> (ftp.fcdonders.nl) at ftp://ftp.fcdonders.nl/pub/fieldtrip/ >> You can login with username 'anonymous' and use your email address as >> password. >> >> There is an FIELDTRIP email discussion list on which people can post >> their questions and messages regarding the use of FieldTrip. New >> releases and updates will also be announced through that list. >> >> If you do not want to participate on the discussion list, but still >> want to be informed about updates, you can join the FIELDTRIP-NEWS >> list. That is a very low volume list to which only the fieldtrip >> maintainers can make posts. >> >> For subscribing to the FIELDTRIP discussion list, click here >> http://nic.surfnet.nl/scripts/wa.exe?SUBED1=fieldtrip&A=1 >> >> For subscribing to the FIELDTRIP-NEWS announcement list, click here >> http://nic.surfnet.nl/scripts/wa.exe?SUBED1=fieldtrip-news&A=1 >> >> > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: data_tommaso.mat Type: application/vnd.ms-access Size: 473965 bytes Desc: not available URL: From moratti at MED.UCM.ES Wed Sep 9 11:06:20 2009 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Wed, 9 Sep 2009 11:06:20 +0200 Subject: depsamplesF Message-ID: Hi Eric & Nadia, Having recently used depsamplesF I had a look at the code as Nadia had some doubts. In the newer edition (1998) of the Johnson and Wichern book I guess the line 136: s.stat(smplindx)=nunits*contrastavg*inv(covmat)*contrastavg'; corresponds to formula 5-4 at page 226. n(X-u)' S(-1) (X-u) line 151: s.critval = ((nunits-1).*ncontrasts./(nunits-ncontrasts)).*finv(1- cfg.alpha,s.dfnum,s.dfdenom); corresponds to formula 5-6 (grey box) at page 226. P[T^2 > (n-1)/(n-p) F(p,n-p)] Please let me know if I got that right for adquate reporting of the method. Many thanks, Stephan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Wed Sep 9 11:56:47 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 9 Sep 2009 11:56:47 +0200 Subject: depsamplesF In-Reply-To: Message-ID: Dear Stephan, > Having recently used depsamplesF I had a look at the code as Nadia had some > doubts. In the newer edition (1998) of the Johnson and Wichern book I guess > the line 136: s.stat(smplindx)=nunits*contrastavg*inv(covmat)*contrastavg'; > corresponds to formula 5-4 at page 226. > n(X-u)' S(-1) (X-u) (I don't have the 1998 edition.) I guess the u in the formula above is the vector of expected values of the contrasts under the null hypothesis (almost always set equal to zeros, as is also the case in the depsamplesF statfun). > > line 151: s.critval = ((nunits-1).*ncontrasts./(nunits-ncontrasts)).*finv(1- > cfg.alpha,s.dfnum,s.dfdenom); corresponds to formula 5-6 (grey box) at page > 226. > P[T^2 > (n-1)/(n-p) F(p,n-p)] I think this must be ((n-1)*p)/(n-p) F(p,n-p). If you want to check the output of depsamplesF, you could look at one row of the matrix dat. Every row corresponds to a particular channel, channel-by-time pair, channel-by-frequency pair, channel-by-frequency-by-time triplet, etc. The output of depsamplesF for one such row should be identical to the T^2-statistic that is calculated using some other statistics package. (Note that a row of the matrix dat corresponds to the usual nsubjects-by-nconditions matrix. However, in dat, this matrix is reshaped as a row vector.) > > Please let me know if I got that right for adquate reporting of the method. > > Many thanks, > > Stephan > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From moratti at MED.UCM.ES Wed Sep 9 12:56:13 2009 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Wed, 9 Sep 2009 12:56:13 +0200 Subject: depsamplesF Message-ID: of course it should be (n-1)p/(n-p), sorry for the confusion, it was a typing error of mine. best, Stephan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From moratti at MED.UCM.ES Wed Sep 9 13:57:44 2009 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Wed, 9 Sep 2009 13:57:44 +0200 Subject: depsamplesF Message-ID: Hi Eric y Nadia, Ok, I have made a test of depsamplesF comparing results of depsamplesF and SPSS. I get the same results. I used data from an experiment and chose a timepoint and one channel that were indicated to be significant by dempsamplesF. In the attached TEST_dempsamplesF.mat file it is "testmat" (24 subjects 3 conditions). The variable "dat" is the reshaped "testmat". The structure "s" contains the results of depsamplesF. I added the variable scaledstat as the field "F" to "s" as it is the F value. The attached file "SPSSoutput.bmg" is a screen shot of the SPSS output entering testmat in a MANOVA. The results are the same: F(2, 22) = 6.627, p = 0.006 We can also calculate Wilk's lambda from T^2 (see page 232 formula 5-13 of the Johnson 1998 edition) as: lambda = 1/(1 + s.stat/(24-1)); and get 0.624, the same as in SPSS. Maybe, as people are more used to F values, it would be useful to have the F(scaledstat) value also in the "s" structure (and later after using timelockstats or freqstats to have a matrix containing the F values besides the T^2 values). Thanks for implementing that great stuff in fieldtrip and making it accessible for all users ! Best, Stephan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: SPSSoutput.bmp Type: image/bmp Size: 371126 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TEST_dempsamplesF.mat Type: application/octet-stream Size: 1588 bytes Desc: not available URL: From r.oostenveld at FCDONDERS.RU.NL Wed Sep 9 16:33:02 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 9 Sep 2009 16:33:02 +0200 Subject: bug report- error with prepare_concentricspheres.m In-Reply-To: Message-ID: Hi Enrico, Sorry, that was due to some changes in the mesh generation to also support manual clicking in an MRI for making a mesh. I have fixed it, The latest version (this evening on the ftp) will include the fix. thanks, Robert On 8 Sep 2009, at 10:44, Enrico Glerean wrote: > Hello > > I am having an error running the example giving in the help of > prepare_concentricspheres.m (using most recent version Revision 1.8 > 2009/07/16 09:14:52, se below). > > I think it's due to the fact that unique wants a simple array as > input, not structs. Any chances it could be resolved quickly? > Otherwise, could you just point out the final structure of the vol? > > is it: > > for i=1:4 > vol(i).r = ... > vol(i).o = ... > vol(i).c= .. > > or is it > > vol.r = [r1 r2 r3 r4] > vol.o=[o1;o2;o3;o4] > vol.c=[c1 c2 c3 c4] > > > best regards > > Enrico > > -------- code from help prepare_concentricspheres > Example: > > % first create 4 surfaces that represent the brain, csf, skull > and skin > radius = [86 88 92 100]; > headshape = []; > for i=1:4 > pnt = randn(100,3); > for j=1:size(pnt,1) > pnt(j,:) = pnt(j,:) ./ norm(pnt(j,:)); > end > headshape(i).pnt = radius(i) .* pnt + 0.1*randn(size(pnt)); > end > > % then construct a volume conduction model of the head by fitting > 4 concentric spheres > cfg = []; > cfg.headshape = headshape; > cfg.conductivity = [0.3300 1 0.0042 0.3300] > [vol, cfg] = prepare_concentricspheres(cfg) > > > > ??? Error using ==> unique > Too many input arguments. > > Error in ==> prepare_mesh_headshape at 30 > headshape.pnt = unique(headshape.pnt, 'rows'); > > Error in ==> prepare_concentricspheres at 82 > headshape = prepare_mesh_headshape(cfg); > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From nadia.mueller at UNI-KONSTANZ.DE Wed Sep 9 16:43:08 2009 From: nadia.mueller at UNI-KONSTANZ.DE (=?WINDOWS-1252?Q?Nadia_M=FCller?=) Date: Wed, 9 Sep 2009 16:43:08 +0200 Subject: depsamplesF In-Reply-To: Message-ID: Hi Eric and Stephan, thanks a lot for testing and implementing that stuff!! And also for the background information. It's much clearer now why we have the scaledstat and how the test statistic is calculated. Best, Nadia Am 09.09.2009 um 13:57 schrieb Stephan Moratti: > Hi Eric y Nadia, > > Ok, I have made a test of depsamplesF comparing results of > depsamplesF and > SPSS. I get the same results. I used data from an experiment and > chose a > timepoint and one channel that were indicated to be significant by > dempsamplesF. In the attached TEST_dempsamplesF.mat file it is > "testmat" > (24 subjects 3 conditions). The variable "dat" is the reshaped > "testmat". The > structure "s" contains the results of depsamplesF. I added the > variable > scaledstat as the field "F" to "s" as it is the F value. The attached > file "SPSSoutput.bmg" is a screen shot of the SPSS output entering > testmat in > a MANOVA. The results are the same: > F(2, 22) = 6.627, p = 0.006 > > We can also calculate Wilk's lambda from T^2 (see page 232 formula > 5-13 of > the Johnson 1998 edition) as: > > lambda = 1/(1 + s.stat/(24-1)); > > and get 0.624, the same as in SPSS. Maybe, as people are more used > to F > values, it would be useful to have the F(scaledstat) value also in > the "s" > structure (and later after using timelockstats or freqstats to have > a matrix > containing the F values besides the T^2 values). > > Thanks for implementing that great stuff in fieldtrip and making it > accessible > for all users ! > > Best, > > Stephan > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From filip.vanopstal at UGENT.BE Wed Sep 9 17:34:42 2009 From: filip.vanopstal at UGENT.BE (Filip Van Opstal) Date: Wed, 9 Sep 2009 17:34:42 +0200 Subject: coherence computation Message-ID: Hi all, I am trying to compute the coherence between my ECG ICA components and the ECG. Following the tutorial I compute a frequency decomposition of all the components and the ECG and use this to calculate the coherence with freqdescriptives. In the output of freqdesriptives, however, I don't observe the coherence spectrum (only the powspctrm is present). I am using the Neuromag system, running the analysis on the gradiometers only. All suggestions are highly appreciated! Thanks, Filip ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From boninc at NINDS.NIH.GOV Wed Sep 9 18:26:00 2009 From: boninc at NINDS.NIH.GOV (Bonin, Claudia (NIH/NINDS) [F]) Date: Wed, 9 Sep 2009 12:26:00 -0400 Subject: freqstastics script Message-ID: I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. thanks! claudia >> cfg.statistic = 'kruskalwallis'; >> cfg.method = 'stats'; >> [s] = freqstatistics(cfg, fr, fr); averaging over 3 channels selected 50 time bins selected 41 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip/private/prepare_timefreq_data at 305 In fieldtrip/private/statistics_wrapper at 167 In freqstatistics at 44 ??? Undefined function or method 'neighbourselection' for input arguments of type 'struct'. Error in ==> statistics_wrapper at 181 cfg = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 44 [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From manish.saggar at GMAIL.COM Wed Sep 9 18:56:36 2009 From: manish.saggar at GMAIL.COM (Manish Saggar) Date: Wed, 9 Sep 2009 11:56:36 -0500 Subject: Clusterplot not highlighting clusters & average layout file In-Reply-To: Message-ID: Dear All, I am a novice user of FieldTrip and I love the tools provided by you guys. Great work. I have a question, regarding the analysis I recently did. Any help is appreciated. I am confused why the cluster is not mapped on the areas that visually show clear reduction. I am comparing two conditions (with-in subjects) using depSamplesT statistic. Both of the conditions are 1 min of EEG data and I calculate powerspectrum over those 1 min windows using segment of 1 second windows with 50% overlap. Condition are named as pre and post. I have attached topoplotER of power spectrum for each condition in alpha band (8-12Hz). Clearly in post there is reduced power in left (mainly) and right hemispheres at the back of the head as compared to pre. However in the clusterplot (raweffect) the cluster is mainly situated in midline frontal and parietal areas. Actually it is quite a large cluster, covering almost all channels. The thing that worries me is that it just didn't cover the the channels which clearly shows difference by visual inspection between two conditions. Also shouldn't the cluster be located only (or mainly) where the difference can be seen in pre and post topoplots. For convenience I have plotted all plots with same zlim. Here is the code that I used for running stats: -------        cfg = [];        cfg.channel          = {'all'};        cfg.latency          = 'all';        cfg.frequency        = foi;        cfg.method           = 'montecarlo';        cfg.statistic        = depsamplesT;        cfg.correctm         = 'cluster';        cfg.clusteralpha     = 0.05;        cfg.clusterstatistic = 'maxsum';        cfg.minnbchan        = 2;   %works best.        cfg.tail             = 0;        cfg.clustertail      = 0;        cfg.alpha            = 0.025;        cfg.numrandomization = 1000;        subj = 28;        design = zeros(2,2*subj);        for i = 1:1:subj           design(1,i) = i;           design(1,subj+i) = i;        end        design(2,1:subj) = 1;        design(2,subj+1:2*subj) = 2;        cfg.design = design;        cfg.uvar = 1;        cfg.ivar = 2;        cfg.layout = 'ng.sfp';        cfg.neighbourdist = 0.1; % this gives the neighbor count on average to 3.2        cfg.avgoverfreq = 'yes';        stat{win} = freqstatistics(cfg, post, pre); ---------- Regards, Manish ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: pre-post-alpha-diff.tiff Type: image/tiff Size: 203224 bytes Desc: not available URL: From moritzgw at TUEBINGEN.MPG.DE Wed Sep 9 18:57:59 2009 From: moritzgw at TUEBINGEN.MPG.DE (Moritz Grosse-Wentrup) Date: Wed, 9 Sep 2009 18:57:59 +0200 Subject: Call for Contributions: NIPS 2009 Workshop on Connectivity Inference in Neuroimaging Message-ID: ---------------------- CALL FOR CONTRIBUTIONS ---------------------- *NIPS 2009 WORKSHOP ON CONNECTIVITY INFERENCE IN NEUROIMAGING* *Webpage* http://cini2009.kyb.tuebingen.mpg.de *Workshop description* Over the past decade, brain connectivity has become a central theme in the neuroimaging community. At the same time, causal inference has recently emerged as a major research topic in machine learning. Even though the two research questions are closely related, interactions between the neuroimaging and machine-learning communities have been limited. The aim of this workshop is to initiate productive interactions between neuroimaging and machine learning by introducing the workshop audience to the different concepts of connectivity/causal inference employed in each of the communities. Special emphasis is placed on discussing commonalities as well as distinctions between various approaches in the context of neuroimaging. Due to the increasing relevance of brain connectivity for analyzing mental states, we also highly welcome contributions discussing applications of brain connectivity measures to real-world problems such as brain-computer interfacing or mental state monitoring. *Topics* We solicit contributions on new approaches to connectivity and/or causal inference for neuroimaging data as well as on applications of connectivity inference to real-world problems. Contributions might address, but are not limited to, the following topics: * Effective connectivity & causal inference o Dynamic causal modelling o Granger causality o Structural equation models o Causal Bayesian networks o Non-Gaussian linear causal models o Causal additive noise models * Functional connectivity o Canonical correlation analysis o Phase-locking o Imaginary coherence o Independent component analysis * Applications of brain connectivity to real-world problems o Brain-computer interfaces o Mental state monitoring *Invited speakers* * Jean Daunizeau, University of Zurich & University College London * Rainer Goebel, Maastricht University * Scott Makeig, University of California San Diego *Workshop format* CINI 2009 is a one-day workshop at the Twenty-Third Annual Conference on Neural Information Processing Systems (NIPS 2009). Besides three invited talks, in which the audience will be introduced to current approaches for inferring connectivity in neuroimaging data, there will be several contributed talks and an evening poster session. Special emphasis will be placed on a balanced contribution of talks from the neuroimaging and machine learning communities. To foster interaction between communities, approximately 50% of workshop time is reserved for discussions. *Key dates* * Extended abstract submission deadline: October 9th, 2009, 5 pm (PT) * Notification of acceptance: October 23rd, 2009 * Workshop: December 11th or 12th, 2009 *Submission instructions* Please submit extended abstracts (maximum two pages) in either pdf or doc format through the CINI 2009 submission site at https://cmt.research.microsoft.com/CINI2009/. Upon notification of acceptance, authors will also be notified whether their contribution has been accepted as a contributed talk or poster. *Workshop location* Westin Resort and Spa / Hilton Whistler Resort and Spa Whistler, B.C., Canada *Organization committee* * Moritz Grosse-Wentrup (primary contact), MPI for Biological Cybernetics, Tuebingen * Uta Noppeney, MPI for Biological Cybernetics, Tuebingen * Karl Friston, University College London * Bernhard Schoelkopf, MPI for Biological Cybernetics, Tuebingen *Program committee* * Olivier David, Institut National de la Sante et de la Recherche Medicale, Grenoble * Justin Dauwels, Massachusetts Institute of Technology, Cambridge * Michael Eichler, Maastricht University * Jeremy Hill, Max Planck Institute for Biological Cybernetics, Tuebingen * Guido Nolte, Fraunhofer FIRST, Berlin * Will Penny, University College London * Alard Roebroeck, Maastricht University * Klaas Enno Stephan, University of Zurich * Ryota Tomioka, University of Tokyo * Pedro Valdes-Sosa, Cuban Neuroscience Center, Havana ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE Thu Sep 10 11:37:53 2009 From: Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE (Hanneke van Dijk) Date: Thu, 10 Sep 2009 11:37:53 +0200 Subject: source localization neuromag 122 system. Message-ID: Dear all, At the moment I am using the MNE toolbox and Fieldtrip to localize an alpha source (1.5 seconds spontaneous data recorded with a Neuromag 122 system). With data from the new 306 channel system it seems to work out well. However with data from the old system the source ends up in the cerebellum (attached a picture of Neural Activity index, cfg.lambda = '10%'). Of course it should be in the parieto-occipital cortex or the sensorimotor cortex. I have the feeling there is problem with the position of the gradiometers relative to the headmodel or the other way around. The head model seems to be too far away from the sensors (see attached headmodel1), if my hunch is correct I don't know how to fix this or where exactly I can find the problem. How I made the headmodel you can find on: http://fieldtrip.fcdonders.nl/example/read_neuromag_mri_and_create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space I'm constructing the grad files (to do sourceanalysis with) seperately using read_header and mne2grad (with orig.chs(n).coil_type=2, because the coil_type is 2 for the old system). Another related question: in mne2grad on line 104 and 108 it says 104 >> grad.pnt(kCoil,:)=100*(t(1:3,4)-0.008*t(1:3,1)); % multiply with 100 to get cm ..... 108 >> grad.pnt(kCoil,:)=100*(t(1:3,4)+0.008*t(1:3,1)); Where does this 0.008 come from? I have changed this number to try it out but did't see any clear differences in the gradiometer positions. Thanks in advance for your help, Wishing you all the best, Hanneke ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: headmodel1.jpeg Type: image/jpeg Size: 62529 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: alphasource.jpeg Type: image/jpeg Size: 86762 bytes Desc: not available URL: From Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE Thu Sep 10 13:21:59 2009 From: Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE (Hanneke Van Dijk) Date: Thu, 10 Sep 2009 13:21:59 +0200 Subject: AW: [FIELDTRIP] freqstastics script Message-ID: Dear Claudia, Normally when matlab says 'undefined function for input of type ....' it means it cannot find the specific function in the paths you have defined. You can check whether neighbourselection.m is in your fieldtrip folder, if not I have attached it (version 20090428) so you can put it there. If this doesn't fix it please let me know! Groetjes Hanneke -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) [F] Gesendet: Mi 09.09.2009 18:26 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] freqstastics script I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. thanks! claudia >> cfg.statistic = 'kruskalwallis'; >> cfg.method = 'stats'; >> [s] = freqstatistics(cfg, fr, fr); averaging over 3 channels selected 50 time bins selected 41 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip/private/prepare_timefreq_data at 305 In fieldtrip/private/statistics_wrapper at 167 In freqstatistics at 44 ??? Undefined function or method 'neighbourselection' for input arguments of type 'struct'. Error in ==> statistics_wrapper at 181 cfg = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 44 [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE Thu Sep 10 13:31:52 2009 From: Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE (Hanneke Van Dijk) Date: Thu, 10 Sep 2009 13:31:52 +0200 Subject: freqstastics script Message-ID: Dear Claudia, Sorry the attachnment didn't stick... Yours, Hanneke -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Hanneke Van Dijk Gesendet: Do 10.09.2009 13:21 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script Dear Claudia, Normally when matlab says 'undefined function for input of type ....' it means it cannot find the specific function in the paths you have defined. You can check whether neighbourselection.m is in your fieldtrip folder, if not I have attached it (version 20090428) so you can put it there. If this doesn't fix it please let me know! Groetjes Hanneke -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) [F] Gesendet: Mi 09.09.2009 18:26 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] freqstastics script I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. thanks! claudia >> cfg.statistic = 'kruskalwallis'; >> cfg.method = 'stats'; >> [s] = freqstatistics(cfg, fr, fr); averaging over 3 channels selected 50 time bins selected 41 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip/private/prepare_timefreq_data at 305 In fieldtrip/private/statistics_wrapper at 167 In freqstatistics at 44 ??? Undefined function or method 'neighbourselection' for input arguments of type 'struct'. Error in ==> statistics_wrapper at 181 cfg = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 44 [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE Thu Sep 10 13:34:23 2009 From: Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE (Hanneke van Dijk) Date: Thu, 10 Sep 2009 13:34:23 +0200 Subject: freqstastics script In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B0F34B4@Mail2-UKD.VMED.UKD> Message-ID: ....... Yours Hanneke On Thu, Sep 10, 2009 at 1:31 PM, Hanneke Van Dijk < Hanneke.vanDijk at med.uni-duesseldorf.de> wrote: > Dear Claudia, > > Sorry the attachnment didn't stick... > > Yours, > > Hanneke > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Hanneke Van Dijk > Gesendet: Do 10.09.2009 13:21 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script > > Dear Claudia, > > Normally when matlab says 'undefined function for input of type ....' it > means it cannot find the specific function in the paths you have defined. > You can check whether neighbourselection.m is in your fieldtrip folder, if > not I have attached it (version 20090428) so you can put it there. If this > doesn't fix it please let me know! > > Groetjes Hanneke > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) > [F] > Gesendet: Mi 09.09.2009 18:26 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] freqstastics script > > I am trying to do statistics on time-frequency data across 16 subjects, > averaging over channels. I received back the following error about > 'neighbourselection' which means nothing to me.....Does anyone have any idea > what might be wrong here? I have pasted in the exact message below. > thanks! > claudia > > > >> cfg.statistic = 'kruskalwallis'; > >> cfg.method = 'stats'; > >> [s] = freqstatistics(cfg, fr, fr); > averaging over 3 channels > selected 50 time bins > selected 41 frequency bins > Warning: PACK can only be used from the MATLAB command line. > > In fieldtrip/private/prepare_timefreq_data at 305 > In fieldtrip/private/statistics_wrapper at 167 > In freqstatistics at 44 > ??? Undefined function or method 'neighbourselection' for input arguments > of type > 'struct'. > > Error in ==> statistics_wrapper at 181 > cfg = neighbourselection(cfg,varargin{1}); > > Error in ==> freqstatistics at 44 > [stat] = statistics_wrapper(cfg, varargin{:}); > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: neighbourselection.m Type: application/octet-stream Size: 6816 bytes Desc: not available URL: From j.gross at PSY.GLA.AC.UK Thu Sep 10 14:34:43 2009 From: j.gross at PSY.GLA.AC.UK (Joachim Gross) Date: Thu, 10 Sep 2009 13:34:43 +0100 Subject: source localization neuromag 122 system. In-Reply-To: Message-ID: Dear Hanneke, I assume that t(1:3,4) is the center of the figure of 8 coil (the crossing point). Adding or subtracting 0.008 along the correct dimension seems to be necessary to arrive at the center of each of the two loops that make up the planar gradiometer. Joachim On 10 Sep 2009, at 10:37, Hanneke van Dijk wrote: > Dear all, > > At the moment I am using the MNE toolbox and Fieldtrip to localize > an alpha source (1.5 seconds spontaneous data recorded with a > Neuromag 122 system). > > With data from the new 306 channel system it seems to work out well. > However with data from the old system the source ends up in the > cerebellum (attached a picture of Neural Activity index, cfg.lambda > = '10%'). Of course it should be in the parieto-occipital cortex or > the sensorimotor cortex. I have the feeling there is problem with > the position of the gradiometers relative to the headmodel or the > other way around. The head model seems to be too far away from the > sensors (see attached headmodel1), if my hunch is correct I don't > know how to fix this or where exactly I can find the problem. > > How I made the headmodel you can find on: > http://fieldtrip.fcdonders.nl/example/read_neuromag_mri_and_create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > I'm constructing the grad files (to do sourceanalysis with) > seperately using read_header and mne2grad (with > orig.chs(n).coil_type=2, because the coil_type is 2 for the old > system). > > Another related question: in mne2grad on line 104 and 108 it says > > 104 >> grad.pnt(kCoil,:)=100*(t(1:3,4)-0.008*t(1:3,1)); % > multiply with 100 to get cm > ..... > 108 >> grad.pnt(kCoil,:)=100*(t(1:3,4)+0.008*t(1:3,1)); > > Where does this 0.008 come from? I have changed this number to try > it out but did't see any clear differences in the gradiometer > positions. > > Thanks in advance for your help, > Wishing you all the best, > > Hanneke > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fab.meneghini at GMAIL.COM Tue Sep 15 23:41:36 2009 From: fab.meneghini at GMAIL.COM (Fabio Meneghini) Date: Tue, 15 Sep 2009 23:41:36 +0200 Subject: EEG forward modelling using BEM Message-ID: Hi to all, Please help me, it took me a lot of trials and troubles to avoid annoying people with (possibly) trivial issues....but eventually I don't know what else remains to try... I'm new using FieldTrip, and I'm mainly interested in computing the EEG forward model on a standard MNI head model (MNI152, the one you can find in FSL software package), using BEM algorithm on 3, or better 4 surfaces. First of all: has anyone ever done this before? If so, this might save me a lot of hard times... I read the the tutorial about building BEM meshes models, but let's suppose I already have my model segmentation image (182x217x182 voxels, filled with integers numbers). Can I start from that, ignoring the original MRI images? I got my eeg channels coordinates. Are they supposed to be expressed in mm, rather than meters? What is the origin of the coordinates intended to be? And what about the conductivities of the various compartments? where can I set them? Waiting for some light in the dark, thank you for your attention. best, Fabio Meneghini ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From fab.meneghini at GMAIL.COM Wed Sep 16 00:10:00 2009 From: fab.meneghini at GMAIL.COM (Fabio Meneghini) Date: Wed, 16 Sep 2009 00:10:00 +0200 Subject: loading BEMs and segmented images Message-ID: Hi Gustavo, I'm currently facing the same problem. Did you manage to resolve it? We may help each other? cheers, Fabio Meneghini ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From boninc at NINDS.NIH.GOV Wed Sep 16 19:05:41 2009 From: boninc at NINDS.NIH.GOV (Bonin, Claudia (NIH/NINDS) [F]) Date: Wed, 16 Sep 2009 13:05:41 -0400 Subject: freqstastics script In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B0F34B3@Mail2-UKD.VMED.UKD> Message-ID: Hi. I am having trouble getting a freqstastics script to run to do a Kruskalwallis test. Thre freqgrandaverage works but I am having trouble with the arguments for the Kruskalwallis. I have pasted in the script and the error message in this email. Has anyone written a script using freqsstatistics to do Kruskalwallis? I would love to see it or get some direction on the arguments that need to be assigned....Also I made up an argument for cfg.design but I don't really understand what this assignment is. Could anyone elaborate? Thank you! claudia Bonin here's the error message isnan(data.time) ??? Undefined function or method 'isnan' for input arguments of type 'cell'. computing average power over 21 subjects Warning: discarding gradiometer information > In freqgrandaverage at 121 In tf2_virt_all_plot at 11 here's the script..... Nsubj = 21; for subj = 1:Nsubj fname = ['/home/boninc/tfresults/subj' 64 + subj]; clear fr load(fname); frs(subj) = fr; end cfg = []; [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); %cfg = []; %cfg.alpha = .05; %cfg.method = 'stats'; %cfg.design = 1:21; %cfg.statistic = 'kruskalwallis'; %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); clf contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar %contourf(gr.time, gr.freq, gr.powspctrm); colorbar title '21 Subjects, RandL, RIGHT Central Motor' xlabel 'time, sec' ylabel 'frequency, Hz' ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] Sent: Thursday, September 10, 2009 7:21 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script Dear Claudia, Normally when matlab says 'undefined function for input of type ....' it means it cannot find the specific function in the paths you have defined. You can check whether neighbourselection.m is in your fieldtrip folder, if not I have attached it (version 20090428) so you can put it there. If this doesn't fix it please let me know! Groetjes Hanneke -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) [F] Gesendet: Mi 09.09.2009 18:26 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] freqstastics script I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. thanks! claudia >> cfg.statistic = 'kruskalwallis'; >> cfg.method = 'stats'; >> [s] = freqstatistics(cfg, fr, fr); averaging over 3 channels selected 50 time bins selected 41 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip/private/prepare_timefreq_data at 305 In fieldtrip/private/statistics_wrapper at 167 In freqstatistics at 44 ??? Undefined function or method 'neighbourselection' for input arguments of type 'struct'. Error in ==> statistics_wrapper at 181 cfg = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 44 [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From P.Toffanin at RUG.NL Wed Sep 16 22:27:54 2009 From: P.Toffanin at RUG.NL (P. Toffanin) Date: Wed, 16 Sep 2009 22:27:54 +0200 Subject: freqstastics script Message-ID: Dear Claudia, the first error message seems a 'matlab-related error', it does not have anything to do with fieldtrip, but just with the way you use matlab. Basically matlab is complaining because the function you are using is not defined to use cell types. I believe that data.time is probably containing something like data.time = {1,2,3}; then, what you should do, is to use the function like this: isnan(data.time{:}) % this will show the content of data.time "ignoring" that it is a cell rather than isnan(data.time) % this will feed a cell to the isnan function, which uses arrays of numbers About the warning message you get I cannot help you with that one, I'm sorry. The best of luck! Paolo On 16/09/09, "Bonin, Claudia (NIH/NINDS) [F]" wrote: > > Hi. I am having trouble getting a freqstastics script to run to do a Kruskalwallis test. Thre freqgrandaverage works but I am having trouble with the arguments for the Kruskalwallis. I have pasted in the script and the error message in this email.  Has anyone written a script using freqsstatistics to do Kruskalwallis? I would love to see it or get some direction on the arguments that need to be assigned....Also I made up an argument for cfg.design but I don't really understand what this assignment is. Could anyone elaborate? > Thank you! > claudia Bonin > > > > > > here's the error message > >  isnan(data.time) > ??? Undefined function or method 'isnan' for input arguments of type 'cell'. >   > computing average power over 21 subjects > Warning: discarding gradiometer information > > In freqgrandaverage at 121 >   In tf2_virt_all_plot at 11 > > here's the script..... > > > Nsubj = 21; > > for subj = 1:Nsubj >     fname = ['/home/boninc/tfresults/subj' 64 + subj]; >     clear fr >     load(fname); >     frs(subj) = fr; > end > > cfg = []; > [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); > > %cfg = []; > %cfg.alpha = .05; > %cfg.method = 'stats'; > %cfg.design = 1:21; > %cfg.statistic = 'kruskalwallis'; > %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); > > clf > contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar > %contourf(gr.time, gr.freq, gr.powspctrm); colorbar > > title '21 Subjects, RandL, RIGHT Central Motor' > xlabel 'time, sec' > ylabel 'frequency, Hz' > > > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] > Sent: Thursday, September 10, 2009 7:21 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script > > Dear Claudia, > > Normally when matlab says 'undefined function for input of type ....' it means it cannot find the specific function in the paths you have defined. You can check whether neighbourselection.m is in your fieldtrip folder, if not I have attached it (version 20090428) so you can put it there. If this doesn't fix it please let me know! > > Groetjes Hanneke > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) [F] > Gesendet: Mi 09.09.2009 18:26 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] freqstastics script > > I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. > thanks! > claudia > > > >> cfg.statistic = 'kruskalwallis'; > >> cfg.method = 'stats'; > >> [s] = freqstatistics(cfg, fr, fr); > averaging over 3 channels > selected 50 time bins > selected 41 frequency bins > Warning: PACK can only be used from the MATLAB command line. > > In fieldtrip/private/prepare_timefreq_data at 305 >   In fieldtrip/private/statistics_wrapper at 167 >   In freqstatistics at 44 > ??? Undefined function or method 'neighbourselection' for input arguments of type > 'struct'. > > Error in ==> statistics_wrapper at 181 >     cfg = neighbourselection(cfg,varargin{1}); > > Error in ==> freqstatistics at 44 > [stat] = statistics_wrapper(cfg, varargin{:}); > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html (http://listserv.surfnet.nl/archives/fieldtrip.html) and http://www.ru.nl/neuroimaging/fieldtrip. (http://www.ru.nl/neuroimaging/fieldtrip.) > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html (http://listserv.surfnet.nl/archives/fieldtrip.html) and http://www.ru.nl/neuroimaging/fieldtrip. (http://www.ru.nl/neuroimaging/fieldtrip.) > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html (http://listserv.surfnet.nl/archives/fieldtrip.html) and http://www.ru.nl/neuroimaging/fieldtrip. (http://www.ru.nl/neuroimaging/fieldtrip.) > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.piantoni at NIN.KNAW.NL Thu Sep 17 13:28:02 2009 From: g.piantoni at NIN.KNAW.NL (Giovanni Piantoni) Date: Thu, 17 Sep 2009 13:28:02 +0200 Subject: amplitude modulation on planar MEG Message-ID: Dear Fieldtrip users, I do not know how to find the time points in which the amplitude in a frequency band (say, alpha, 8-12 Hz) is higher than a threshold. I am using axial (CTF) MEG data, but I want to find the amplitude modulation on the planar gradient (as it makes more physiological sense). On EEG data, I would 1_ bandpass the data between 8-12 Hz, 2_ take the envelope (f.e. with a hilbert transform), 3_ find all the time points that are above the threshold. On MEG data, I do not know what to do, considering that I cannot really bandpass planar data, as they are always positive. Which option is the best? 1_ bandpass on axial, then megplanar, combineplanar and take envelope on the combined planar, and then find the time points above the threshold. 2_ bandpass on axial, then megplanar, and take the envelope for the two components and use those to determine when the amplitude is above the threshold (but how can I combine the two then?) Or any other option? I am very confused about this issue. Any help is greatly appreciated! Thanks, Giovanni ------ Giovanni Piantoni, Ph.D. student Dept. Sleep & Cognition Netherlands Institute for Neuroscience Meibergdreef 47 1105 BA Amsterdam (NL) +31 (0)20 5665492 g.piantoni at nin.knaw.nl www.nin.knaw.nl/research_teams/van_someren_group ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From boninc at NINDS.NIH.GOV Thu Sep 17 16:59:03 2009 From: boninc at NINDS.NIH.GOV (Bonin, Claudia (NIH/NINDS) [F]) Date: Thu, 17 Sep 2009 10:59:03 -0400 Subject: freqstastics script In-Reply-To: <7390d1b5338b.4ab1666a@rug.nl> Message-ID: Hi everyone. I am trying to use Fieldtrip and the function freqstatistics to run the kruskalwallis test across subjects after doing the grandaverage. The grandaverage works but I am confused about some of the arguments for the freqstatistics function. I have pasted in the lines from my script below. I am particularly wondering if anyone has used this successfully before and if so what is the cfg.design command asking for and am I missing any other command/inputs for the kruskalwallis/freqstatistics function? Any comments would be much appreciated. claudia bonin [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); %cfg = []; %cfg.alpha = .05; %cfg.method = 'stats'; %cfg.design = 1:21; %cfg.statistic = 'kruskalwallis'; %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of P. Toffanin [P.Toffanin at RUG.NL] Sent: Wednesday, September 16, 2009 4:27 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] freqstastics script Dear Claudia, the first error message seems a 'matlab-related error', it does not have anything to do with fieldtrip, but just with the way you use matlab. Basically matlab is complaining because the function you are using is not defined to use cell types. I believe that data.time is probably containing something like data.time = {1,2,3}; then, what you should do, is to use the function like this: isnan(data.time{:}) % this will show the content of data.time "ignoring" that it is a cell rather than isnan(data.time) % this will feed a cell to the isnan function, which uses arrays of numbers About the warning message you get I cannot help you with that one, I'm sorry. The best of luck! Paolo On 16/09/09, "Bonin, Claudia (NIH/NINDS) [F]" wrote: Hi. I am having trouble getting a freqstastics script to run to do a Kruskalwallis test. Thre freqgrandaverage works but I am having trouble with the arguments for the Kruskalwallis. I have pasted in the script and the error message in this email. Has anyone written a script using freqsstatistics to do Kruskalwallis? I would love to see it or get some direction on the arguments that need to be assigned....Also I made up an argument for cfg.design but I don't really understand what this assignment is. Could anyone elaborate? Thank you! claudia Bonin here's the error message isnan(data.time) ??? Undefined function or method 'isnan' for input arguments of type 'cell'. computing average power over 21 subjects Warning: discarding gradiometer information > In freqgrandaverage at 121 In tf2_virt_all_plot at 11 here's the script..... Nsubj = 21; for subj = 1:Nsubj fname = ['/home/boninc/tfresults/subj' 64 + subj]; clear fr load(fname); frs(subj) = fr; end cfg = []; [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); %cfg = []; %cfg.alpha = .05; %cfg.method = 'stats'; %cfg.design = 1:21; %cfg.statistic = 'kruskalwallis'; %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); clf contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar %contourf(gr.time, gr.freq, gr.powspctrm); colorbar title '21 Subjects, RandL, RIGHT Central Motor' xlabel 'time, sec' ylabel 'frequency, Hz' ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] Sent: Thursday, September 10, 2009 7:21 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script Dear Claudia, Normally when matlab says 'undefined function for input of type ....' it means it cannot find the specific function in the paths you have defined. You can check whether neighbourselection.m is in your fieldtrip folder, if not I have attached it (version 20090428) so you can put it there. If this doesn't fix it please let me know! Groetjes Hanneke -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) [F] Gesendet: Mi 09.09.2009 18:26 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] freqstastics script I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. thanks! claudia >> cfg.statistic = 'kruskalwallis'; >> cfg.method = 'stats'; >> [s] = freqstatistics(cfg, fr, fr); averaging over 3 channels selected 50 time bins selected 41 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip/private/prepare_timefreq_data at 305 In fieldtrip/private/statistics_wrapper at 167 In freqstatistics at 44 ??? Undefined function or method 'neighbourselection' for input arguments of type 'struct'. Error in ==> statistics_wrapper at 181 cfg = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 44 [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From boninc at NINDS.NIH.GOV Fri Sep 18 21:15:55 2009 From: boninc at NINDS.NIH.GOV (Bonin, Claudia (NIH/NINDS) [F]) Date: Fri, 18 Sep 2009 15:15:55 -0400 Subject: freqstastics script In-Reply-To: <42BB71E278C5804494BA79D3B24B0A7F161DA99B@NIHMLBX10.nih.gov> Message-ID: DOES ANYONE KNOW HOW TO USE THE FIELDTRIP FUNCTION FREQSTATISTICS TO RUN A KRUSKALWALLIS TEST? -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Bonin, Claudia (NIH/NINDS) [F] Sent: Wednesday, September 16, 2009 1:06 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] freqstastics script Hi. I am having trouble getting a freqstastics script to run to do a Kruskalwallis test. Thre freqgrandaverage works but I am having trouble with the arguments for the Kruskalwallis. I have pasted in the script and the error message in this email. Has anyone written a script using freqsstatistics to do Kruskalwallis? I would love to see it or get some direction on the arguments that need to be assigned....Also I made up an argument for cfg.design but I don't really understand what this assignment is. Could anyone elaborate? Thank you! claudia Bonin here's the error message isnan(data.time) ??? Undefined function or method 'isnan' for input arguments of type 'cell'. computing average power over 21 subjects Warning: discarding gradiometer information > In freqgrandaverage at 121 In tf2_virt_all_plot at 11 here's the script..... Nsubj = 21; for subj = 1:Nsubj fname = ['/home/boninc/tfresults/subj' 64 + subj]; clear fr load(fname); frs(subj) = fr; end cfg = []; [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); %cfg = []; %cfg.alpha = .05; %cfg.method = 'stats'; %cfg.design = 1:21; %cfg.statistic = 'kruskalwallis'; %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); clf contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar %contourf(gr.time, gr.freq, gr.powspctrm); colorbar title '21 Subjects, RandL, RIGHT Central Motor' xlabel 'time, sec' ylabel 'frequency, Hz' ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] Sent: Thursday, September 10, 2009 7:21 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script Dear Claudia, Normally when matlab says 'undefined function for input of type ....' it means it cannot find the specific function in the paths you have defined. You can check whether neighbourselection.m is in your fieldtrip folder, if not I have attached it (version 20090428) so you can put it there. If this doesn't fix it please let me know! Groetjes Hanneke -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) [F] Gesendet: Mi 09.09.2009 18:26 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] freqstastics script I am trying to do statistics on time-frequency data across 16 subjects, averaging over channels. I received back the following error about 'neighbourselection' which means nothing to me.....Does anyone have any idea what might be wrong here? I have pasted in the exact message below. thanks! claudia >> cfg.statistic = 'kruskalwallis'; >> cfg.method = 'stats'; >> [s] = freqstatistics(cfg, fr, fr); averaging over 3 channels selected 50 time bins selected 41 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip/private/prepare_timefreq_data at 305 In fieldtrip/private/statistics_wrapper at 167 In freqstatistics at 44 ??? Undefined function or method 'neighbourselection' for input arguments of type 'struct'. Error in ==> statistics_wrapper at 181 cfg = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 44 [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Sat Sep 19 10:56:08 2009 From: j.schoffelen at PSY.GLA.AC.UK (Jan-Mathijs Schoffelen) Date: Sat, 19 Sep 2009 08:56:08 +0000 Subject: freqstastics script In-Reply-To: <42BB71E278C5804494BA79D3B24B0A7F161AD42D@NIHMLBX10.nih.gov> Message-ID: You will have to write a statfun_kruskalwallis. Best, Jan-Mathijs On 18 Sep 2009, at 19:15, Bonin, Claudia (NIH/NINDS) [F] wrote: > DOES ANYONE KNOW HOW TO USE THE FIELDTRIP FUNCTION FREQSTATISTICS TO > RUN A KRUSKALWALLIS TEST? > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Bonin, Claudia (NIH/NINDS) [F] > Sent: Wednesday, September 16, 2009 1:06 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] freqstastics script > > Hi. I am having trouble getting a freqstastics script to run to do a > Kruskalwallis test. Thre freqgrandaverage works but I am having > trouble with the arguments for the Kruskalwallis. I have pasted in > the script and the error message in this email. Has anyone written > a script using freqsstatistics to do Kruskalwallis? I would love to > see it or get some direction on the arguments that need to be > assigned....Also I made up an argument for cfg.design but I don't > really understand what this assignment is. Could anyone elaborate? > Thank you! > claudia Bonin > > > > > > here's the error message > > isnan(data.time) > ??? Undefined function or method 'isnan' for input arguments of type > 'cell'. > > computing average power over 21 subjects > Warning: discarding gradiometer information >> In freqgrandaverage at 121 > In tf2_virt_all_plot at 11 > > here's the script..... > > > Nsubj = 21; > > for subj = 1:Nsubj > fname = ['/home/boninc/tfresults/subj' 64 + subj]; > clear fr > load(fname); > frs(subj) = fr; > end > > cfg = []; > [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), > frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), > frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), > frs(21)); > > %cfg = []; > %cfg.alpha = .05; > %cfg.method = 'stats'; > %cfg.design = 1:21; > %cfg.statistic = 'kruskalwallis'; > %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), > frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), > frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), > frs(20), frs(21)); > > clf > contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar > %contourf(gr.time, gr.freq, gr.powspctrm); colorbar > > title '21 Subjects, RandL, RIGHT Central Motor' > xlabel 'time, sec' > ylabel 'frequency, Hz' > > > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] > Sent: Thursday, September 10, 2009 7:21 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script > > Dear Claudia, > > Normally when matlab says 'undefined function for input of > type ....' it means it cannot find the specific function in the > paths you have defined. You can check whether neighbourselection.m > is in your fieldtrip folder, if not I have attached it (version > 20090428) so you can put it there. If this doesn't fix it please let > me know! > > Groetjes Hanneke > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/ > NINDS) [F] > Gesendet: Mi 09.09.2009 18:26 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] freqstastics script > > I am trying to do statistics on time-frequency data across 16 > subjects, averaging over channels. I received back the following > error about 'neighbourselection' which means nothing to me.....Does > anyone have any idea what might be wrong here? I have pasted in the > exact message below. > thanks! > claudia > > >>> cfg.statistic = 'kruskalwallis'; >>> cfg.method = 'stats'; >>> [s] = freqstatistics(cfg, fr, fr); > averaging over 3 channels > selected 50 time bins > selected 41 frequency bins > Warning: PACK can only be used from the MATLAB command line. >> In fieldtrip/private/prepare_timefreq_data at 305 > In fieldtrip/private/statistics_wrapper at 167 > In freqstatistics at 44 > ??? Undefined function or method 'neighbourselection' for input > arguments of type > 'struct'. > > Error in ==> statistics_wrapper at 181 > cfg = neighbourselection(cfg,varargin{1}); > > Error in ==> freqstatistics at 44 > [stat] = statistics_wrapper(cfg, varargin{:}); > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From boninc at NINDS.NIH.GOV Sat Sep 19 16:33:50 2009 From: boninc at NINDS.NIH.GOV (Bonin, Claudia (NIH/NINDS) [F]) Date: Sat, 19 Sep 2009 10:33:50 -0400 Subject: freqstastics script In-Reply-To: <1C4AF3D4-BC7B-402A-BFB3-140950BB560F@psy.gla.ac.uk> Message-ID: I'm just surprised no one has written one before. MEG data generally requires non-parametric statistics and the kruskalwallis test for freqstatistics was the only option I found for this in fieldtrip. Am I right about this? -----Original Message----- From: Jan-Mathijs Schoffelen [mailto:j.schoffelen at PSY.GLA.AC.UK] Sent: Saturday, September 19, 2009 4:56 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] freqstastics script You will have to write a statfun_kruskalwallis. Best, Jan-Mathijs On 18 Sep 2009, at 19:15, Bonin, Claudia (NIH/NINDS) [F] wrote: > DOES ANYONE KNOW HOW TO USE THE FIELDTRIP FUNCTION FREQSTATISTICS TO > RUN A KRUSKALWALLIS TEST? > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Bonin, Claudia (NIH/NINDS) [F] > Sent: Wednesday, September 16, 2009 1:06 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] freqstastics script > > Hi. I am having trouble getting a freqstastics script to run to do a > Kruskalwallis test. Thre freqgrandaverage works but I am having > trouble with the arguments for the Kruskalwallis. I have pasted in > the script and the error message in this email. Has anyone written > a script using freqsstatistics to do Kruskalwallis? I would love to > see it or get some direction on the arguments that need to be > assigned....Also I made up an argument for cfg.design but I don't > really understand what this assignment is. Could anyone elaborate? > Thank you! > claudia Bonin > > > > > > here's the error message > > isnan(data.time) > ??? Undefined function or method 'isnan' for input arguments of type > 'cell'. > > computing average power over 21 subjects > Warning: discarding gradiometer information >> In freqgrandaverage at 121 > In tf2_virt_all_plot at 11 > > here's the script..... > > > Nsubj = 21; > > for subj = 1:Nsubj > fname = ['/home/boninc/tfresults/subj' 64 + subj]; > clear fr > load(fname); > frs(subj) = fr; > end > > cfg = []; > [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), > frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), > frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), > frs(21)); > > %cfg = []; > %cfg.alpha = .05; > %cfg.method = 'stats'; > %cfg.design = 1:21; > %cfg.statistic = 'kruskalwallis'; > %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), > frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), > frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), > frs(20), frs(21)); > > clf > contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar > %contourf(gr.time, gr.freq, gr.powspctrm); colorbar > > title '21 Subjects, RandL, RIGHT Central Motor' > xlabel 'time, sec' > ylabel 'frequency, Hz' > > > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] > Sent: Thursday, September 10, 2009 7:21 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script > > Dear Claudia, > > Normally when matlab says 'undefined function for input of > type ....' it means it cannot find the specific function in the > paths you have defined. You can check whether neighbourselection.m > is in your fieldtrip folder, if not I have attached it (version > 20090428) so you can put it there. If this doesn't fix it please let > me know! > > Groetjes Hanneke > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/ > NINDS) [F] > Gesendet: Mi 09.09.2009 18:26 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] freqstastics script > > I am trying to do statistics on time-frequency data across 16 > subjects, averaging over channels. I received back the following > error about 'neighbourselection' which means nothing to me.....Does > anyone have any idea what might be wrong here? I have pasted in the > exact message below. > thanks! > claudia > > >>> cfg.statistic = 'kruskalwallis'; >>> cfg.method = 'stats'; >>> [s] = freqstatistics(cfg, fr, fr); > averaging over 3 channels > selected 50 time bins > selected 41 frequency bins > Warning: PACK can only be used from the MATLAB command line. >> In fieldtrip/private/prepare_timefreq_data at 305 > In fieldtrip/private/statistics_wrapper at 167 > In freqstatistics at 44 > ??? Undefined function or method 'neighbourselection' for input > arguments of type > 'struct'. > > Error in ==> statistics_wrapper at 181 > cfg = neighbourselection(cfg,varargin{1}); > > Error in ==> freqstatistics at 44 > [stat] = statistics_wrapper(cfg, varargin{:}); > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From manish.saggar at GMAIL.COM Sat Sep 19 18:01:41 2009 From: manish.saggar at GMAIL.COM (Manish Saggar) Date: Sat, 19 Sep 2009 11:01:41 -0500 Subject: [HELP] Clusterplot not highlighting clusters Message-ID: All, Any help is appreciated. Please let me know if I am doing any mistake. Original email is below. Regards, Manish On Wed, Sep 9, 2009 at 11:56 AM, Manish Saggar wrote: > Dear All, > > I am a novice user of FieldTrip and I love the tools provided by you > guys. Great work. > > I have a question, regarding the analysis I recently did. Any help is > appreciated. I am confused why the cluster is not mapped on the areas > that visually show clear reduction. > > I am comparing two conditions (with-in subjects) using depSamplesT > statistic. Both of the conditions are 1 min of EEG data and I > calculate powerspectrum over those 1 min windows using segment of 1 > second windows with 50% overlap. Condition are named as pre and post. > > I have attached topoplotER of power spectrum for each condition in > alpha band (8-12Hz). Clearly in post there is reduced power in left > (mainly) and right hemispheres at the back of the head as compared to > pre. However in the clusterplot (raweffect) the cluster is mainly > situated in midline frontal and parietal areas. Actually it is quite a > large cluster, covering almost all channels. The thing that worries me > is that it just didn't cover the the channels which clearly shows > difference by visual inspection between two conditions. > Also shouldn't the cluster be located only (or mainly) where the > difference can be seen in pre and post topoplots. > > For convenience I have plotted all plots with same zlim. > > Here is the code that I used for running stats: > ------- >        cfg = []; >        cfg.channel          = {'all'}; >        cfg.latency          = 'all'; >        cfg.frequency        = foi; >        cfg.method           = 'montecarlo'; >        cfg.statistic        = depsamplesT; >        cfg.correctm         = 'cluster'; >        cfg.clusteralpha     = 0.05; >        cfg.clusterstatistic = 'maxsum'; >        cfg.minnbchan        = 2;   %works best. >        cfg.tail             = 0; >        cfg.clustertail      = 0; >        cfg.alpha            = 0.025; >        cfg.numrandomization = 1000; > >        subj = 28; > >        design = zeros(2,2*subj); >        for i = 1:1:subj >           design(1,i) = i; >           design(1,subj+i) = i; >        end >        design(2,1:subj) = 1; >        design(2,subj+1:2*subj) = 2; >        cfg.design = design; >        cfg.uvar = 1; >        cfg.ivar = 2; >        cfg.layout = 'ng.sfp'; >        cfg.neighbourdist = 0.1; % this gives the neighbor count on > average to 3.2 >        cfg.avgoverfreq = 'yes'; >        stat{win} = freqstatistics(cfg, post, pre); > ---------- > > Regards, > Manish > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: pre-post-alpha-diff.tiff Type: image/tiff Size: 203224 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Sat Sep 19 22:26:40 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Sat, 19 Sep 2009 22:26:40 +0200 Subject: freqstastics script In-Reply-To: <42BB71E278C5804494BA79D3B24B0A7F161AD430@NIHMLBX10.nih.gov> Message-ID: Dear Claudia, > I'm just surprised no one has written one before. MEG data generally requires non- > parametric statistics and the kruskalwallis test for freqstatistics was the only option > I found for this in fieldtrip. Am I right about this? The story is a bit more complicated. One must make a distinction between a test statistic and its reference distribution (the distribution under which the p-value is calculated). Many users of Fieldtrip use it to do cluster-based permutation tests. These are non-parametric tests because the p-value is calculated under a non-parametric reference distribution. However, the test statistic for which this p-value is calculated often involves the classical test statistics like F and T, for which parametric reference distributions exist. These parametric reference distributions do not play role in the whether or not the cluster-based permutation tests control the false alarm rate. This argument allows one to do non-parametric testing with test statistics that are inspired by classical parametric statistics. This is all much better explained in Maris & Oostenveld (2007). Thus, the Kruskal-Wallis test statistic is not required if you want to use the non-parametric cluster-based permutation tests in Fieldtrip. I'm sorry if this sounds complicated. One just needs to go a little bit in the theory to get the ideas straight. Best, Eric Maris > > -----Original Message----- > From: Jan-Mathijs Schoffelen [mailto:j.schoffelen at PSY.GLA.AC.UK] > Sent: Saturday, September 19, 2009 4:56 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] freqstastics script > > You will have to write a statfun_kruskalwallis. > > Best, > > Jan-Mathijs > > > > On 18 Sep 2009, at 19:15, Bonin, Claudia (NIH/NINDS) [F] wrote: > > > DOES ANYONE KNOW HOW TO USE THE FIELDTRIP FUNCTION > FREQSTATISTICS TO > > RUN A KRUSKALWALLIS TEST? > > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Bonin, Claudia (NIH/NINDS) [F] > > Sent: Wednesday, September 16, 2009 1:06 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: Re: [FIELDTRIP] freqstastics script > > > > Hi. I am having trouble getting a freqstastics script to run to do a > > Kruskalwallis test. Thre freqgrandaverage works but I am having > > trouble with the arguments for the Kruskalwallis. I have pasted in > > the script and the error message in this email. Has anyone written > > a script using freqsstatistics to do Kruskalwallis? I would love to > > see it or get some direction on the arguments that need to be > > assigned....Also I made up an argument for cfg.design but I don't > > really understand what this assignment is. Could anyone elaborate? > > Thank you! > > claudia Bonin > > > > > > > > > > > > here's the error message > > > > isnan(data.time) > > ??? Undefined function or method 'isnan' for input arguments of type > > 'cell'. > > > > computing average power over 21 subjects > > Warning: discarding gradiometer information > >> In freqgrandaverage at 121 > > In tf2_virt_all_plot at 11 > > > > here's the script..... > > > > > > Nsubj = 21; > > > > for subj = 1:Nsubj > > fname = ['/home/boninc/tfresults/subj' 64 + subj]; > > clear fr > > load(fname); > > frs(subj) = fr; > > end > > > > cfg = []; > > [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), > > frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), > > frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), > > frs(21)); > > > > %cfg = []; > > %cfg.alpha = .05; > > %cfg.method = 'stats'; > > %cfg.design = 1:21; > > %cfg.statistic = 'kruskalwallis'; > > %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), > > frs(5), frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), > > frs(13), frs(14), frs(15), frs(16), frs(17), frs(18), frs(19), > > frs(20), frs(21)); > > > > clf > > contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar > > %contourf(gr.time, gr.freq, gr.powspctrm); colorbar > > > > title '21 Subjects, RandL, RIGHT Central Motor' > > xlabel 'time, sec' > > ylabel 'frequency, Hz' > > > > > > ________________________________________ > > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > > Of Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] > > Sent: Thursday, September 10, 2009 7:21 AM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script > > > > Dear Claudia, > > > > Normally when matlab says 'undefined function for input of > > type ....' it means it cannot find the specific function in the > > paths you have defined. You can check whether neighbourselection.m > > is in your fieldtrip folder, if not I have attached it (version > > 20090428) so you can put it there. If this doesn't fix it please let > > me know! > > > > Groetjes Hanneke > > > > > > -----Ursprüngliche Nachricht----- > > Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/ > > NINDS) [F] > > Gesendet: Mi 09.09.2009 18:26 > > An: FIELDTRIP at NIC.SURFNET.NL > > Betreff: [FIELDTRIP] freqstastics script > > > > I am trying to do statistics on time-frequency data across 16 > > subjects, averaging over channels. I received back the following > > error about 'neighbourselection' which means nothing to me.....Does > > anyone have any idea what might be wrong here? I have pasted in the > > exact message below. > > thanks! > > claudia > > > > > >>> cfg.statistic = 'kruskalwallis'; > >>> cfg.method = 'stats'; > >>> [s] = freqstatistics(cfg, fr, fr); > > averaging over 3 channels > > selected 50 time bins > > selected 41 frequency bins > > Warning: PACK can only be used from the MATLAB command line. > >> In fieldtrip/private/prepare_timefreq_data at 305 > > In fieldtrip/private/statistics_wrapper at 167 > > In freqstatistics at 44 > > ??? Undefined function or method 'neighbourselection' for input > > arguments of type > > 'struct'. > > > > Error in ==> statistics_wrapper at 181 > > cfg = neighbourselection(cfg,varargin{1}); > > > > Error in ==> freqstatistics at 44 > > [stat] = statistics_wrapper(cfg, varargin{:}); > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > > of the FieldTrip toolbox, to share experiences and to discuss new > > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html > > and http://www.ru.nl/neuroimaging/fieldtrip. > > > > > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > > of the FieldTrip toolbox, to share experiences and to discuss new > > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html > > and http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > > of the FieldTrip toolbox, to share experiences and to discuss new > > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html > > and http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > > of the FieldTrip toolbox, to share experiences and to discuss new > > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html > > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From tomh at KURAGE.NIMH.NIH.GOV Sat Sep 19 23:01:48 2009 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Sat, 19 Sep 2009 17:01:48 -0400 Subject: freqstastics script Message-ID: I think what Claudia is asking is, given some time-frequency data, and some groups of subjects, how does one use fieldtrip to do a statistical test? There is code in there, somebody must have done it before. One could export the TF grids to AFNI and use 3dWilcoxon or other tests .. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Sat Sep 19 23:30:09 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Sat, 19 Sep 2009 23:30:09 +0200 Subject: freqstastics script In-Reply-To: <200909192101.n8JL1mUK012092@kurage.nimh.nih.gov> Message-ID: Hi Tom and Claudia, > I think what Claudia is asking is, given some time-frequency data, and some > groups of subjects, how does one use fieldtrip to do a statistical test? > There is code in there, somebody must have done it before. OK, I may have misunderstood. I checked the Fieldtrip code, and the Kruskall-Wallis test can be chosen as an option in statistics_stats. This function is actually a wrapper that calls functions from the Matlab Statistics Toolbox. Do you have this toolbox Claudia? I don't know how thoroughly this function has been tested. Given that it's just a wrapper, it is probably easy to localize the error by using Matlab's debugging tools. Best, Eric > One could export the TF grids to AFNI and use 3dWilcoxon or > other tests .. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From tomh at KURAGE.NIMH.NIH.GOV Sat Sep 19 23:34:10 2009 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Sat, 19 Sep 2009 17:34:10 -0400 Subject: freqstastics script Message-ID: the cfg.design in particular, how would one set that up for a group of time-frequency plots? ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From hanneke.p.van.dijk at GMAIL.COM Wed Sep 23 09:10:12 2009 From: hanneke.p.van.dijk at GMAIL.COM (Hanneke van Dijk) Date: Wed, 23 Sep 2009 09:10:12 +0200 Subject: freqstastics script In-Reply-To: <42BB71E278C5804494BA79D3B24B0A7F161AD42D@NIHMLBX10.nih.gov> Message-ID: Hi Claudia, I think that if you want to do non-parametric tests using fieldtrip the cluster randomization statistics routines would help you a great deal. I think a lot of people using fieldtrip are using this method. You could have a look at this site: http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_freq and the paper: *Eric Maris, Robert Oostenveld, Nonparametric statistical testing of EEG- and MEG-data, Journal of Neuroscience Methods, Volume 164, Issue 1, 15 August 2007, Pages 177-190, ISSN 0165-0270, DOI: 10.1016/j.jneumeth.2007.03.024. (http://www.sciencedirect.com/science/article/B6T04-4NFXDDW-1/2/ebd219fd45cb52bf39c710fe25635040) Keywords: Nonparametric statistical testing; Hypothesis testing; EEG; MEG; Multiple comparisons problem* Also, this mailing list is not a help desk but is read by fellow researchers also using fieldtrip. And I would like to say that although it sometimes takes a little while before you get your answer, that is because everybody is busy and I am impressed and happy with the way everybody on this list is nice enough to take the time to help eachother! Best, Hanneke On Fri, Sep 18, 2009 at 9:15 PM, Bonin, Claudia (NIH/NINDS) [F] < boninc at ninds.nih.gov> wrote: > DOES ANYONE KNOW HOW TO USE THE FIELDTRIP FUNCTION FREQSTATISTICS TO RUN A > KRUSKALWALLIS TEST? > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Bonin, Claudia (NIH/NINDS) [F] > Sent: Wednesday, September 16, 2009 1:06 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] freqstastics script > > Hi. I am having trouble getting a freqstastics script to run to do a > Kruskalwallis test. Thre freqgrandaverage works but I am having trouble with > the arguments for the Kruskalwallis. I have pasted in the script and the > error message in this email. Has anyone written a script using > freqsstatistics to do Kruskalwallis? I would love to see it or get some > direction on the arguments that need to be assigned....Also I made up an > argument for cfg.design but I don't really understand what this assignment > is. Could anyone elaborate? > Thank you! > claudia Bonin > > > > > > here's the error message > > isnan(data.time) > ??? Undefined function or method 'isnan' for input arguments of type > 'cell'. > > computing average power over 21 subjects > Warning: discarding gradiometer information > > In freqgrandaverage at 121 > In tf2_virt_all_plot at 11 > > here's the script..... > > > Nsubj = 21; > > for subj = 1:Nsubj > fname = ['/home/boninc/tfresults/subj' 64 + subj]; > clear fr > load(fname); > frs(subj) = fr; > end > > cfg = []; > [gr] = freqgrandaverage(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), > frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), > frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); > > %cfg = []; > %cfg.alpha = .05; > %cfg.method = 'stats'; > %cfg.design = 1:21; > %cfg.statistic = 'kruskalwallis'; > %[stat] = freqstatistics(cfg, frs(1), frs(2), frs(3), frs(4), frs(5), > frs(6), frs(7), frs(8), frs(9), frs(10), frs(11), frs(12), frs(13), frs(14), > frs(15), frs(16), frs(17), frs(18), frs(19), frs(20), frs(21)); > > clf > contourf(gr.time, gr.freq, squeeze(sum(gr.powspctrm))); colorbar > %contourf(gr.time, gr.freq, gr.powspctrm); colorbar > > title '21 Subjects, RandL, RIGHT Central Motor' > xlabel 'time, sec' > ylabel 'frequency, Hz' > > > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of > Hanneke Van Dijk [Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE] > Sent: Thursday, September 10, 2009 7:21 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] AW: [FIELDTRIP] freqstastics script > > Dear Claudia, > > Normally when matlab says 'undefined function for input of type ....' it > means it cannot find the specific function in the paths you have defined. > You can check whether neighbourselection.m is in your fieldtrip folder, if > not I have attached it (version 20090428) so you can put it there. If this > doesn't fix it please let me know! > > Groetjes Hanneke > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Bonin, Claudia (NIH/NINDS) > [F] > Gesendet: Mi 09.09.2009 18:26 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] freqstastics script > > I am trying to do statistics on time-frequency data across 16 subjects, > averaging over channels. I received back the following error about > 'neighbourselection' which means nothing to me.....Does anyone have any idea > what might be wrong here? I have pasted in the exact message below. > thanks! > claudia > > > >> cfg.statistic = 'kruskalwallis'; > >> cfg.method = 'stats'; > >> [s] = freqstatistics(cfg, fr, fr); > averaging over 3 channels > selected 50 time bins > selected 41 frequency bins > Warning: PACK can only be used from the MATLAB command line. > > In fieldtrip/private/prepare_timefreq_data at 305 > In fieldtrip/private/statistics_wrapper at 167 > In freqstatistics at 44 > ??? Undefined function or method 'neighbourselection' for input arguments > of type > 'struct'. > > Error in ==> statistics_wrapper at 181 > cfg = neighbourselection(cfg,varargin{1}); > > Error in ==> freqstatistics at 44 > [stat] = statistics_wrapper(cfg, varargin{:}); > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hanneke.p.van.dijk at GMAIL.COM Wed Sep 23 09:31:18 2009 From: hanneke.p.van.dijk at GMAIL.COM (Hanneke van Dijk) Date: Wed, 23 Sep 2009 09:31:18 +0200 Subject: freqstastics script In-Reply-To: <200909192134.n8JLYAE8012315@kurage.nimh.nih.gov> Message-ID: Hi Tom, I hope I understood your question right, let's say you have 2 conditions, 1 group of 3 subjects; nSubj=3; cfg.design(1:Nsubj) = 1; cfg.design(nSubj+1:(2*nSubj)) = 2; cfg.design: 1 1 1 2 2 2 I don't think there is anything special about time-frequency plots compared to timelock - or sourcestatistics. Although you can make things as complicated as you want of course! Yours, Hanneke On Sat, Sep 19, 2009 at 11:34 PM, Tom Holroyd wrote: > the cfg.design in particular, how would one set that up for a group > of time-frequency plots? > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ndavid at UKE.DE Wed Sep 23 11:26:08 2009 From: ndavid at UKE.DE (Nicole David) Date: Wed, 23 Sep 2009 11:26:08 +0200 Subject: open PhD position Message-ID: Hi, I hope you don't mind me announcing a job opening for a PhD position at our Department in Hamburg (see below). Best, Nicole --------- PhD Position at the Dept. of Neurophysiology and Pathophysiology, Hamburg The Dept. of Neurophysiology and Pathophysiology (Head: Prof. Dr. Andreas K. Engel) at the University Medical Center Hamburg-Eppendorf (Germany) invites applications for a PhD student position. The position is available with immediate start. The appointment will be for 3 years. Areas of interest comprise the investigation of dynamic, large-scale neural interactions and the characterization of functional networks during perceptual and attentional processes in autism spectrum disorders, using techniques such as eye tracking and EEG/ MEG (possibly also fMRI). Recruitment of individuals with autism will be performed in collaboration with the Department of Psychiatrie in Cologne (http://www.medizin.uni- koeln.de/kliniken/psychiatrie/Autismus-Sprechstunde/). Main research interests in the Department are dynamics of distributed sensory processing, intermodal and sensorimotor integration, as well as theories of perception, action and consciousness. Current projects involve EEG/MEG studies in humans or physiological studies in animals. Further information on research at the Department of Neurophysiology can be obtained at http://www.uke.uni-hamburg.de or http://www.40hz.net. Applicants should have a background in psychology, medicine, biology or neuro-/ cognitive sciences, and ideally show experience in human EEG/ MEG studies, neuroimaging or biosignal analysis. Programming experience (Matlab, Presentation) is considered mandatory. You will be responsible for the management and implementation of research paradigms, recruitment and neuropsychological testing of volunteers, data acquisition and analysis. Interest in clinical neuroscience and neuropsychology is desirable as well as knowledge of the German language. For further details, please contact Nicole David (phone +49-40-7410-53188, email: ndavid at uke.de) or Prof. Dr. Andreas K. Engel (phone +49-40-7410-56170, email: ak.engel at uke.de). Applicants are asked to submit their CV and documentation of relevant qualification to Prof. Dr. Andreas K. Engel, Dept. of Neurophysiology and Pathophysiology, University Medical Center Hamburg-Eppendorf, Martinistr. 52, 20246 Hamburg, Germany. Applications can also be sent via email to N. David or A. K. Engel. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Sep 23 17:47:18 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 23 Sep 2009 17:47:18 +0200 Subject: EEG forward modelling using BEM In-Reply-To: <972d6afe0909151441w6d75afbfyb3e92eb3825183b7@mail.gmail.com> Message-ID: Hi Fabio On the ftp server you can find a file standard_BEM.zip which contains a precomputed BEM model that you can use. The geometry is based on the collin27 brain, and I believe it also includes the collin27 MRI. I.e., it is aligned with MNI152, but uses a crisp MRI and not the fuzzy MNI152, because from the latter one you cannot get a reasonable estimate of the skull geometry. The mesh vertex coordinates are expressed in MNI coordinates (in mm). You should carefully align your electrodes with the skin surface, i.e. plotting the mesh and electrodes in one figure should give a meaningfull figure. Have a look at the electroderealign function and at http://fieldtrip.fcdonders.nl/example . Also look at the fieldtrip/plotting/plot_mesh and plot_sens functions, which will be usefull for the realignment of your electrodes with the model skin. Hope this helps to get you started. Robert On 15 Sep 2009, at 23:41, Fabio Meneghini wrote: > Hi to all, > Please help me, it took me a lot of trials and troubles to avoid > annoying people with (possibly) trivial issues....but eventually I > don't know what else remains to try... > I'm new using FieldTrip, and I'm mainly interested in computing the > EEG forward model on a standard MNI head model (MNI152, the one you > can find in FSL software package), using BEM algorithm on 3, or better > 4 surfaces. > First of all: has anyone ever done this before? If so, this might save > me a lot of hard times... > > I read the the tutorial about building BEM meshes models, but let's > suppose I already have my model segmentation image (182x217x182 > voxels, filled with integers numbers). Can I start from that, ignoring > the original MRI images? > > I got my eeg channels coordinates. Are they supposed to be expressed > in mm, rather than meters? What is the origin of the coordinates > intended to be? And what about the conductivities of the various > compartments? where can I set them? > > Waiting for some light in the dark, thank you for your attention. > > best, > > Fabio Meneghini > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From smaraujo at UALG.PT Thu Sep 24 12:56:59 2009 From: smaraujo at UALG.PT (=?iso-8859-1?Q?Susana_Ara=FAjo?=) Date: Thu, 24 Sep 2009 11:56:59 +0100 Subject: data file format problem Message-ID: Hello everyone, I ran an EEG experiment and, exceptionally, I recorded two files to one of the subjects. I’m trying to join these two data files (bdfra format) into a single data file using BESA. When I joined these two “bdf” files using BESA, I got one file “.foc”. The problem is that when I try to run the “read_event” fieldrip function I get an error message because the file format (.foc) is not supported and even recognized. Does anyone already had this problem and know how can I solve it? Thanks a lot! Susana Araújo ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at GMAIL.COM Thu Sep 24 13:16:06 2009 From: julian.keil at GMAIL.COM (Julian Keil) Date: Thu, 24 Sep 2009 13:16:06 +0200 Subject: data file format problem In-Reply-To: <20090924105656.4C2851674C@smtp3.ualg.pt> Message-ID: Hi, i would suggest exporting to ASCII (.mul or .avr) in BESA and then reading these files into fieldtrip. Good luck Julian Am 24.09.2009 um 12:56 schrieb Susana Araújo: > Hello everyone, > > > > I ran an EEG experiment and, exceptionally, I recorded two files to > one of the subjects. I’m trying to join these two data files (bdfra > format) into a single data file using BESA. When I joined these two > “bdf” files using BESA, I got one file “.foc”. The problem is that > when I try to run the “read_event” fieldrip function I get an error > message because the file format (.foc) is not supported and even > recognized. Does anyone already had this problem and know how can I > solve it? > > > > Thanks a lot! > > > > Susana Araújo > > > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: julian.keil at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bernhard.spitzer at BCCN-BERLIN.DE Thu Sep 24 13:42:12 2009 From: bernhard.spitzer at BCCN-BERLIN.DE (Bernhard Spitzer) Date: Thu, 24 Sep 2009 13:42:12 +0200 Subject: data file format problem In-Reply-To: <20090924105656.4C2851674C@smtp3.ualg.pt> Message-ID: Dear Susana, for .bdf files, there is a tool called "merger" you can use to join the files into a single .bdf file before you load them into BESA. (http://www.biosemi.com/download/Merger.zip) Alternatively, if you prefer to export your .foc file to ASCII/multiplexed, you' may have to export the events (markers, triggers, etc.) separately to an .evt file which can then be read into FieldTrip hope this helps, best wishes Bernhard Susana Araújo wrote: > > Hello everyone, > > I ran an EEG experiment and, exceptionally, I recorded two files to > one of the subjects. I’m trying to join these two data files (bdfra > format) into a single data file using BESA. When I joined these two > “bdf” files using BESA, I got one file “.foc”. The problem is that > when I try to run the “read_event” fieldrip function I get an error > message because the file format (.foc) is not supported and even > recognized. Does anyone already had this problem and know how can I > solve it? > > Thanks a lot! > > Susana Araújo > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From irina.simanova at MPI.NL Thu Sep 24 13:47:21 2009 From: irina.simanova at MPI.NL (Irina Simanova) Date: Thu, 24 Sep 2009 13:47:21 +0200 Subject: data file format problem In-Reply-To: <20090924105656.4C2851674C@smtp3.ualg.pt> Message-ID: Hi Susanna, You could also read two files with Fieldtrip separately and then use "appenddata" command. It combines multiple datasets that has been preprocessed separately into one large dataset. Best, Irina On Sep 24, 2009, at 12:56 PM, Susana Araújo wrote: > Hello everyone, > > I ran an EEG experiment and, exceptionally, I recorded two files to > one of the subjects. I’m trying to join these two data files (bdfra > format) into a single data file using BESA. When I joined these two > “bdf” files using BESA, I got one file “.foc”. The problem is that > when I try to run the “read_event” fieldrip function I get an error > message because the file format (.foc) is not supported and even > recognized. Does anyone already had this problem and know how can I > solve it? > > Thanks a lot! > > Susana Araújo > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From P.PRAAMSTRA at BHAM.AC.UK Thu Sep 24 14:09:15 2009 From: P.PRAAMSTRA at BHAM.AC.UK (Peter Praamstra) Date: Thu, 24 Sep 2009 13:09:15 +0100 Subject: data file format problem In-Reply-To: <20090924105656.4C2851674C@smtp3.ualg.pt> Message-ID: Susana, You can merge bdf files with a utility provided by BioSemi. Go to: http://www.biosemi.com/download.htm Peter Praamstra On 24 Sep 2009 at 11:56, Susana Araújo wrote: > > Hello everyone, > > I ran an EEG experiment and, exceptionally, I recorded two files to > one of the subjects. I´m trying > to join these two data files (bdfra format) into a single data file > using BESA. When I joined these > two "bdf"files using BESA, I got one file ".foc". The > problem is that when I try to run the > "read_event" fieldrip function I get an error message because > the file format (.foc) is not > supported and even recognized. Does anyone already had this problem > and know how can I > solve it? > > Thanks a lot! > > Susana Araújo > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share > experiences and to discuss new ideas for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ ###################################### Peter Praamstra, MD, PhD Reader in Cognitive Neurophysiology Honorary Consultant Neurology Behavioural Brain Sciences Centre School of Psychology, University of Birmingham Birmingham, B15 2TT tel. 0121 414 7211 fax 0121 414 4897 Disclaimer: This e-mail and any attachments hereto contains proprietary information, some or all of which may be confidential or legally privileged. It is for the exclusive use of the intended recipient(s) only. If an addressing or transmission error has misdirected this e-mail and you are not the intended recipient(s), please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail or any attachments, as this may be unlawful. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From smaraujo at UALG.PT Thu Sep 24 14:47:13 2009 From: smaraujo at UALG.PT (=?iso-8859-1?Q?Susana_Ara=FAjo?=) Date: Thu, 24 Sep 2009 13:47:13 +0100 Subject: data file format problem In-Reply-To: <4ABB5B14.2010104@bccn-berlin.de> Message-ID: Thanks a lot!! I already solved my problem! Best whishes -----Mensagem original----- De: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] Em nome de Bernhard Spitzer Enviada: quinta-feira, 24 de Setembro de 2009 12:42 Para: FIELDTRIP at NIC.SURFNET.NL Assunto: Re: [FIELDTRIP] data file format problem Dear Susana, for .bdf files, there is a tool called "merger" you can use to join the files into a single .bdf file before you load them into BESA. (http://www.biosemi.com/download/Merger.zip) Alternatively, if you prefer to export your .foc file to ASCII/multiplexed, you' may have to export the events (markers, triggers, etc.) separately to an .evt file which can then be read into FieldTrip hope this helps, best wishes Bernhard Susana Araújo wrote: > > Hello everyone, > > I ran an EEG experiment and, exceptionally, I recorded two files to > one of the subjects. I’m trying to join these two data files (bdfra > format) into a single data file using BESA. When I joined these two > “bdf” files using BESA, I got one file “.foc”. The problem is that > when I try to run the “read_event” fieldrip function I get an error > message because the file format (.foc) is not supported and even > recognized. Does anyone already had this problem and know how can I > solve it? > > Thanks a lot! > > Susana Araújo > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From bernhard.spitzer at BCCN-BERLIN.DE Thu Sep 24 15:27:43 2009 From: bernhard.spitzer at BCCN-BERLIN.DE (Bernhard Spitzer) Date: Thu, 24 Sep 2009 15:27:43 +0200 Subject: time-frequency - zero padding? Message-ID: Dear Fieldtrip experts, I have a question regarding the cfg.pad settings in frequanalysis. For TF analysis of my epochs (6s), with a fixed window length (e.g., 0.4s), i'm using sth like cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 2.5:2.5:30; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.4; cfg.toi = -0.5:0.05:4; now I would like to increase the frequency resolution to, say 1Hz, in order to get a smoother TF map, but keep the data window length at 400msec. I understand that one can get a higher (interpolated) frequency resolution by zero padding the data window for fft, but it is unclear to me how or whether this can be done with frequanalysis/cfg.pad using a sliding window. with a sliding window, does cfg.pad add zeros to the windowed signal (cfg.t_ftimwin), or to the interval specified in cfg.toi, or to the data epoch ? Can I use cfg.pad to interpolate a higher frequency resolution for my analysis, or is there another way to do that? many thanks in advance! Bernhard -- ----------------------------------------------- Dr. Bernhard Spitzer Bernstein Center for Computational Neuroscience Charité Universitätsmedizin Berlin Philippstr. 13 House 6 10115 Berlin Germany Phone: +49 (0)30 2093-6789 Fax: +49 (0)30 2093-6771 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK Mon Sep 28 21:29:08 2009 From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith) Date: Mon, 28 Sep 2009 20:29:08 +0100 Subject: Reference electrode in lead field Message-ID: Hi all I am experimenting with source reconstruction and was wondering how a reference electrode is defined in the lead field. Looking through the scripts it looks like the average reference is used, but this is a physical impossibility, as there must be a physical reference to which differences in electrical potential can be measured. The lead field will be differ depending on the location of the reference electrode. Firstly, is there a way to specify a reference electrode when constructing an EEG lead field in fieldtri p and not jsut use the average reference. Secondly, looking through the code for 'inf_medium_leadfield' (called from prepare_leadfield -> compute_leadfield -> eeg_leadfieldb), the equations used for calculating the lead field look a little strange: radius = position (vox) - position(elec) R (resistivity?) = 4 x pi x conductivity x sum(radius^2)^(1.5) lead field(vox,elec)=radius / R. Where the the exponential to 1.5 come from? Is there a reference to somewhere where this method is used. I'm confused as to sure how this calculation works. Many thanks Mark -- Mark Drakesmith PhD Student Neuroscience and Aphasia Research Unit (NARU) University of Manchester ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From maess at CBS.MPG.DE Tue Sep 29 09:09:16 2009 From: maess at CBS.MPG.DE (Dr. Burkhard Maess) Date: Tue, 29 Sep 2009 09:09:16 +0200 Subject: Reference electrode in lead field In-Reply-To: <21132649.294471254208139700.JavaMail.root@zimbra> Message-ID: Dear Mark, concerning the average reference. ... You are right the voltage is defined as difference of potentials. Therefore one always needs a reference point, but there is no need for a physical existence of a reference point as long as a mathematical definition exists. Classical unipolar electrodes provide voltage signals like e.g. : (1) U_i_ref = V_i - V_ref The average reference is computed as the mean signal over all N electrodes: (2) U_avref = \frac{1}{N} \sum{i=1}^{N}U_i_ref You can rewrite this using expression (1) (3) U_avref = \frac{1}{N}\sum{i=1}^{N}V_i - V_ref = mean(V_i) - V_ref One can see that the reference point for the average reference is the same as for all single electrodes. Now, we rerefence all electrodes to the average reference: (4) U_i_avref = U_i_ref - U_avref = V_i - V_ref - mean(V_i) - V_ref The simplified expression does not contain the original V_ref! (5) U_i_avref = V_i - mean(V_i) Introducing the average reference is loss free as long as you store the mean average signal. Otherwise some data is lost because the V_ref signals vanishes from the expressions. Why to transform to average reference? As you said the lead field is dependent on the location of the reference electrode. Introducing the average reference means to become less dependent on the location of a single (reference) electrode. All the best, Burkhard Dr. Burkhard Maess Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a, P.O. Box 500355, D-04303 Leipzig Aussenstelle Bennewitz, phone/fax: +49(3425)8875-2526/-2511 mail: maess 'at' cbs.mpg.de, http://www.cbs.mpg.de ----- Original Message ----- From: "Mark Drakesmith" To: FIELDTRIP at NIC.SURFNET.NL Sent: Monday, September 28, 2009 9:29:08 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [FIELDTRIP] Reference electrode in lead field Hi all I am experimenting with source reconstruction and was wondering how a reference electrode is defined in the lead field. Looking through the scripts it looks like the average reference is used, but this is a physical impossibility, as there must be a physical reference to which differences in electrical potential can be measured. The lead field will be differ depending on the location of the reference electrode. Firstly, is there a way to specify a reference electrode when constructing an EEG lead field in fieldtri p and not jsut use the average reference. Secondly, looking through the code for 'inf_medium_leadfield' (called from prepare_leadfield -> compute_leadfield -> eeg_leadfieldb), the equations used for calculating the lead field look a little strange: radius = position (vox) - position(elec) R (resistivity?) = 4 x pi x conductivity x sum(radius^2)^(1.5) lead field(vox,elec)=radius / R. Where the the exponential to 1.5 come from? Is there a reference to somewhere where this method is used. I'm confused as to sure how this calculation works. Many thanks Mark -- Mark Drakesmith PhD Student Neuroscience and Aphasia Research Unit (NARU) University of Manchester ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jdien07 at MAC.COM Wed Sep 30 04:10:50 2009 From: jdien07 at MAC.COM (Joseph Dien) Date: Tue, 29 Sep 2009 22:10:50 -0400 Subject: Reference electrode in lead field In-Reply-To: <4AC10E84.50708@postgrad.manchester.ac.uk> Message-ID: The reasoning behind the average reference is that it is a physics principle that the sum of the voltages over an enclosed surface must equal zero. To the extent that the electrode locations provide a representative even sampling of the head surface (an important caveat) the sum of the voltages therefore provides an estimate of the true zero voltage. The reason for using the average reference rather than a single reference site is that using a reference site arbitrarily defines that point as being zero voltage (which is to say, inactive), which is not biophysically reasonable as there are no inactive sites on the head (due to volume conduction). Also, to clarify, an average reference does not result in a reference-free solution since, as you say, a voltage measurement is by definition a relative measure (although ideally it should be relatively independent of the electrode montage, given enough electrodes). It's just that the comparison "site", which is the zero equipotential line (as estimated by the average reference computation), is a more biophysically reasonable one (given enough recording sites) than arbitrarily picking a single fixed electrode site as the reference. For an extended discussion of these issues, see: Dien, J. (1998). Issues in the application of the average reference: Review, critiques, and recommendations. Behavior Research Methods, Instruments, and Computers, 30(1), 34-43. Cheers! Joe On Sep 28, 2009, at 3:29 PM, Mark Drakesmith wrote: > Hi all > > I am experimenting with source reconstruction and was wondering how > a reference electrode is defined in the lead field. Looking through > the scripts it looks like the average reference is used, but this is > a physical impossibility, as there must be a physical reference to > which differences in electrical potential can be measured. The lead > field will be differ depending on the location of the reference > electrode. > > Firstly, is there a way to specify a reference electrode when > constructing an EEG lead field in fieldtri p and not jsut use the > average reference. > > Secondly, looking through the code for > 'inf_medium_leadfield' (called from prepare_leadfield -> > compute_leadfield -> eeg_leadfieldb), the equations used for > calculating the lead field look a little strange: > > radius = position (vox) - position(elec) > R (resistivity?) = 4 x pi x conductivity x sum(radius^2)^(1.5) > lead field(vox,elec)=radius / R. > > Where the the exponential to 1.5 come from? Is there a reference to > somewhere where this method is used. I'm confused as to sure how > this calculation works. > > Many thanks > > Mark > > -- > > Mark Drakesmith > PhD Student > > Neuroscience and Aphasia Research Unit (NARU) > University of Manchester > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist Center for Advanced Study of Language University of Maryland 7005 52nd Avenue College Park, MD 20742-0025 E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://homepage.mac.com/jdien07/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.