From r.oostenveld at FCDONDERS.RU.NL Mon Oct 1 09:39:32 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 1 Oct 2007 09:39:32 +0200 Subject: Small problem with multiplotER In-Reply-To: <00d501c8004c$f6e7a5b0$f0463ec1@sobell.ion.ucl.ac.uk> Message-ID: Hi Vladimir, The cfg option was not copied along during the subsequent calls to topo->single->topo->single... I fixed it, it will be on the ftp server tonight. thanks Robert On 26 Sep 2007, at 16:52, Vladimir Litvak wrote: > There is a small problem I found using multiplotER. In general it > likes > rotating the electrodes by 90 deg CCW which might justify changing the > defaults. But even when I specify cfg.rotate=0, it affects the > multiplot, > but not the topoplots that are generated from it in the interactive > mode. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marie at PSY.GLA.AC.UK Tue Oct 2 17:33:29 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Tue, 2 Oct 2007 16:33:29 +0100 Subject: volumenormalize reverse mapping In-Reply-To: <003b01c7f925$0f06d280$902dae83@fcdonders.nl> Message-ID: Dear Jan-Mathijs + fellow fieldtrippers, Sorry for my delayed response to your mail. In the end the volumenormalize (with nonlinear = 'no') works fine with a newer version of fieldtrip, and I am able to output the normalised (and non- normalised) functional data to AFNI. Now that I have this working, and can identify group maxima, i would like to be able to transform back into the CTF voxel space. I know the final transformation applied to the data in volumenormalize (norm.cfg.final T2). I had thought that to move from the new space (vox2) to the original (vox1) would would be simple and that I would just have to invert the final transformation matrix as vox1 = inv (T2) * vox2 but this does not seem to be correct. So I am wondering where I am going wrong. Does the norm.cfg.final give the full transformation from ctf to spm space? including flipping any axes, scaling etc. Alternatively, I tried to work out the relationship by using the affine transformation matrix of the original mri in CTF space (MRI_T), and the new transformation matrix of the normalised mri (norm.transform, NORM_T) and some other transformation to go from SPM to CTF co-ords (CTF2SPM) as: NORM_T * vox2 = mm (SPM) = CTF2SPM (mm (CTF)) = CTF2SPM (MRI_T * vox1) i.e. vox1 = inv(MRI_T)*inv(CTF2SPM)*NORM_T*vox2 but again, i think there is a problem somewhere. I am getting the CTF2SPM transformation from the one used inside volumenormalise for this purpose, but perhaps it is incorrect. I would appreciate any suggestions, Thanks, Marie ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Jan.Schoffelen at FCDONDERS.RU.NL Wed Oct 3 10:18:59 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Wed, 3 Oct 2007 10:18:59 +0200 Subject: volumenormalize reverse mapping In-Reply-To: <44F3D521-B219-4AA4-B52E-E86F053147FE@psy.gla.ac.uk> Message-ID: Dear Marie, It seems as if you are almost there. As far as I can see, norm.cfg.final indeed gives you the transformation from ctf2spm-space, so the inversion step is correct. One very important thing to check still, is whether you have the units correct. As far as I know, your 'T2' is expressed in mm. Could it be that your vox2 is expressed in cm? if so, you first have to multiply vox2 by 10 (followed by the usual adding of a row of ones) before the multiplication with the transformation-matrix. Yours, Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From wibral at MPIH-FRANKFURT.MPG.DE Thu Oct 4 12:35:00 2007 From: wibral at MPIH-FRANKFURT.MPG.DE (Michael Wibral) Date: Thu, 4 Oct 2007 12:35:00 +0200 Subject: CTF mri import Message-ID: Dear Fieldtrippers, I was wondering whether anyone has actually succefully imported a recent ctf-mri into fieldtrip. The mri's we have are mistaken to be ASA-mris when I use read_fcdc_mri(MRIFILE). This does not generate an error but never finishes. When I abort the function the error I get shows that read_asa_mri has been used internally. If I enforce the use of read_ctf_mri I get the following error: ??? Error using read_ctf_mri unknown datasize in CTF mri file This is due to the fact that hdr.dataSize is read as being 24397 instead of 1 or 2 as its supposed to be. All of the above is quite obvioussly due to the fact that the whole header inforamtion is read in a misplaced fashion, because the software assumes ctf-mri of version2.2. E.g. the mmPerPixel fields have values around 3.5e+9....etc. Does anybody know / know how to: (1) read CTF mris of version 4 and above ? (2) the changes between version 2.2 and 4.x (I have documentation on the 4.x but not on the 2.x versions). (3) downconvert CTF mris 4.1 and 4.0 to 2.2 ? (4) donwgrade mri-viewer so that it produces version 2.2 images ? (5) get the fiducial information into fieldtrip when not using ctf-mris but spm-analyze mris? I also thought about just using the ctf hdm and then to volume-normalize everything to the MNI template and display things there. This is, however not really optimal as segmentation of the brainshape is unavailable for beamforing in that case... Any help is greatly appreciated, Michael Michael Wibral MEG Unit Brain Imaging Center Frankfurt ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From michael.wibral at WEB.DE Thu Oct 4 13:06:28 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Thu, 4 Oct 2007 13:06:28 +0200 Subject: Reading CTF MRIs version 4 - solution found Message-ID: Dear all, sorry for spamming the list about ctf-mris vesrion4 that fieldtrip couldn't import... I just found out that ctf's mri viewer can actually convert version4 to version 2. Ihope this helps anybody who is ver faced with that problem. Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From nicola.ray at DPAG.OX.AC.UK Tue Oct 9 19:40:23 2007 From: nicola.ray at DPAG.OX.AC.UK (Niki Ray) Date: Tue, 9 Oct 2007 19:40:23 +0200 Subject: neuroscan 16 or 32 bit Message-ID: Dear all, I have collected data using Neuroscan, and I'm trying to import it into fieldtrip. It looks like fieldtrip is expecting it in 16 bit format, but my data is in 32. I can't see any way to change the format. Hope you can help! Many thanks in advance Niki ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From arno at SALK.EDU Tue Oct 9 19:46:31 2007 From: arno at SALK.EDU (Arnaud Delorme) Date: Tue, 9 Oct 2007 19:46:31 +0200 Subject: neuroscan 16 or 32 bit In-Reply-To: Message-ID: Dear Niki, if this is really your problem (I doubt it because most Neuroscan data is 32 bit these days and it would be strange if Fieldtrip could not read it), I would advise using the function in EEGLAB (http://sccn.ucsd.edu/eeglab/). I think the function name is loadcnt(). You can manually toggle between 16 and 32 bits. Best, Arno Niki Ray wrote: > Dear all, > I have collected data using Neuroscan, and I'm trying to import it into > fieldtrip. It looks like fieldtrip is expecting it in 16 bit format, but my > data is in 32. I can't see any way to change the format. > Hope you can help! > Many thanks in advance > Niki > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/fcdonders/fieldtrip. From d.oudebos at GMAIL.COM Thu Oct 11 09:55:08 2007 From: d.oudebos at GMAIL.COM (Danny Oude Bos) Date: Thu, 11 Oct 2007 09:55:08 +0200 Subject: Artefact detection - zsum implementation question Message-ID: At the moment I'm working with the artefact detection functions from Fieldtrip. I think using z-values is very smart, but I do have a question about the implementation. The z-values are calculated per time sample per channel, and then summed over the channels. But to do this, should you not take the absolute values of the z-values? A z-value can be positive or negative depending on a positive or negative deviation from the average. For artefact detection however only the fact that there is a deviation is important, not whether it is positive or negative. Also, summing large positive and large negative deviations could result in a low zsum, while there is most definitely something going on. Thank you for your time. Kind regards, Danny Oude Bos. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Thu Oct 11 17:06:21 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 11 Oct 2007 17:06:21 +0200 Subject: Postdoc research position in Cognitive Neuroscience at the University of Maastricht/FCDC Message-ID: Job Announcement Postdoc research position in Cognitive Neuroscience at the University of Maastricht/F.C. Donders Centre for Cognitive Neuroimaging The Department of Cognitive Neuroscience, Faculty of Psychology, Maastricht University, The Netherlands (www.psychology.unimaas.nl), which hosts the research dedicated Maastricht Brain Imaging Centre (http:// mbic.unimaas.nl/) is recruiting an enthousiastic researcher for a postdoc position in the collaboration with the F.C. Donders Centre for Cognitive Neuroimaging, in Nijmegen, NL (http://www.ru.nl/fcdonders/). The researcher will develop and apply methods to investigate large-scale functional and effective connectivity in the human brain by EEG and/ or MEG. She/He will be working at the F.C. Donders Centre in Nijmegen and has free access to state-of-the-art neuroimaging facilities (MRI, MEG, EEG). Minimum qualifications are a doctoral degree and demonstrated expertise in analysis and synthesis of neuroimaging data, specifically EEG/MEG. Experience with EEG/MEG inverse solutions, connectivity analysis, and MATLAB programming are of added value. The successful candidate will be part of the interdisciplinary teams both at the F.C. Donders Centre and the Maastricht Brain Imaging Centre, and interact with experts on fMRI, EEG, MEG, and TMS. Applicants should send a curriculum vitae, a one-page motivation letter, and the names of two persons that can provide references to Dr. Alard Roebroeck Department of Cognitive Neuroscience Faculty of Psychology Maastricht University P. O. Box 616 6200 MD Maastricht The Netherlands or email a. roebroeck at psychology.unimaas.nl with subject line 'postdoc NIJMEGEN'. Maastricht University is an equal opportunity employer. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ali.mazaheri at FCDONDERS.RU.NL Thu Oct 18 18:46:48 2007 From: ali.mazaheri at FCDONDERS.RU.NL (Ali Mazaheri) Date: Thu, 18 Oct 2007 18:46:48 +0200 Subject: neural activity index (NAI) beamforming... Message-ID: Hello, I decided to NAI to normalize my activations..... sourceNAI.avg.pow = sourcePost.avg.pow ./ sourcePost.avg.noise; but the avg.noise parameter is has zero values ( the only finite numbers in the matrice) my method to beamform has been straightforward cfg = []; cfg.grad = freqdata.grad; cfg.vol = vol; cfg.resolution = 1; cfg.reducerank = 2; cfg.channel = {'MEG'}; cfg.xgrid = 'auto'; cfg.ygrid = 'auto'; cfg.zgrid = 'auto'; [grid] = prepare_leadfield(cfg); cfg = []; cfg.frequency = 18; cfg.method = 'dics'; cfg.projectnoise = 'yes'; cfg.grid = grid; cfg.vol = vol; cfg.lambda = 0; sourcePost = sourceanalysis(cfg,freqdata ); My source.post.avg.pow has non-zero finite values...... any suggestions on what I am doing wrong would be greatly appreciated. Ali ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Thu Oct 18 20:59:51 2007 From: jan.schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Thu, 18 Oct 2007 20:59:51 +0200 Subject: neural activity index (NAI) beamforming... Message-ID: Dear Ali, The most likely reason for your finding is that the cross-spectral density matrix is rank-deficient. A solution would be to use some regularization by means of cfg.lambda = something. A more or less identical problem has been covered some time ago (but then in EEG-data). You might want to search the mailing list's archive (reachable through the fieldtrip-wiki), and search for the subject: problems using dics. Yours, Jan-Mathijs ----- Original Message ----- From: Ali Mazaheri Date: Thursday, October 18, 2007 6:46 pm Subject: [FIELDTRIP] neural activity index (NAI) beamforming... > Hello, > > I decided to NAI to normalize my activations..... > > sourceNAI.avg.pow = sourcePost.avg.pow ./ sourcePost.avg.noise; > > > but the avg.noise parameter is has zero values ( the only finite > numbers > in the matrice) > > > my method to beamform has been straightforward > > > cfg = []; > cfg.grad = freqdata.grad; > cfg.vol = vol; cfg.resolution = 1; > cfg.reducerank = 2; cfg.channel = {'MEG'}; > cfg.xgrid = 'auto'; cfg.ygrid = 'auto'; > cfg.zgrid = 'auto'; > [grid] = prepare_leadfield(cfg); > > > > cfg = []; > cfg.frequency = 18; > cfg.method = 'dics'; > cfg.projectnoise = 'yes'; > cfg.grid = grid; > cfg.vol = vol; cfg.lambda = 0; > sourcePost = sourceanalysis(cfg,freqdata ); > > My source.post.avg.pow has non-zero finite values...... > any suggestions on what I am doing wrong would be greatly > appreciated. > > > > Ali > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/fcdonders/fieldtrip. From bps231 at NYU.EDU Fri Oct 19 01:37:09 2007 From: bps231 at NYU.EDU (Bernhard Staresina) Date: Fri, 19 Oct 2007 01:37:09 +0200 Subject: clusterstats for depth electrodes Message-ID: Dear Fieldtrippers, We have a set of intracranial EEG recordings and would now like to assess statistical differences between two conditions of interest. Using the timelockstatistics function, however, it seems to require a ‘regular’ channel array, which we cannot provide with depth electrodes. That is, we don’t wanna do the cluster analysis across a spatial cluster, but simply across time. Is this possible in the current version? The code we took from the tutorial along with the error message we get is attached below, Thanks, Bernhard --- CODE cfg = []; cfg.correctm = 'no'; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 0; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 100; design = zeros(1,size(cond1.trial,1)+size(cond2.trial,1)); design(1,1:size(cond1.trial,1)) = 1; design(1,(size(cond1.trial,1)+1:(size(cond1.trial,1)+size(cond2.trial,1)))) = 2; cfg.design = design; cfg.ivar = 1; cfg.channel = {'all'}; cfg.latency = [0 1]; [stat] = timelockstatistics(cfg, cond1, cond2); -- ERROR >> [stat] = timelockstatistics(cfg, cond1, cond2); selected 32 channels selected 1000 time bins selected 1 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip-0.9.8/private/prepare_timefreq_data at 310 In fieldtrip-0.9.8/private/statistics_wrapper at 187 In timelockstatistics at 102 ??? Undefined function or variable "sens". Error in ==> neighbourselection at 87 if ~isstruct(sens) Error in ==> fieldtrip-0.9.8/private/statistics_wrapper at 211 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> timelockstatistics at 102 [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/fcdonders/fieldtrip. From maris at NICI.RU.NL Fri Oct 19 07:09:54 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Fri, 19 Oct 2007 07:09:54 +0200 Subject: clusterstats for depth electrodes In-Reply-To: Message-ID: Hi Bernhard, > We have a set of intracranial EEG recordings and would now like to assess > statistical differences between two conditions of interest. Using the > timelockstatistics function, however, it seems to require a 'regular' > channel array, which we cannot provide with depth electrodes. That is, we > don't wanna do the cluster analysis across a spatial cluster, but simply > across time. Is this possible in the current version? > The code we took from the tutorial along with the error message we get is > attached below, If you use cfg.neighbours={} (i.e., an empty neighbourhood structure), you will only cluster in time and (if present) frequency. Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience : www.ru.nl/master/cns/ > > Thanks, > Bernhard > > > --- CODE > > cfg = []; > cfg.correctm = 'no'; > cfg.method = 'montecarlo'; > cfg.statistic = 'indepsamplesT'; > > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 0; > > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 100; > > design = zeros(1,size(cond1.trial,1)+size(cond2.trial,1)); > design(1,1:size(cond1.trial,1)) = 1; > design(1,(size(cond1.trial,1)+1:(size(cond1.trial,1)+size(cond2.trial,1)))) = 2; > > cfg.design = design; > cfg.ivar = 1; > > cfg.channel = {'all'}; > cfg.latency = [0 1]; > > > [stat] = timelockstatistics(cfg, cond1, cond2); > > > -- ERROR > > >> [stat] = timelockstatistics(cfg, cond1, cond2); > selected 32 channels > selected 1000 time bins > selected 1 frequency bins > Warning: PACK can only be used from the MATLAB command line. > > In fieldtrip-0.9.8/private/prepare_timefreq_data at 310 > In fieldtrip-0.9.8/private/statistics_wrapper at 187 > In timelockstatistics at 102 > ??? Undefined function or variable "sens". > > Error in ==> neighbourselection at 87 > if ~isstruct(sens) > > Error in ==> fieldtrip-0.9.8/private/statistics_wrapper at 211 > cfg.neighbours = neighbourselection(cfg,varargin{1}); > > Error in ==> timelockstatistics at 102 > [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/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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.wibral at WEB.DE Fri Oct 19 11:08:46 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Fri, 19 Oct 2007 11:08:46 +0200 Subject: Problems plotting sourcestatistics Message-ID: Dear Fieldtrippers, we have a problem plotting results from multisubject source statistics. The problem seems to be due to the fact that sourcestats are calculated only on the 'inside' voxels and the source stats are returned in a small box (i.e. fewer voxels) because of the omitted 'outside'. If I then you sourceinterpolate to get template MRI and sourcestats together sourceinterpolate seems to think there is a need to stretch the stats voxels (because there are fewer of them than voxels in the anatomy) - smearing the stast all over the anatomy - mostly outside of the brain. Plotting normalized single subjects beamforming images works fine, though. Plotting the results using matlab's 'slice' method also works fine. I pasted the code we used below. Any help is greatly appreciated, Michael Wibral %%%%%%%%%%%%CODE%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%code for normalization%%%%%%%%%%%%%%%%%%%%%%%%%% Design = { 'MKA21_sourceUprightPreInt.mat', 'MKA21_sourceUprightPostInt.mat', 'MKA21_sourceDiffInt.mat' ; ..........more files....... }; PathName = '/net/M036-LFS1/srv/data1/home1/ctillman/data/MooneyMEEGFieldtripAnalysis/BeamformingFieldtrip/'; for i = 1:size(Design,1) % Normalization of condition 1 files fullnamePre = strcat(PathName,Design{i,1}); subjectID = Design{i,1}(1:5); disp(strcat('*******loading ', fullnamePre)); load(fullnamePre); cfg = []; cfg.coordinates = 'ctf'; cfg.template = '/net/M036-LFS1/srv/data1/home1/ctillman/tools/spm2/templates/T1.mnc'; % Normalise sourceUprightPreIntNorm = volumenormalise(cfg,sourceUprightPreInt); sourceUprightPreNormOutfile = strcat(PathName, subjectID,'_SourceUprightPreIntNorm.mat'); save(sourceUprightPreNormOutfile, 'sourceUprightPreIntNorm'); clear sourceUprightPreIntNorm; % Normalization of condition 2 files .......... % Normalization of condition 3 files .......... % check whether normalized data plot OK (they do) cfg = []; cfg.template = '/net/M036-LFS1/srv/data1/home1/ctillman/tools/spm2/templates/T1.mnc'; cfg.method = 'slice'; cfg.funparameter = 'avg.pow'; cfg.maskparameter = cfg.funparameter; cfg.funcolorlim = [0.0 1.2]; cfg.opacitylim = [0.0 1.2]; cfg.opacitymap = 'rampup'; figure; sourceplot(cfg,sourceUprightDiffIntNorm); clear sourceUprightDiffIntNorm; end %%%%%%%%%%%%code for sourcestatistics%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear all; path = '/net/M036-LFS1/srv/data1/home1/ctillman/data/MooneyMEEGFieldtripAnalysis/BeamformingFieldtrip/'; UprightPreNorm = {'MKA21_SourceUprightPreIntNorm.mat'; ..........more files...................... }; UprightPostNorm = {'MKA21_SourceUprightPostIntNorm.mat'; ...................more files...................... }; % 1. Load sourceUprightPreIntNorm for i = 1:length(UprightPreNorm) fullnamePre = strcat(path,UprightPreNorm{i,1}); UprightPre{i} = load(fullnamePre); end % Fix the structure properties for easier handling for l = 1:size(UprightPre,2) UprightPre{l} = UprightPre{l}.sourceUprightPreIntNorm; end % 2. Load sourceUprightPostIntNorm for i = 1:length(UprightPreNorm) fullnamePost = strcat(path,UprightPostNorm{i,1}); UprightPost{i} = load(fullnamePost); end % Fix the structure properties for easier handling for l = 1:size(UprightPost,2) UprightPost{l} = UprightPost{l}.sourceUprightPostIntNorm; end % prepare multisubject data for sourcestatistics (to identify common 'inside' voxels) % using sourcegrandaverage cfg = []; cfg.keepindividual = 'yes'; PostGrandAvg = sourcegrandaverage(cfg,... UprightPost{1},... UprightPost{2},... UprightPost{3},... UprightPost{4},... UprightPost{5},... UprightPost{6},... UprightPost{7},... UprightPost{8},... UprightPost{9},... UprightPost{10},... UprightPost{11},... UprightPost{12},... UprightPost{13},... UprightPost{14},... UprightPost{15},... UprightPost{16},... UprightPost{17}); cfg = []; cfg.keepindividual = 'yes'; PreGrandAvg = sourcegrandaverage(cfg,... UprightPre{1},... UprightPre{2},... UprightPre{3},... UprightPre{4},... UprightPre{5},... UprightPre{6},... UprightPre{7},... UprightPre{8},... UprightPre{9},... UprightPre{10},... UprightPre{11},... UprightPre{12},... UprightPre{13},... UprightPre{14},... UprightPre{15},... UprightPre{16},... UprightPre{17}); % 3. Compute source statistics (uncorrected at the moment) cfg = []; nSubjects = length(UprightPreNorm); a = [1:nSubjects]; b = ones(1,nSubjects); cfg.design = [a a; b (2*b)]; cfg.ivar = 2; % independent variable: condition cfg.uvar = 1; % subjects cfg.method = 'montecarlo'; cfg.numrandomization = 200; cfg.parameter = 'pow'; cfg.statistic = 'depsamplesT'; sourceStat = sourcestatistics(cfg,PostGrandAvg,PreGrandAvg); sourceStatOutfileName = strcat(path,'sourceStat.mat'); save(sourceStatOutfileName, 'sourceStat'); % 4. Plot statistics (code runs but plots are nonsensical) load(strcat(path,'sourceStat.mat')); MRIFilename = strcat(path, 'StandardMRI.mat'); % contains an MRI variable named StandardMRI load(MRIFilename); cfg = []; cfg.funparameter = 'stat'; sourceInterp = sourceinterpolate(cfg, sourceStat, StandardMRI); cfg = []; cfg.method = 'slice'; cfg.funparameter = 'stat'; cfg.maskparameter = cfg.funparameter; cfg.funcolorlim = [2.0 10.2]; cfg.opacitylim = [2.0 10.2]; cfg.opacitymap = 'rampup'; figure; sourceplot(cfg, sourceInterp); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From marie at PSY.GLA.AC.UK Wed Oct 24 17:56:55 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Wed, 24 Oct 2007 16:56:55 +0100 Subject: Meg planar Message-ID: Dear all, I want to use the planar gradient correction computed on individual trials as opposed to the average trial and i am getting some strange results. When i compute the planar gradient on the average of the trials, it seems to make sense wrt the original data (bottom plot, chans*time), however when the single trials are taken into account the new planar averaged seems to be very smeared into the baseline region (top plot). Even though the baseline has already been removed from every trial. Is this just a result of noise in the single trials and is there any way to correct for it? Looking at the statistics tutorial data this does not seem to be an issue for that data set, could it be caused by some sort of artifacts that i have not taken into account? Thanks, Marie Script info: cfg.keeptrials = 'yes'; cfg.baseline = [-0.2 0]; avg = timelockanalysis(cfg, data); avg = timelockbaseline(cfg,avg); pl = megplanar(cfg, avg); plcb = combineplanar(cfg, pl); cfg = []; cfg.keeptrials = 'no'; cfg.baseline = [-0.2 0]; avg = timelockanalysis(cfg, data); avg = timelockbaseline(cfg,avg); pl = megplanar(cfg, avg); plcb = combineplanar(cfg, pl); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Comparison_planar.tiff Type: image/tiff Size: 82920 bytes Desc: not available URL: From enteka at HOTMAIL.COM Thu Oct 25 01:50:29 2007 From: enteka at HOTMAIL.COM (Nicolas Robitaille) Date: Wed, 24 Oct 2007 23:50:29 +0000 Subject: question about the .previous field Message-ID: Dear fieldtrip developper, I would like to know if the .previous field is mandatory for current or future usage of fieldtrip. If not, I will remove them within my script. I observe that, for instance while looking at the output of timelockgrandaverage, the nested structures contain all the original triggers (avg.cfg.previous{}.previous.event) in the file. In my case, this end up being a 25 Megabytes variable for an ERP of 2 sec for 3 electrodes!! Thanks to automatic compression by Matlab, the saved file is very small (700 k), but loading it on my computer take more than 6 sec, which end up having drawing routines of very simple data to take minutes. Thanks Nicolas ************************************ Nicolas Robitaille, candidat Ph.D Département de Psychologie Université de Montréal C.P. 6128, succursale Centre-ville Montréal, Québec H3C 3J7 Tel.: 514-343-6111 x2631 Fax: 514-343-5787 ************************************ _________________________________________________________________ Envoie un sourire, fais rire, amuse-toi! Employez-le maintenant! http://www.emoticonesgratuites.ca/?icid=EMFRCA120 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Thu Oct 25 11:40:14 2007 From: jan.schoffelen at FCDONDERS.RU.NL (jan-mathijs schoffelen) Date: Thu, 25 Oct 2007 11:40:14 +0200 Subject: Meg planar In-Reply-To: Message-ID: Dear Marie, The planar gradient transformation algorithm is not dependent on single trial, or averaged data as an input. The transformation of the data, moving from 151 (in your case) axial gradients to 302 planar gradients, is just the consequence of applying a spatial transformation matrix on the data. This spatial transformation matrix is computed from the gradiometer information, and the method specified (btw: in my experience specifying cfg.method = 'sincos' gives the best results). Anyway, your problems are introduced when recombining the planar-data into 151 'sensors' again. This is done by combineplanar, which applies pythagoras to the -dH and -dV components of a given sensor. This means that all values become positive (agree?). Thus, applying this procedure on the single trials leads to a 'positive' baseline, because the average of positive valued numbers can never go to zero. If you are bothered by this, you could perhaps not already subtract the baseline prior to calling timelockstatistics, but after having called combineplanar. Yours, Jan-Mathijs On Oct 24, 2007, at 5:56 PM, Marie Smith wrote: > Dear all, > > I want to use the planar gradient correction computed on individual > trials as opposed to the average trial and i am getting some > strange results. When i compute the planar gradient on the average > of the trials, it seems to make sense wrt the original data (bottom > plot, chans*time), however when the single trials are taken into > account the new planar averaged seems to be very smeared into the > baseline region (top plot). Even though the baseline has already > been removed from every trial. > > Is this just a result of noise in the single trials and is there > any way to correct for it? Looking at the statistics tutorial data > this does not seem to be an issue for that data set, could it be > caused by some sort of artifacts that i have not taken into account? > > Thanks, > > Marie > > > Script info: > > cfg.keeptrials = 'yes'; > cfg.baseline = [-0.2 0]; > avg = timelockanalysis(cfg, data); > avg = timelockbaseline(cfg,avg); > pl = megplanar(cfg, avg); > plcb = combineplanar(cfg, pl); > > cfg = []; > cfg.keeptrials = 'no'; > cfg.baseline = [-0.2 0]; > avg = timelockanalysis(cfg, data); > avg = timelockbaseline(cfg,avg); > pl = megplanar(cfg, avg); > plcb = combineplanar(cfg, pl); > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and 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/fcdonders/fieldtrip. From marie at PSY.GLA.AC.UK Thu Oct 25 12:00:04 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Thu, 25 Oct 2007 11:00:04 +0100 Subject: Meg planar In-Reply-To: <34CA3DB1-664F-4176-869D-0617E5839998@fcdonders.ru.nl> Message-ID: Dear Jan-Mathijs, Thanks this does make sense and I now see the solution. I already tried removing the baseline as an option inside combineplanar, but I now realise this was only removing the baseline of the average not of the single trials. If I perform baseline correction on the planar transformed single trials it will work out as I expect. Thanks again, Marie On 25 Oct 2007, at 10:40, jan-mathijs schoffelen wrote: > Dear Marie, > > The planar gradient transformation algorithm is not dependent on > single trial, or averaged data as an input. The transformation of > the data, moving from 151 (in your case) axial gradients to 302 > planar gradients, is just the consequence of applying a spatial > transformation matrix on the data. This spatial transformation > matrix is computed from the gradiometer information, and the method > specified (btw: in my experience specifying cfg.method = 'sincos' > gives the best results). Anyway, your problems are introduced when > recombining the planar-data into 151 'sensors' again. This is done > by combineplanar, which applies pythagoras to the -dH and -dV > components of a given sensor. This means that all values become > positive (agree?). Thus, applying this procedure on the single > trials leads to a 'positive' baseline, because the average of > positive valued numbers can never go to zero. > If you are bothered by this, you could perhaps not already subtract > the baseline prior to calling timelockstatistics, but after having > called combineplanar. > > Yours, > > Jan-Mathijs > > > On Oct 24, 2007, at 5:56 PM, Marie Smith wrote: > >> Dear all, >> >> I want to use the planar gradient correction computed on >> individual trials as opposed to the average trial and i am getting >> some strange results. When i compute the planar gradient on the >> average of the trials, it seems to make sense wrt the original >> data (bottom plot, chans*time), however when the single trials are >> taken into account the new planar averaged seems to be very >> smeared into the baseline region (top plot). Even though the >> baseline has already been removed from every trial. >> >> Is this just a result of noise in the single trials and is there >> any way to correct for it? Looking at the statistics tutorial data >> this does not seem to be an issue for that data set, could it be >> caused by some sort of artifacts that i have not taken into account? >> >> Thanks, >> >> Marie >> >> >> Script info: >> >> cfg.keeptrials = 'yes'; >> cfg.baseline = [-0.2 0]; >> avg = timelockanalysis(cfg, data); >> avg = timelockbaseline(cfg,avg); >> pl = megplanar(cfg, avg); >> plcb = combineplanar(cfg, pl); >> >> cfg = []; >> cfg.keeptrials = 'no'; >> cfg.baseline = [-0.2 0]; >> avg = timelockanalysis(cfg, data); >> avg = timelockbaseline(cfg,avg); >> pl = megplanar(cfg, avg); >> plcb = combineplanar(cfg, pl); >> >> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http:// >> listserv.surfnet.nl/archives/fieldtrip.html and 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/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/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Fri Oct 26 10:34:03 2007 From: jan.schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Fri, 26 Oct 2007 10:34:03 +0200 Subject: question about the .previous field Message-ID: Dear Nicolas, The .previous field which is appended to the output-structure's cfg-field is not mandatory for fieldtrip. It's just in order to keep track of the configuration settings of the analysis steps earlier in the pipeline. Thus you can safely remove them. Yours, Jan-Mathijs ----- Original Message ----- From: Nicolas Robitaille Date: Thursday, October 25, 2007 1:50 am Subject: [FIELDTRIP] question about the .previous field > Dear fieldtrip developper, > > I would like to know if the .previous field is mandatory for > current or future usage of fieldtrip. If not, I will remove them > within my script. > > I observe that, for instance while looking at the output of > timelockgrandaverage, the nested structures contain all the > original triggers (avg.cfg.previous{}.previous.event) in the file. > In my case, this end up being a 25 Megabytes variable for an ERP of > 2 sec for 3 electrodes!! Thanks to automatic compression by Matlab, > the saved file is very small (700 k), but loading it on my computer > take more than 6 sec, which end up having drawing routines of very > simple data to take minutes. > > Thanks > > Nicolas > > ************************************ > Nicolas Robitaille, candidat Ph.D > Département de Psychologie > Université de Montréal > C.P. 6128, succursale Centre-ville > Montréal, Québec H3C 3J7 > Tel.: 514-343-6111 x2631 > Fax: 514-343-5787 > ************************************ > > _________________________________________________________________ > Envoie un sourire, fais rire, amuse-toi! Employez-le maintenant! > http://www.emoticonesgratuites.ca/?icid=EMFRCA120 > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/fcdonders/fieldtrip. From michael.wibral at WEB.DE Fri Oct 26 16:42:43 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Fri, 26 Oct 2007 16:42:43 +0200 Subject: plooting Multi-Subject beamforemer results Message-ID: Dear all, I have some problem plotting the output of sourcestatistics. When I use sourceinterpolate to get the template mri and the stats together something goes wrong resulting in strange output, that is defintely not coregistered. When I use "volumenormalise(sourcestats, mri)" to normalize the statistics output once again I'm told that 'sourcestats does not contain any anatomical information'. I am obviously missing something here. I used volumenormalise to get all subjects beamformer images into the same space. Then used sourcegrandaverage to prepare them as an input to sourcestatistics. Is the output of sourcestatistics intended to be a filed in some other structure (e.g. of the sourcegrandaverage type)? Is it possible that this pertains to the mm/cm problem (the output of sourceinterpolate that I used before plotting said something about converting cm to mm or the other way round... Any help on this is welcome. Michael Wibral MEG Unit Brain Imaging Center Frankfurt ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From michael.wibral at WEB.DE Tue Oct 30 14:10:40 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Tue, 30 Oct 2007 14:10:40 +0100 Subject: Problems with plotting sourcestatistics (partially) solved Message-ID: Dear Fieldtrippers, a while ago I posted to this list about some problems with plotting sourcestatistics for multiple subjects. That problem is solved by now, fortunately - the plotting routine after sourcestatistics simply needed an additional cfg.sourceunits='mm' although I do not get exactly where this information got lost on the way. The other problem I have now is that, despite (nonlinear) volume-normalisation the brains of my subjects do not seem to share too many voxels, i.e. the ".inside" field of sourcegrandaverage is pretty small. Even if I fake perfectly matching subjects by feeding the same subject 10 times the area used for the statistics is considerably smaller than the brain in the template MRI. Any idea what could be wrong? I made grid and hdm for the individual subjects as described in the tutorial and used Guido Noltes hdm - is that too spherical, possibly?? my result are especially "brain deficient" at the occipital pole. Thanks for your help, Michael Wibral ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From michael.wibral at WEB.DE Tue Oct 30 14:30:08 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Tue, 30 Oct 2007 14:30:08 +0100 Subject: balancing for nuisance effects in cluster-randomization stats Message-ID: Dear Eric, dear Fieldtrippers, I have a questions regading the control of certain effects that are usually controlled by balancing over subjects in old fashioned analyses: Imagine subjects see stimuli A and B and have to respond with the buttons C (for seeing A) and D (for seeing B). Of course, one could then not distinguish between perceptual effects (response to A,B) and motor effcts (pressing C,D). Usually one would now balance the button presses over subjects such that one (random) half of the subjects gets the inverted instruction (press D when seeing A and press C when seeing B). For an experiment with , say, six subjects one would get then the following set of correct 'trials': set1: {1-AC, 2-AC, 3-AC, 4-AD, 5-AD, 6-AD} set2: {1-BD, 2-BD, 3-BD, 4-BC, 5-BC, 6-BC} If one now tries to check parametrically whether there is an A versus B effect this should work given the balancing has worked. In permutation testing using dependend samples the following happens: One of the permutations will be (last three subjects with exchanged conditions): permutation set1: {1-AC, 2-AC, 3-AC, 4-BC, 5-BC, 6-BC} permutation set2: {1-BD, 2-BD, 3-BD, 4-AD, 5-AD, 6-AD} Hence one will get the full C versus D effect in this permutation sample and similar ones in all permutations that are not too far away from it. If the C versus D effect is a large one (as e.g. button presses tend to be) this will definitely dominate the extreme ends of the cluster-t distribution, killing any chance of detecting an A versus B effect. (I assume that clusterrandomisation also shouldn't work in this case because the prerequsite of exchangeability is violated even when the A/B null hypothesis was true.) Hence, my question how to design an experiment to control for the omnipresent button presses (or motor readiness potentials if one chooses a delayed response paradigm)? Any ideas appreciated, Michael Wibral ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Oct 30 15:38:21 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 30 Oct 2007 15:38:21 +0100 Subject: Problems with plotting sourcestatistics (partially) solved In-Reply-To: Message-ID: Dear Micheal, You could try cfg.inwardshift = -1.5; when you do prepare_leadfield. This makes that the "inside" field becomes larger (negative inside shift is actually an outward shift). Plotting of the grid to see if everything went okay is recommended. This should make the inside of the data coming out of sourcegrandaverage also larger, since that function only uses the voxels present in the inside of all subjects. It worked for me. Good luck, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Michael Wibral Sent: Tuesday, October 30, 2007 2:11 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Problems with plotting sourcestatistics (partially) solved Dear Fieldtrippers, a while ago I posted to this list about some problems with plotting sourcestatistics for multiple subjects. That problem is solved by now, fortunately - the plotting routine after sourcestatistics simply needed an additional cfg.sourceunits='mm' although I do not get exactly where this information got lost on the way. The other problem I have now is that, despite (nonlinear) volume-normalisation the brains of my subjects do not seem to share too many voxels, i.e. the ".inside" field of sourcegrandaverage is pretty small. Even if I fake perfectly matching subjects by feeding the same subject 10 times the area used for the statistics is considerably smaller than the brain in the template MRI. Any idea what could be wrong? I made grid and hdm for the individual subjects as described in the tutorial and used Guido Noltes hdm - is that too spherical, possibly?? my result are especially "brain deficient" at the occipital pole. Thanks for your help, Michael Wibral ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/fcdonders/fieldtrip. From michael.wibral at WEB.DE Tue Oct 30 17:17:28 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Tue, 30 Oct 2007 17:17:28 +0100 Subject: Problems with plotting sourcestatistic s (partially) solved Message-ID: Dear Ingrid, thanks for your quick reply, I'll try the inverse inward-shift and post whther it solved the problem. Michael > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list > Gesendet: 30.10.07 15:50:10 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] Problems with plotting sourcestatistics (partially) solved > > Dear Micheal, > > You could try cfg.inwardshift = -1.5; when you do prepare_leadfield. This > makes that the "inside" field becomes larger (negative inside shift is > actually an outward shift). Plotting of the grid to see if everything went > okay is recommended. This should make the inside of the data coming out of > sourcegrandaverage also larger, since that function only uses the voxels > present in the inside of all subjects. It worked for me. > > Good luck, > Ingrid > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Michael Wibral > Sent: Tuesday, October 30, 2007 2:11 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] Problems with plotting sourcestatistics (partially) > solved > > Dear Fieldtrippers, > > a while ago I posted to this list about some problems with plotting > sourcestatistics for multiple subjects. That problem is solved by now, > fortunately - the plotting routine after sourcestatistics simply needed an > additional cfg.sourceunits='mm' although I do not get exactly where this > information got lost on the way. The other problem I have now is that, > despite (nonlinear) volume-normalisation the brains of my subjects do not > seem to share too many voxels, i.e. the ".inside" field of > sourcegrandaverage > is pretty small. Even if I fake perfectly matching subjects by feeding the > same subject 10 times the area used for the statistics is considerably > smaller than the brain in the template MRI. > Any idea what could be wrong? I made grid and hdm for the individual > subjects as described in the tutorial and used Guido Noltes hdm - is that > too spherical, possibly?? my result are especially "brain deficient" at the > occipital pole. > > Thanks for your help, > Michael Wibral > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From maris at NICI.RU.NL Tue Oct 30 22:15:02 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Tue, 30 Oct 2007 22:15:02 +0100 Subject: balancing for nuisance effects in cluster-randomization stats In-Reply-To: Message-ID: Hi Michael, I think your question is about experimental design (i.c., control for confounding variables) and not about statistics. That being said, you could consider the following: 1. Use a Go-NoGo paradigm and instruct the subject to give the same response (e.g., NoGo) to the stimulus conditions that you want to compare. 2. Use a blocked Go-NoGo paradigm in which you reverse the stimulus-response associations between blocks (A-Go and B-NoGo in block 1, B-Go and A-NoGo in block 2). Good luck, Eric Maris > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of > Michael Wibral > Sent: Tuesday, October 30, 2007 2:30 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] balancing for nuisance effects in cluster-randomization stats > > Dear Eric, dear Fieldtrippers, > > I have a questions regading the control of certain effects that are usually > controlled by balancing over subjects in old fashioned analyses: > Imagine subjects see stimuli A and B and have to respond with the buttons C > (for seeing A) and D (for seeing B). Of course, one could then not > distinguish between perceptual effects (response to A,B) and motor effcts > (pressing C,D). > Usually one would now balance the button presses over subjects such that one > (random) half of the subjects gets the inverted instruction (press D when > seeing A and press C when seeing B). For an experiment with , say, six > subjects one would get then the following set of correct 'trials': > set1: > {1-AC, 2-AC, 3-AC, 4-AD, 5-AD, 6-AD} > set2: > {1-BD, 2-BD, 3-BD, 4-BC, 5-BC, 6-BC} > > If one now tries to check parametrically whether there is an A versus B > effect this should work given the balancing has worked. > In permutation testing using dependend samples the following happens: One of > the permutations will be (last three subjects with exchanged conditions): > permutation set1: > {1-AC, 2-AC, 3-AC, 4-BC, 5-BC, 6-BC} > permutation set2: > {1-BD, 2-BD, 3-BD, 4-AD, 5-AD, 6-AD} > > Hence one will get the full C versus D effect in this permutation sample and > similar ones in all permutations that are not too far away from it. If the C > versus D effect is a large one (as e.g. button presses tend to be) this will > definitely dominate the extreme ends of the cluster-t distribution, killing > any chance of detecting an A versus B effect. (I assume that > clusterrandomisation also shouldn't work in this case because the > prerequsite of exchangeability is violated even when the A/B null hypothesis > was true.) > > Hence, my question how to design an experiment to control for the > omnipresent button presses (or motor readiness potentials if one chooses a > delayed response paradigm)? > > Any ideas appreciated, > Michael Wibral > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/fcdonders/fieldtrip. From michael.wibral at WEB.DE Wed Oct 31 11:57:58 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Wed, 31 Oct 2007 11:57:58 +0100 Subject: balancing for nuisance effects in clus ter-randomization stats Message-ID: Hi Eric, thank you very much for your suggestions. Suggestions (19 wouldn't work because we need a response that differentiates the conditions we want to compare (to check that actually perceived what we wanted them to perceive). But suggestions (2), running a blocked experiment with subsequent averaging over blocks before clusterrandomization should solve the problem. Best Regards, Michael > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list > Gesendet: 30.10.07 22:20:25 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] balancing for nuisance effects in cluster-randomization stats > > Hi Michael, > > > I think your question is about experimental design (i.c., control for > confounding variables) and not about statistics. That being said, you could > consider the following: > > 1. Use a Go-NoGo paradigm and instruct the subject to give the same response > (e.g., NoGo) to the stimulus conditions that you want to compare. > 2. Use a blocked Go-NoGo paradigm in which you reverse the stimulus-response > associations between blocks (A-Go and B-NoGo in block 1, B-Go and A-NoGo in > block 2). > > Good luck, > > Eric Maris > > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of > > Michael Wibral > > Sent: Tuesday, October 30, 2007 2:30 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: [FIELDTRIP] balancing for nuisance effects in > cluster-randomization stats > > > > Dear Eric, dear Fieldtrippers, > > > > I have a questions regading the control of certain effects that are > usually > > controlled by balancing over subjects in old fashioned analyses: > > Imagine subjects see stimuli A and B and have to respond with the buttons > C > > (for seeing A) and D (for seeing B). Of course, one could then not > > distinguish between perceptual effects (response to A,B) and motor effcts > > (pressing C,D). > > Usually one would now balance the button presses over subjects such that > one > > (random) half of the subjects gets the inverted instruction (press D when > > seeing A and press C when seeing B). For an experiment with , say, six > > subjects one would get then the following set of correct 'trials': > > set1: > > {1-AC, 2-AC, 3-AC, 4-AD, 5-AD, 6-AD} > > set2: > > {1-BD, 2-BD, 3-BD, 4-BC, 5-BC, 6-BC} > > > > If one now tries to check parametrically whether there is an A versus B > > effect this should work given the balancing has worked. > > In permutation testing using dependend samples the following happens: One > of > > the permutations will be (last three subjects with exchanged conditions): > > permutation set1: > > {1-AC, 2-AC, 3-AC, 4-BC, 5-BC, 6-BC} > > permutation set2: > > {1-BD, 2-BD, 3-BD, 4-AD, 5-AD, 6-AD} > > > > Hence one will get the full C versus D effect in this permutation sample > and > > similar ones in all permutations that are not too far away from it. If the > C > > versus D effect is a large one (as e.g. button presses tend to be) this > will > > definitely dominate the extreme ends of the cluster-t distribution, > killing > > any chance of detecting an A versus B effect. (I assume that > > clusterrandomisation also shouldn't work in this case because the > > prerequsite of exchangeability is violated even when the A/B null > hypothesis > > was true.) > > > > Hence, my question how to design an experiment to control for the > > omnipresent button presses (or motor readiness potentials if one chooses a > > delayed response paradigm)? > > > > Any ideas appreciated, > > Michael Wibral > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip > > toolbox, to share experiences and to discuss new ideas for MEG and EEG > analysis. > > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > > 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/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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From r.oostenveld at FCDONDERS.RU.NL Mon Oct 1 09:39:32 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 1 Oct 2007 09:39:32 +0200 Subject: Small problem with multiplotER In-Reply-To: <00d501c8004c$f6e7a5b0$f0463ec1@sobell.ion.ucl.ac.uk> Message-ID: Hi Vladimir, The cfg option was not copied along during the subsequent calls to topo->single->topo->single... I fixed it, it will be on the ftp server tonight. thanks Robert On 26 Sep 2007, at 16:52, Vladimir Litvak wrote: > There is a small problem I found using multiplotER. In general it > likes > rotating the electrodes by 90 deg CCW which might justify changing the > defaults. But even when I specify cfg.rotate=0, it affects the > multiplot, > but not the topoplots that are generated from it in the interactive > mode. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marie at PSY.GLA.AC.UK Tue Oct 2 17:33:29 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Tue, 2 Oct 2007 16:33:29 +0100 Subject: volumenormalize reverse mapping In-Reply-To: <003b01c7f925$0f06d280$902dae83@fcdonders.nl> Message-ID: Dear Jan-Mathijs + fellow fieldtrippers, Sorry for my delayed response to your mail. In the end the volumenormalize (with nonlinear = 'no') works fine with a newer version of fieldtrip, and I am able to output the normalised (and non- normalised) functional data to AFNI. Now that I have this working, and can identify group maxima, i would like to be able to transform back into the CTF voxel space. I know the final transformation applied to the data in volumenormalize (norm.cfg.final T2). I had thought that to move from the new space (vox2) to the original (vox1) would would be simple and that I would just have to invert the final transformation matrix as vox1 = inv (T2) * vox2 but this does not seem to be correct. So I am wondering where I am going wrong. Does the norm.cfg.final give the full transformation from ctf to spm space? including flipping any axes, scaling etc. Alternatively, I tried to work out the relationship by using the affine transformation matrix of the original mri in CTF space (MRI_T), and the new transformation matrix of the normalised mri (norm.transform, NORM_T) and some other transformation to go from SPM to CTF co-ords (CTF2SPM) as: NORM_T * vox2 = mm (SPM) = CTF2SPM (mm (CTF)) = CTF2SPM (MRI_T * vox1) i.e. vox1 = inv(MRI_T)*inv(CTF2SPM)*NORM_T*vox2 but again, i think there is a problem somewhere. I am getting the CTF2SPM transformation from the one used inside volumenormalise for this purpose, but perhaps it is incorrect. I would appreciate any suggestions, Thanks, Marie ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Jan.Schoffelen at FCDONDERS.RU.NL Wed Oct 3 10:18:59 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Wed, 3 Oct 2007 10:18:59 +0200 Subject: volumenormalize reverse mapping In-Reply-To: <44F3D521-B219-4AA4-B52E-E86F053147FE@psy.gla.ac.uk> Message-ID: Dear Marie, It seems as if you are almost there. As far as I can see, norm.cfg.final indeed gives you the transformation from ctf2spm-space, so the inversion step is correct. One very important thing to check still, is whether you have the units correct. As far as I know, your 'T2' is expressed in mm. Could it be that your vox2 is expressed in cm? if so, you first have to multiply vox2 by 10 (followed by the usual adding of a row of ones) before the multiplication with the transformation-matrix. Yours, Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From wibral at MPIH-FRANKFURT.MPG.DE Thu Oct 4 12:35:00 2007 From: wibral at MPIH-FRANKFURT.MPG.DE (Michael Wibral) Date: Thu, 4 Oct 2007 12:35:00 +0200 Subject: CTF mri import Message-ID: Dear Fieldtrippers, I was wondering whether anyone has actually succefully imported a recent ctf-mri into fieldtrip. The mri's we have are mistaken to be ASA-mris when I use read_fcdc_mri(MRIFILE). This does not generate an error but never finishes. When I abort the function the error I get shows that read_asa_mri has been used internally. If I enforce the use of read_ctf_mri I get the following error: ??? Error using read_ctf_mri unknown datasize in CTF mri file This is due to the fact that hdr.dataSize is read as being 24397 instead of 1 or 2 as its supposed to be. All of the above is quite obvioussly due to the fact that the whole header inforamtion is read in a misplaced fashion, because the software assumes ctf-mri of version2.2. E.g. the mmPerPixel fields have values around 3.5e+9....etc. Does anybody know / know how to: (1) read CTF mris of version 4 and above ? (2) the changes between version 2.2 and 4.x (I have documentation on the 4.x but not on the 2.x versions). (3) downconvert CTF mris 4.1 and 4.0 to 2.2 ? (4) donwgrade mri-viewer so that it produces version 2.2 images ? (5) get the fiducial information into fieldtrip when not using ctf-mris but spm-analyze mris? I also thought about just using the ctf hdm and then to volume-normalize everything to the MNI template and display things there. This is, however not really optimal as segmentation of the brainshape is unavailable for beamforing in that case... Any help is greatly appreciated, Michael Michael Wibral MEG Unit Brain Imaging Center Frankfurt ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From michael.wibral at WEB.DE Thu Oct 4 13:06:28 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Thu, 4 Oct 2007 13:06:28 +0200 Subject: Reading CTF MRIs version 4 - solution found Message-ID: Dear all, sorry for spamming the list about ctf-mris vesrion4 that fieldtrip couldn't import... I just found out that ctf's mri viewer can actually convert version4 to version 2. Ihope this helps anybody who is ver faced with that problem. Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From nicola.ray at DPAG.OX.AC.UK Tue Oct 9 19:40:23 2007 From: nicola.ray at DPAG.OX.AC.UK (Niki Ray) Date: Tue, 9 Oct 2007 19:40:23 +0200 Subject: neuroscan 16 or 32 bit Message-ID: Dear all, I have collected data using Neuroscan, and I'm trying to import it into fieldtrip. It looks like fieldtrip is expecting it in 16 bit format, but my data is in 32. I can't see any way to change the format. Hope you can help! Many thanks in advance Niki ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From arno at SALK.EDU Tue Oct 9 19:46:31 2007 From: arno at SALK.EDU (Arnaud Delorme) Date: Tue, 9 Oct 2007 19:46:31 +0200 Subject: neuroscan 16 or 32 bit In-Reply-To: Message-ID: Dear Niki, if this is really your problem (I doubt it because most Neuroscan data is 32 bit these days and it would be strange if Fieldtrip could not read it), I would advise using the function in EEGLAB (http://sccn.ucsd.edu/eeglab/). I think the function name is loadcnt(). You can manually toggle between 16 and 32 bits. Best, Arno Niki Ray wrote: > Dear all, > I have collected data using Neuroscan, and I'm trying to import it into > fieldtrip. It looks like fieldtrip is expecting it in 16 bit format, but my > data is in 32. I can't see any way to change the format. > Hope you can help! > Many thanks in advance > Niki > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/fcdonders/fieldtrip. From d.oudebos at GMAIL.COM Thu Oct 11 09:55:08 2007 From: d.oudebos at GMAIL.COM (Danny Oude Bos) Date: Thu, 11 Oct 2007 09:55:08 +0200 Subject: Artefact detection - zsum implementation question Message-ID: At the moment I'm working with the artefact detection functions from Fieldtrip. I think using z-values is very smart, but I do have a question about the implementation. The z-values are calculated per time sample per channel, and then summed over the channels. But to do this, should you not take the absolute values of the z-values? A z-value can be positive or negative depending on a positive or negative deviation from the average. For artefact detection however only the fact that there is a deviation is important, not whether it is positive or negative. Also, summing large positive and large negative deviations could result in a low zsum, while there is most definitely something going on. Thank you for your time. Kind regards, Danny Oude Bos. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Thu Oct 11 17:06:21 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 11 Oct 2007 17:06:21 +0200 Subject: Postdoc research position in Cognitive Neuroscience at the University of Maastricht/FCDC Message-ID: Job Announcement Postdoc research position in Cognitive Neuroscience at the University of Maastricht/F.C. Donders Centre for Cognitive Neuroimaging The Department of Cognitive Neuroscience, Faculty of Psychology, Maastricht University, The Netherlands (www.psychology.unimaas.nl), which hosts the research dedicated Maastricht Brain Imaging Centre (http:// mbic.unimaas.nl/) is recruiting an enthousiastic researcher for a postdoc position in the collaboration with the F.C. Donders Centre for Cognitive Neuroimaging, in Nijmegen, NL (http://www.ru.nl/fcdonders/). The researcher will develop and apply methods to investigate large-scale functional and effective connectivity in the human brain by EEG and/ or MEG. She/He will be working at the F.C. Donders Centre in Nijmegen and has free access to state-of-the-art neuroimaging facilities (MRI, MEG, EEG). Minimum qualifications are a doctoral degree and demonstrated expertise in analysis and synthesis of neuroimaging data, specifically EEG/MEG. Experience with EEG/MEG inverse solutions, connectivity analysis, and MATLAB programming are of added value. The successful candidate will be part of the interdisciplinary teams both at the F.C. Donders Centre and the Maastricht Brain Imaging Centre, and interact with experts on fMRI, EEG, MEG, and TMS. Applicants should send a curriculum vitae, a one-page motivation letter, and the names of two persons that can provide references to Dr. Alard Roebroeck Department of Cognitive Neuroscience Faculty of Psychology Maastricht University P. O. Box 616 6200 MD Maastricht The Netherlands or email a. roebroeck at psychology.unimaas.nl with subject line 'postdoc NIJMEGEN'. Maastricht University is an equal opportunity employer. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ali.mazaheri at FCDONDERS.RU.NL Thu Oct 18 18:46:48 2007 From: ali.mazaheri at FCDONDERS.RU.NL (Ali Mazaheri) Date: Thu, 18 Oct 2007 18:46:48 +0200 Subject: neural activity index (NAI) beamforming... Message-ID: Hello, I decided to NAI to normalize my activations..... sourceNAI.avg.pow = sourcePost.avg.pow ./ sourcePost.avg.noise; but the avg.noise parameter is has zero values ( the only finite numbers in the matrice) my method to beamform has been straightforward cfg = []; cfg.grad = freqdata.grad; cfg.vol = vol; cfg.resolution = 1; cfg.reducerank = 2; cfg.channel = {'MEG'}; cfg.xgrid = 'auto'; cfg.ygrid = 'auto'; cfg.zgrid = 'auto'; [grid] = prepare_leadfield(cfg); cfg = []; cfg.frequency = 18; cfg.method = 'dics'; cfg.projectnoise = 'yes'; cfg.grid = grid; cfg.vol = vol; cfg.lambda = 0; sourcePost = sourceanalysis(cfg,freqdata ); My source.post.avg.pow has non-zero finite values...... any suggestions on what I am doing wrong would be greatly appreciated. Ali ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Thu Oct 18 20:59:51 2007 From: jan.schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Thu, 18 Oct 2007 20:59:51 +0200 Subject: neural activity index (NAI) beamforming... Message-ID: Dear Ali, The most likely reason for your finding is that the cross-spectral density matrix is rank-deficient. A solution would be to use some regularization by means of cfg.lambda = something. A more or less identical problem has been covered some time ago (but then in EEG-data). You might want to search the mailing list's archive (reachable through the fieldtrip-wiki), and search for the subject: problems using dics. Yours, Jan-Mathijs ----- Original Message ----- From: Ali Mazaheri Date: Thursday, October 18, 2007 6:46 pm Subject: [FIELDTRIP] neural activity index (NAI) beamforming... > Hello, > > I decided to NAI to normalize my activations..... > > sourceNAI.avg.pow = sourcePost.avg.pow ./ sourcePost.avg.noise; > > > but the avg.noise parameter is has zero values ( the only finite > numbers > in the matrice) > > > my method to beamform has been straightforward > > > cfg = []; > cfg.grad = freqdata.grad; > cfg.vol = vol; cfg.resolution = 1; > cfg.reducerank = 2; cfg.channel = {'MEG'}; > cfg.xgrid = 'auto'; cfg.ygrid = 'auto'; > cfg.zgrid = 'auto'; > [grid] = prepare_leadfield(cfg); > > > > cfg = []; > cfg.frequency = 18; > cfg.method = 'dics'; > cfg.projectnoise = 'yes'; > cfg.grid = grid; > cfg.vol = vol; cfg.lambda = 0; > sourcePost = sourceanalysis(cfg,freqdata ); > > My source.post.avg.pow has non-zero finite values...... > any suggestions on what I am doing wrong would be greatly > appreciated. > > > > Ali > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/fcdonders/fieldtrip. From bps231 at NYU.EDU Fri Oct 19 01:37:09 2007 From: bps231 at NYU.EDU (Bernhard Staresina) Date: Fri, 19 Oct 2007 01:37:09 +0200 Subject: clusterstats for depth electrodes Message-ID: Dear Fieldtrippers, We have a set of intracranial EEG recordings and would now like to assess statistical differences between two conditions of interest. Using the timelockstatistics function, however, it seems to require a ‘regular’ channel array, which we cannot provide with depth electrodes. That is, we don’t wanna do the cluster analysis across a spatial cluster, but simply across time. Is this possible in the current version? The code we took from the tutorial along with the error message we get is attached below, Thanks, Bernhard --- CODE cfg = []; cfg.correctm = 'no'; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 0; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 100; design = zeros(1,size(cond1.trial,1)+size(cond2.trial,1)); design(1,1:size(cond1.trial,1)) = 1; design(1,(size(cond1.trial,1)+1:(size(cond1.trial,1)+size(cond2.trial,1)))) = 2; cfg.design = design; cfg.ivar = 1; cfg.channel = {'all'}; cfg.latency = [0 1]; [stat] = timelockstatistics(cfg, cond1, cond2); -- ERROR >> [stat] = timelockstatistics(cfg, cond1, cond2); selected 32 channels selected 1000 time bins selected 1 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip-0.9.8/private/prepare_timefreq_data at 310 In fieldtrip-0.9.8/private/statistics_wrapper at 187 In timelockstatistics at 102 ??? Undefined function or variable "sens". Error in ==> neighbourselection at 87 if ~isstruct(sens) Error in ==> fieldtrip-0.9.8/private/statistics_wrapper at 211 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> timelockstatistics at 102 [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/fcdonders/fieldtrip. From maris at NICI.RU.NL Fri Oct 19 07:09:54 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Fri, 19 Oct 2007 07:09:54 +0200 Subject: clusterstats for depth electrodes In-Reply-To: Message-ID: Hi Bernhard, > We have a set of intracranial EEG recordings and would now like to assess > statistical differences between two conditions of interest. Using the > timelockstatistics function, however, it seems to require a 'regular' > channel array, which we cannot provide with depth electrodes. That is, we > don't wanna do the cluster analysis across a spatial cluster, but simply > across time. Is this possible in the current version? > The code we took from the tutorial along with the error message we get is > attached below, If you use cfg.neighbours={} (i.e., an empty neighbourhood structure), you will only cluster in time and (if present) frequency. Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience : www.ru.nl/master/cns/ > > Thanks, > Bernhard > > > --- CODE > > cfg = []; > cfg.correctm = 'no'; > cfg.method = 'montecarlo'; > cfg.statistic = 'indepsamplesT'; > > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 0; > > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 100; > > design = zeros(1,size(cond1.trial,1)+size(cond2.trial,1)); > design(1,1:size(cond1.trial,1)) = 1; > design(1,(size(cond1.trial,1)+1:(size(cond1.trial,1)+size(cond2.trial,1)))) = 2; > > cfg.design = design; > cfg.ivar = 1; > > cfg.channel = {'all'}; > cfg.latency = [0 1]; > > > [stat] = timelockstatistics(cfg, cond1, cond2); > > > -- ERROR > > >> [stat] = timelockstatistics(cfg, cond1, cond2); > selected 32 channels > selected 1000 time bins > selected 1 frequency bins > Warning: PACK can only be used from the MATLAB command line. > > In fieldtrip-0.9.8/private/prepare_timefreq_data at 310 > In fieldtrip-0.9.8/private/statistics_wrapper at 187 > In timelockstatistics at 102 > ??? Undefined function or variable "sens". > > Error in ==> neighbourselection at 87 > if ~isstruct(sens) > > Error in ==> fieldtrip-0.9.8/private/statistics_wrapper at 211 > cfg.neighbours = neighbourselection(cfg,varargin{1}); > > Error in ==> timelockstatistics at 102 > [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/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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.wibral at WEB.DE Fri Oct 19 11:08:46 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Fri, 19 Oct 2007 11:08:46 +0200 Subject: Problems plotting sourcestatistics Message-ID: Dear Fieldtrippers, we have a problem plotting results from multisubject source statistics. The problem seems to be due to the fact that sourcestats are calculated only on the 'inside' voxels and the source stats are returned in a small box (i.e. fewer voxels) because of the omitted 'outside'. If I then you sourceinterpolate to get template MRI and sourcestats together sourceinterpolate seems to think there is a need to stretch the stats voxels (because there are fewer of them than voxels in the anatomy) - smearing the stast all over the anatomy - mostly outside of the brain. Plotting normalized single subjects beamforming images works fine, though. Plotting the results using matlab's 'slice' method also works fine. I pasted the code we used below. Any help is greatly appreciated, Michael Wibral %%%%%%%%%%%%CODE%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%code for normalization%%%%%%%%%%%%%%%%%%%%%%%%%% Design = { 'MKA21_sourceUprightPreInt.mat', 'MKA21_sourceUprightPostInt.mat', 'MKA21_sourceDiffInt.mat' ; ..........more files....... }; PathName = '/net/M036-LFS1/srv/data1/home1/ctillman/data/MooneyMEEGFieldtripAnalysis/BeamformingFieldtrip/'; for i = 1:size(Design,1) % Normalization of condition 1 files fullnamePre = strcat(PathName,Design{i,1}); subjectID = Design{i,1}(1:5); disp(strcat('*******loading ', fullnamePre)); load(fullnamePre); cfg = []; cfg.coordinates = 'ctf'; cfg.template = '/net/M036-LFS1/srv/data1/home1/ctillman/tools/spm2/templates/T1.mnc'; % Normalise sourceUprightPreIntNorm = volumenormalise(cfg,sourceUprightPreInt); sourceUprightPreNormOutfile = strcat(PathName, subjectID,'_SourceUprightPreIntNorm.mat'); save(sourceUprightPreNormOutfile, 'sourceUprightPreIntNorm'); clear sourceUprightPreIntNorm; % Normalization of condition 2 files .......... % Normalization of condition 3 files .......... % check whether normalized data plot OK (they do) cfg = []; cfg.template = '/net/M036-LFS1/srv/data1/home1/ctillman/tools/spm2/templates/T1.mnc'; cfg.method = 'slice'; cfg.funparameter = 'avg.pow'; cfg.maskparameter = cfg.funparameter; cfg.funcolorlim = [0.0 1.2]; cfg.opacitylim = [0.0 1.2]; cfg.opacitymap = 'rampup'; figure; sourceplot(cfg,sourceUprightDiffIntNorm); clear sourceUprightDiffIntNorm; end %%%%%%%%%%%%code for sourcestatistics%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear all; path = '/net/M036-LFS1/srv/data1/home1/ctillman/data/MooneyMEEGFieldtripAnalysis/BeamformingFieldtrip/'; UprightPreNorm = {'MKA21_SourceUprightPreIntNorm.mat'; ..........more files...................... }; UprightPostNorm = {'MKA21_SourceUprightPostIntNorm.mat'; ...................more files...................... }; % 1. Load sourceUprightPreIntNorm for i = 1:length(UprightPreNorm) fullnamePre = strcat(path,UprightPreNorm{i,1}); UprightPre{i} = load(fullnamePre); end % Fix the structure properties for easier handling for l = 1:size(UprightPre,2) UprightPre{l} = UprightPre{l}.sourceUprightPreIntNorm; end % 2. Load sourceUprightPostIntNorm for i = 1:length(UprightPreNorm) fullnamePost = strcat(path,UprightPostNorm{i,1}); UprightPost{i} = load(fullnamePost); end % Fix the structure properties for easier handling for l = 1:size(UprightPost,2) UprightPost{l} = UprightPost{l}.sourceUprightPostIntNorm; end % prepare multisubject data for sourcestatistics (to identify common 'inside' voxels) % using sourcegrandaverage cfg = []; cfg.keepindividual = 'yes'; PostGrandAvg = sourcegrandaverage(cfg,... UprightPost{1},... UprightPost{2},... UprightPost{3},... UprightPost{4},... UprightPost{5},... UprightPost{6},... UprightPost{7},... UprightPost{8},... UprightPost{9},... UprightPost{10},... UprightPost{11},... UprightPost{12},... UprightPost{13},... UprightPost{14},... UprightPost{15},... UprightPost{16},... UprightPost{17}); cfg = []; cfg.keepindividual = 'yes'; PreGrandAvg = sourcegrandaverage(cfg,... UprightPre{1},... UprightPre{2},... UprightPre{3},... UprightPre{4},... UprightPre{5},... UprightPre{6},... UprightPre{7},... UprightPre{8},... UprightPre{9},... UprightPre{10},... UprightPre{11},... UprightPre{12},... UprightPre{13},... UprightPre{14},... UprightPre{15},... UprightPre{16},... UprightPre{17}); % 3. Compute source statistics (uncorrected at the moment) cfg = []; nSubjects = length(UprightPreNorm); a = [1:nSubjects]; b = ones(1,nSubjects); cfg.design = [a a; b (2*b)]; cfg.ivar = 2; % independent variable: condition cfg.uvar = 1; % subjects cfg.method = 'montecarlo'; cfg.numrandomization = 200; cfg.parameter = 'pow'; cfg.statistic = 'depsamplesT'; sourceStat = sourcestatistics(cfg,PostGrandAvg,PreGrandAvg); sourceStatOutfileName = strcat(path,'sourceStat.mat'); save(sourceStatOutfileName, 'sourceStat'); % 4. Plot statistics (code runs but plots are nonsensical) load(strcat(path,'sourceStat.mat')); MRIFilename = strcat(path, 'StandardMRI.mat'); % contains an MRI variable named StandardMRI load(MRIFilename); cfg = []; cfg.funparameter = 'stat'; sourceInterp = sourceinterpolate(cfg, sourceStat, StandardMRI); cfg = []; cfg.method = 'slice'; cfg.funparameter = 'stat'; cfg.maskparameter = cfg.funparameter; cfg.funcolorlim = [2.0 10.2]; cfg.opacitylim = [2.0 10.2]; cfg.opacitymap = 'rampup'; figure; sourceplot(cfg, sourceInterp); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From marie at PSY.GLA.AC.UK Wed Oct 24 17:56:55 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Wed, 24 Oct 2007 16:56:55 +0100 Subject: Meg planar Message-ID: Dear all, I want to use the planar gradient correction computed on individual trials as opposed to the average trial and i am getting some strange results. When i compute the planar gradient on the average of the trials, it seems to make sense wrt the original data (bottom plot, chans*time), however when the single trials are taken into account the new planar averaged seems to be very smeared into the baseline region (top plot). Even though the baseline has already been removed from every trial. Is this just a result of noise in the single trials and is there any way to correct for it? Looking at the statistics tutorial data this does not seem to be an issue for that data set, could it be caused by some sort of artifacts that i have not taken into account? Thanks, Marie Script info: cfg.keeptrials = 'yes'; cfg.baseline = [-0.2 0]; avg = timelockanalysis(cfg, data); avg = timelockbaseline(cfg,avg); pl = megplanar(cfg, avg); plcb = combineplanar(cfg, pl); cfg = []; cfg.keeptrials = 'no'; cfg.baseline = [-0.2 0]; avg = timelockanalysis(cfg, data); avg = timelockbaseline(cfg,avg); pl = megplanar(cfg, avg); plcb = combineplanar(cfg, pl); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Comparison_planar.tiff Type: image/tiff Size: 82920 bytes Desc: not available URL: From enteka at HOTMAIL.COM Thu Oct 25 01:50:29 2007 From: enteka at HOTMAIL.COM (Nicolas Robitaille) Date: Wed, 24 Oct 2007 23:50:29 +0000 Subject: question about the .previous field Message-ID: Dear fieldtrip developper, I would like to know if the .previous field is mandatory for current or future usage of fieldtrip. If not, I will remove them within my script. I observe that, for instance while looking at the output of timelockgrandaverage, the nested structures contain all the original triggers (avg.cfg.previous{}.previous.event) in the file. In my case, this end up being a 25 Megabytes variable for an ERP of 2 sec for 3 electrodes!! Thanks to automatic compression by Matlab, the saved file is very small (700 k), but loading it on my computer take more than 6 sec, which end up having drawing routines of very simple data to take minutes. Thanks Nicolas ************************************ Nicolas Robitaille, candidat Ph.D Département de Psychologie Université de Montréal C.P. 6128, succursale Centre-ville Montréal, Québec H3C 3J7 Tel.: 514-343-6111 x2631 Fax: 514-343-5787 ************************************ _________________________________________________________________ Envoie un sourire, fais rire, amuse-toi! Employez-le maintenant! http://www.emoticonesgratuites.ca/?icid=EMFRCA120 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Thu Oct 25 11:40:14 2007 From: jan.schoffelen at FCDONDERS.RU.NL (jan-mathijs schoffelen) Date: Thu, 25 Oct 2007 11:40:14 +0200 Subject: Meg planar In-Reply-To: Message-ID: Dear Marie, The planar gradient transformation algorithm is not dependent on single trial, or averaged data as an input. The transformation of the data, moving from 151 (in your case) axial gradients to 302 planar gradients, is just the consequence of applying a spatial transformation matrix on the data. This spatial transformation matrix is computed from the gradiometer information, and the method specified (btw: in my experience specifying cfg.method = 'sincos' gives the best results). Anyway, your problems are introduced when recombining the planar-data into 151 'sensors' again. This is done by combineplanar, which applies pythagoras to the -dH and -dV components of a given sensor. This means that all values become positive (agree?). Thus, applying this procedure on the single trials leads to a 'positive' baseline, because the average of positive valued numbers can never go to zero. If you are bothered by this, you could perhaps not already subtract the baseline prior to calling timelockstatistics, but after having called combineplanar. Yours, Jan-Mathijs On Oct 24, 2007, at 5:56 PM, Marie Smith wrote: > Dear all, > > I want to use the planar gradient correction computed on individual > trials as opposed to the average trial and i am getting some > strange results. When i compute the planar gradient on the average > of the trials, it seems to make sense wrt the original data (bottom > plot, chans*time), however when the single trials are taken into > account the new planar averaged seems to be very smeared into the > baseline region (top plot). Even though the baseline has already > been removed from every trial. > > Is this just a result of noise in the single trials and is there > any way to correct for it? Looking at the statistics tutorial data > this does not seem to be an issue for that data set, could it be > caused by some sort of artifacts that i have not taken into account? > > Thanks, > > Marie > > > Script info: > > cfg.keeptrials = 'yes'; > cfg.baseline = [-0.2 0]; > avg = timelockanalysis(cfg, data); > avg = timelockbaseline(cfg,avg); > pl = megplanar(cfg, avg); > plcb = combineplanar(cfg, pl); > > cfg = []; > cfg.keeptrials = 'no'; > cfg.baseline = [-0.2 0]; > avg = timelockanalysis(cfg, data); > avg = timelockbaseline(cfg,avg); > pl = megplanar(cfg, avg); > plcb = combineplanar(cfg, pl); > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and 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/fcdonders/fieldtrip. From marie at PSY.GLA.AC.UK Thu Oct 25 12:00:04 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Thu, 25 Oct 2007 11:00:04 +0100 Subject: Meg planar In-Reply-To: <34CA3DB1-664F-4176-869D-0617E5839998@fcdonders.ru.nl> Message-ID: Dear Jan-Mathijs, Thanks this does make sense and I now see the solution. I already tried removing the baseline as an option inside combineplanar, but I now realise this was only removing the baseline of the average not of the single trials. If I perform baseline correction on the planar transformed single trials it will work out as I expect. Thanks again, Marie On 25 Oct 2007, at 10:40, jan-mathijs schoffelen wrote: > Dear Marie, > > The planar gradient transformation algorithm is not dependent on > single trial, or averaged data as an input. The transformation of > the data, moving from 151 (in your case) axial gradients to 302 > planar gradients, is just the consequence of applying a spatial > transformation matrix on the data. This spatial transformation > matrix is computed from the gradiometer information, and the method > specified (btw: in my experience specifying cfg.method = 'sincos' > gives the best results). Anyway, your problems are introduced when > recombining the planar-data into 151 'sensors' again. This is done > by combineplanar, which applies pythagoras to the -dH and -dV > components of a given sensor. This means that all values become > positive (agree?). Thus, applying this procedure on the single > trials leads to a 'positive' baseline, because the average of > positive valued numbers can never go to zero. > If you are bothered by this, you could perhaps not already subtract > the baseline prior to calling timelockstatistics, but after having > called combineplanar. > > Yours, > > Jan-Mathijs > > > On Oct 24, 2007, at 5:56 PM, Marie Smith wrote: > >> Dear all, >> >> I want to use the planar gradient correction computed on >> individual trials as opposed to the average trial and i am getting >> some strange results. When i compute the planar gradient on the >> average of the trials, it seems to make sense wrt the original >> data (bottom plot, chans*time), however when the single trials are >> taken into account the new planar averaged seems to be very >> smeared into the baseline region (top plot). Even though the >> baseline has already been removed from every trial. >> >> Is this just a result of noise in the single trials and is there >> any way to correct for it? Looking at the statistics tutorial data >> this does not seem to be an issue for that data set, could it be >> caused by some sort of artifacts that i have not taken into account? >> >> Thanks, >> >> Marie >> >> >> Script info: >> >> cfg.keeptrials = 'yes'; >> cfg.baseline = [-0.2 0]; >> avg = timelockanalysis(cfg, data); >> avg = timelockbaseline(cfg,avg); >> pl = megplanar(cfg, avg); >> plcb = combineplanar(cfg, pl); >> >> cfg = []; >> cfg.keeptrials = 'no'; >> cfg.baseline = [-0.2 0]; >> avg = timelockanalysis(cfg, data); >> avg = timelockbaseline(cfg,avg); >> pl = megplanar(cfg, avg); >> plcb = combineplanar(cfg, pl); >> >> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http:// >> listserv.surfnet.nl/archives/fieldtrip.html and 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/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/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Fri Oct 26 10:34:03 2007 From: jan.schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Fri, 26 Oct 2007 10:34:03 +0200 Subject: question about the .previous field Message-ID: Dear Nicolas, The .previous field which is appended to the output-structure's cfg-field is not mandatory for fieldtrip. It's just in order to keep track of the configuration settings of the analysis steps earlier in the pipeline. Thus you can safely remove them. Yours, Jan-Mathijs ----- Original Message ----- From: Nicolas Robitaille Date: Thursday, October 25, 2007 1:50 am Subject: [FIELDTRIP] question about the .previous field > Dear fieldtrip developper, > > I would like to know if the .previous field is mandatory for > current or future usage of fieldtrip. If not, I will remove them > within my script. > > I observe that, for instance while looking at the output of > timelockgrandaverage, the nested structures contain all the > original triggers (avg.cfg.previous{}.previous.event) in the file. > In my case, this end up being a 25 Megabytes variable for an ERP of > 2 sec for 3 electrodes!! Thanks to automatic compression by Matlab, > the saved file is very small (700 k), but loading it on my computer > take more than 6 sec, which end up having drawing routines of very > simple data to take minutes. > > Thanks > > Nicolas > > ************************************ > Nicolas Robitaille, candidat Ph.D > Département de Psychologie > Université de Montréal > C.P. 6128, succursale Centre-ville > Montréal, Québec H3C 3J7 > Tel.: 514-343-6111 x2631 > Fax: 514-343-5787 > ************************************ > > _________________________________________________________________ > Envoie un sourire, fais rire, amuse-toi! Employez-le maintenant! > http://www.emoticonesgratuites.ca/?icid=EMFRCA120 > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/fcdonders/fieldtrip. From michael.wibral at WEB.DE Fri Oct 26 16:42:43 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Fri, 26 Oct 2007 16:42:43 +0200 Subject: plooting Multi-Subject beamforemer results Message-ID: Dear all, I have some problem plotting the output of sourcestatistics. When I use sourceinterpolate to get the template mri and the stats together something goes wrong resulting in strange output, that is defintely not coregistered. When I use "volumenormalise(sourcestats, mri)" to normalize the statistics output once again I'm told that 'sourcestats does not contain any anatomical information'. I am obviously missing something here. I used volumenormalise to get all subjects beamformer images into the same space. Then used sourcegrandaverage to prepare them as an input to sourcestatistics. Is the output of sourcestatistics intended to be a filed in some other structure (e.g. of the sourcegrandaverage type)? Is it possible that this pertains to the mm/cm problem (the output of sourceinterpolate that I used before plotting said something about converting cm to mm or the other way round... Any help on this is welcome. Michael Wibral MEG Unit Brain Imaging Center Frankfurt ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From michael.wibral at WEB.DE Tue Oct 30 14:10:40 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Tue, 30 Oct 2007 14:10:40 +0100 Subject: Problems with plotting sourcestatistics (partially) solved Message-ID: Dear Fieldtrippers, a while ago I posted to this list about some problems with plotting sourcestatistics for multiple subjects. That problem is solved by now, fortunately - the plotting routine after sourcestatistics simply needed an additional cfg.sourceunits='mm' although I do not get exactly where this information got lost on the way. The other problem I have now is that, despite (nonlinear) volume-normalisation the brains of my subjects do not seem to share too many voxels, i.e. the ".inside" field of sourcegrandaverage is pretty small. Even if I fake perfectly matching subjects by feeding the same subject 10 times the area used for the statistics is considerably smaller than the brain in the template MRI. Any idea what could be wrong? I made grid and hdm for the individual subjects as described in the tutorial and used Guido Noltes hdm - is that too spherical, possibly?? my result are especially "brain deficient" at the occipital pole. Thanks for your help, Michael Wibral ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From michael.wibral at WEB.DE Tue Oct 30 14:30:08 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Tue, 30 Oct 2007 14:30:08 +0100 Subject: balancing for nuisance effects in cluster-randomization stats Message-ID: Dear Eric, dear Fieldtrippers, I have a questions regading the control of certain effects that are usually controlled by balancing over subjects in old fashioned analyses: Imagine subjects see stimuli A and B and have to respond with the buttons C (for seeing A) and D (for seeing B). Of course, one could then not distinguish between perceptual effects (response to A,B) and motor effcts (pressing C,D). Usually one would now balance the button presses over subjects such that one (random) half of the subjects gets the inverted instruction (press D when seeing A and press C when seeing B). For an experiment with , say, six subjects one would get then the following set of correct 'trials': set1: {1-AC, 2-AC, 3-AC, 4-AD, 5-AD, 6-AD} set2: {1-BD, 2-BD, 3-BD, 4-BC, 5-BC, 6-BC} If one now tries to check parametrically whether there is an A versus B effect this should work given the balancing has worked. In permutation testing using dependend samples the following happens: One of the permutations will be (last three subjects with exchanged conditions): permutation set1: {1-AC, 2-AC, 3-AC, 4-BC, 5-BC, 6-BC} permutation set2: {1-BD, 2-BD, 3-BD, 4-AD, 5-AD, 6-AD} Hence one will get the full C versus D effect in this permutation sample and similar ones in all permutations that are not too far away from it. If the C versus D effect is a large one (as e.g. button presses tend to be) this will definitely dominate the extreme ends of the cluster-t distribution, killing any chance of detecting an A versus B effect. (I assume that clusterrandomisation also shouldn't work in this case because the prerequsite of exchangeability is violated even when the A/B null hypothesis was true.) Hence, my question how to design an experiment to control for the omnipresent button presses (or motor readiness potentials if one chooses a delayed response paradigm)? Any ideas appreciated, Michael Wibral ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Oct 30 15:38:21 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 30 Oct 2007 15:38:21 +0100 Subject: Problems with plotting sourcestatistics (partially) solved In-Reply-To: Message-ID: Dear Micheal, You could try cfg.inwardshift = -1.5; when you do prepare_leadfield. This makes that the "inside" field becomes larger (negative inside shift is actually an outward shift). Plotting of the grid to see if everything went okay is recommended. This should make the inside of the data coming out of sourcegrandaverage also larger, since that function only uses the voxels present in the inside of all subjects. It worked for me. Good luck, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Michael Wibral Sent: Tuesday, October 30, 2007 2:11 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Problems with plotting sourcestatistics (partially) solved Dear Fieldtrippers, a while ago I posted to this list about some problems with plotting sourcestatistics for multiple subjects. That problem is solved by now, fortunately - the plotting routine after sourcestatistics simply needed an additional cfg.sourceunits='mm' although I do not get exactly where this information got lost on the way. The other problem I have now is that, despite (nonlinear) volume-normalisation the brains of my subjects do not seem to share too many voxels, i.e. the ".inside" field of sourcegrandaverage is pretty small. Even if I fake perfectly matching subjects by feeding the same subject 10 times the area used for the statistics is considerably smaller than the brain in the template MRI. Any idea what could be wrong? I made grid and hdm for the individual subjects as described in the tutorial and used Guido Noltes hdm - is that too spherical, possibly?? my result are especially "brain deficient" at the occipital pole. Thanks for your help, Michael Wibral ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/fcdonders/fieldtrip. From michael.wibral at WEB.DE Tue Oct 30 17:17:28 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Tue, 30 Oct 2007 17:17:28 +0100 Subject: Problems with plotting sourcestatistic s (partially) solved Message-ID: Dear Ingrid, thanks for your quick reply, I'll try the inverse inward-shift and post whther it solved the problem. Michael > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list > Gesendet: 30.10.07 15:50:10 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] Problems with plotting sourcestatistics (partially) solved > > Dear Micheal, > > You could try cfg.inwardshift = -1.5; when you do prepare_leadfield. This > makes that the "inside" field becomes larger (negative inside shift is > actually an outward shift). Plotting of the grid to see if everything went > okay is recommended. This should make the inside of the data coming out of > sourcegrandaverage also larger, since that function only uses the voxels > present in the inside of all subjects. It worked for me. > > Good luck, > Ingrid > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Michael Wibral > Sent: Tuesday, October 30, 2007 2:11 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] Problems with plotting sourcestatistics (partially) > solved > > Dear Fieldtrippers, > > a while ago I posted to this list about some problems with plotting > sourcestatistics for multiple subjects. That problem is solved by now, > fortunately - the plotting routine after sourcestatistics simply needed an > additional cfg.sourceunits='mm' although I do not get exactly where this > information got lost on the way. The other problem I have now is that, > despite (nonlinear) volume-normalisation the brains of my subjects do not > seem to share too many voxels, i.e. the ".inside" field of > sourcegrandaverage > is pretty small. Even if I fake perfectly matching subjects by feeding the > same subject 10 times the area used for the statistics is considerably > smaller than the brain in the template MRI. > Any idea what could be wrong? I made grid and hdm for the individual > subjects as described in the tutorial and used Guido Noltes hdm - is that > too spherical, possibly?? my result are especially "brain deficient" at the > occipital pole. > > Thanks for your help, > Michael Wibral > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From maris at NICI.RU.NL Tue Oct 30 22:15:02 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Tue, 30 Oct 2007 22:15:02 +0100 Subject: balancing for nuisance effects in cluster-randomization stats In-Reply-To: Message-ID: Hi Michael, I think your question is about experimental design (i.c., control for confounding variables) and not about statistics. That being said, you could consider the following: 1. Use a Go-NoGo paradigm and instruct the subject to give the same response (e.g., NoGo) to the stimulus conditions that you want to compare. 2. Use a blocked Go-NoGo paradigm in which you reverse the stimulus-response associations between blocks (A-Go and B-NoGo in block 1, B-Go and A-NoGo in block 2). Good luck, Eric Maris > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of > Michael Wibral > Sent: Tuesday, October 30, 2007 2:30 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] balancing for nuisance effects in cluster-randomization stats > > Dear Eric, dear Fieldtrippers, > > I have a questions regading the control of certain effects that are usually > controlled by balancing over subjects in old fashioned analyses: > Imagine subjects see stimuli A and B and have to respond with the buttons C > (for seeing A) and D (for seeing B). Of course, one could then not > distinguish between perceptual effects (response to A,B) and motor effcts > (pressing C,D). > Usually one would now balance the button presses over subjects such that one > (random) half of the subjects gets the inverted instruction (press D when > seeing A and press C when seeing B). For an experiment with , say, six > subjects one would get then the following set of correct 'trials': > set1: > {1-AC, 2-AC, 3-AC, 4-AD, 5-AD, 6-AD} > set2: > {1-BD, 2-BD, 3-BD, 4-BC, 5-BC, 6-BC} > > If one now tries to check parametrically whether there is an A versus B > effect this should work given the balancing has worked. > In permutation testing using dependend samples the following happens: One of > the permutations will be (last three subjects with exchanged conditions): > permutation set1: > {1-AC, 2-AC, 3-AC, 4-BC, 5-BC, 6-BC} > permutation set2: > {1-BD, 2-BD, 3-BD, 4-AD, 5-AD, 6-AD} > > Hence one will get the full C versus D effect in this permutation sample and > similar ones in all permutations that are not too far away from it. If the C > versus D effect is a large one (as e.g. button presses tend to be) this will > definitely dominate the extreme ends of the cluster-t distribution, killing > any chance of detecting an A versus B effect. (I assume that > clusterrandomisation also shouldn't work in this case because the > prerequsite of exchangeability is violated even when the A/B null hypothesis > was true.) > > Hence, my question how to design an experiment to control for the > omnipresent button presses (or motor readiness potentials if one chooses a > delayed response paradigm)? > > Any ideas appreciated, > Michael Wibral > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/fcdonders/fieldtrip. From michael.wibral at WEB.DE Wed Oct 31 11:57:58 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Wed, 31 Oct 2007 11:57:58 +0100 Subject: balancing for nuisance effects in clus ter-randomization stats Message-ID: Hi Eric, thank you very much for your suggestions. Suggestions (19 wouldn't work because we need a response that differentiates the conditions we want to compare (to check that actually perceived what we wanted them to perceive). But suggestions (2), running a blocked experiment with subsequent averaging over blocks before clusterrandomization should solve the problem. Best Regards, Michael > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list > Gesendet: 30.10.07 22:20:25 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] balancing for nuisance effects in cluster-randomization stats > > Hi Michael, > > > I think your question is about experimental design (i.c., control for > confounding variables) and not about statistics. That being said, you could > consider the following: > > 1. Use a Go-NoGo paradigm and instruct the subject to give the same response > (e.g., NoGo) to the stimulus conditions that you want to compare. > 2. Use a blocked Go-NoGo paradigm in which you reverse the stimulus-response > associations between blocks (A-Go and B-NoGo in block 1, B-Go and A-NoGo in > block 2). > > Good luck, > > Eric Maris > > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of > > Michael Wibral > > Sent: Tuesday, October 30, 2007 2:30 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: [FIELDTRIP] balancing for nuisance effects in > cluster-randomization stats > > > > Dear Eric, dear Fieldtrippers, > > > > I have a questions regading the control of certain effects that are > usually > > controlled by balancing over subjects in old fashioned analyses: > > Imagine subjects see stimuli A and B and have to respond with the buttons > C > > (for seeing A) and D (for seeing B). Of course, one could then not > > distinguish between perceptual effects (response to A,B) and motor effcts > > (pressing C,D). > > Usually one would now balance the button presses over subjects such that > one > > (random) half of the subjects gets the inverted instruction (press D when > > seeing A and press C when seeing B). For an experiment with , say, six > > subjects one would get then the following set of correct 'trials': > > set1: > > {1-AC, 2-AC, 3-AC, 4-AD, 5-AD, 6-AD} > > set2: > > {1-BD, 2-BD, 3-BD, 4-BC, 5-BC, 6-BC} > > > > If one now tries to check parametrically whether there is an A versus B > > effect this should work given the balancing has worked. > > In permutation testing using dependend samples the following happens: One > of > > the permutations will be (last three subjects with exchanged conditions): > > permutation set1: > > {1-AC, 2-AC, 3-AC, 4-BC, 5-BC, 6-BC} > > permutation set2: > > {1-BD, 2-BD, 3-BD, 4-AD, 5-AD, 6-AD} > > > > Hence one will get the full C versus D effect in this permutation sample > and > > similar ones in all permutations that are not too far away from it. If the > C > > versus D effect is a large one (as e.g. button presses tend to be) this > will > > definitely dominate the extreme ends of the cluster-t distribution, > killing > > any chance of detecting an A versus B effect. (I assume that > > clusterrandomisation also shouldn't work in this case because the > > prerequsite of exchangeability is violated even when the A/B null > hypothesis > > was true.) > > > > Hence, my question how to design an experiment to control for the > > omnipresent button presses (or motor readiness potentials if one chooses a > > delayed response paradigm)? > > > > Any ideas appreciated, > > Michael Wibral > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip > > toolbox, to share experiences and to discuss new ideas for MEG and EEG > analysis. > > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > > 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/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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From r.oostenveld at FCDONDERS.RU.NL Mon Oct 1 09:39:32 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 1 Oct 2007 09:39:32 +0200 Subject: Small problem with multiplotER In-Reply-To: <00d501c8004c$f6e7a5b0$f0463ec1@sobell.ion.ucl.ac.uk> Message-ID: Hi Vladimir, The cfg option was not copied along during the subsequent calls to topo->single->topo->single... I fixed it, it will be on the ftp server tonight. thanks Robert On 26 Sep 2007, at 16:52, Vladimir Litvak wrote: > There is a small problem I found using multiplotER. In general it > likes > rotating the electrodes by 90 deg CCW which might justify changing the > defaults. But even when I specify cfg.rotate=0, it affects the > multiplot, > but not the topoplots that are generated from it in the interactive > mode. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marie at PSY.GLA.AC.UK Tue Oct 2 17:33:29 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Tue, 2 Oct 2007 16:33:29 +0100 Subject: volumenormalize reverse mapping In-Reply-To: <003b01c7f925$0f06d280$902dae83@fcdonders.nl> Message-ID: Dear Jan-Mathijs + fellow fieldtrippers, Sorry for my delayed response to your mail. In the end the volumenormalize (with nonlinear = 'no') works fine with a newer version of fieldtrip, and I am able to output the normalised (and non- normalised) functional data to AFNI. Now that I have this working, and can identify group maxima, i would like to be able to transform back into the CTF voxel space. I know the final transformation applied to the data in volumenormalize (norm.cfg.final T2). I had thought that to move from the new space (vox2) to the original (vox1) would would be simple and that I would just have to invert the final transformation matrix as vox1 = inv (T2) * vox2 but this does not seem to be correct. So I am wondering where I am going wrong. Does the norm.cfg.final give the full transformation from ctf to spm space? including flipping any axes, scaling etc. Alternatively, I tried to work out the relationship by using the affine transformation matrix of the original mri in CTF space (MRI_T), and the new transformation matrix of the normalised mri (norm.transform, NORM_T) and some other transformation to go from SPM to CTF co-ords (CTF2SPM) as: NORM_T * vox2 = mm (SPM) = CTF2SPM (mm (CTF)) = CTF2SPM (MRI_T * vox1) i.e. vox1 = inv(MRI_T)*inv(CTF2SPM)*NORM_T*vox2 but again, i think there is a problem somewhere. I am getting the CTF2SPM transformation from the one used inside volumenormalise for this purpose, but perhaps it is incorrect. I would appreciate any suggestions, Thanks, Marie ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Jan.Schoffelen at FCDONDERS.RU.NL Wed Oct 3 10:18:59 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Wed, 3 Oct 2007 10:18:59 +0200 Subject: volumenormalize reverse mapping In-Reply-To: <44F3D521-B219-4AA4-B52E-E86F053147FE@psy.gla.ac.uk> Message-ID: Dear Marie, It seems as if you are almost there. As far as I can see, norm.cfg.final indeed gives you the transformation from ctf2spm-space, so the inversion step is correct. One very important thing to check still, is whether you have the units correct. As far as I know, your 'T2' is expressed in mm. Could it be that your vox2 is expressed in cm? if so, you first have to multiply vox2 by 10 (followed by the usual adding of a row of ones) before the multiplication with the transformation-matrix. Yours, Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From wibral at MPIH-FRANKFURT.MPG.DE Thu Oct 4 12:35:00 2007 From: wibral at MPIH-FRANKFURT.MPG.DE (Michael Wibral) Date: Thu, 4 Oct 2007 12:35:00 +0200 Subject: CTF mri import Message-ID: Dear Fieldtrippers, I was wondering whether anyone has actually succefully imported a recent ctf-mri into fieldtrip. The mri's we have are mistaken to be ASA-mris when I use read_fcdc_mri(MRIFILE). This does not generate an error but never finishes. When I abort the function the error I get shows that read_asa_mri has been used internally. If I enforce the use of read_ctf_mri I get the following error: ??? Error using read_ctf_mri unknown datasize in CTF mri file This is due to the fact that hdr.dataSize is read as being 24397 instead of 1 or 2 as its supposed to be. All of the above is quite obvioussly due to the fact that the whole header inforamtion is read in a misplaced fashion, because the software assumes ctf-mri of version2.2. E.g. the mmPerPixel fields have values around 3.5e+9....etc. Does anybody know / know how to: (1) read CTF mris of version 4 and above ? (2) the changes between version 2.2 and 4.x (I have documentation on the 4.x but not on the 2.x versions). (3) downconvert CTF mris 4.1 and 4.0 to 2.2 ? (4) donwgrade mri-viewer so that it produces version 2.2 images ? (5) get the fiducial information into fieldtrip when not using ctf-mris but spm-analyze mris? I also thought about just using the ctf hdm and then to volume-normalize everything to the MNI template and display things there. This is, however not really optimal as segmentation of the brainshape is unavailable for beamforing in that case... Any help is greatly appreciated, Michael Michael Wibral MEG Unit Brain Imaging Center Frankfurt ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From michael.wibral at WEB.DE Thu Oct 4 13:06:28 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Thu, 4 Oct 2007 13:06:28 +0200 Subject: Reading CTF MRIs version 4 - solution found Message-ID: Dear all, sorry for spamming the list about ctf-mris vesrion4 that fieldtrip couldn't import... I just found out that ctf's mri viewer can actually convert version4 to version 2. Ihope this helps anybody who is ver faced with that problem. Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From nicola.ray at DPAG.OX.AC.UK Tue Oct 9 19:40:23 2007 From: nicola.ray at DPAG.OX.AC.UK (Niki Ray) Date: Tue, 9 Oct 2007 19:40:23 +0200 Subject: neuroscan 16 or 32 bit Message-ID: Dear all, I have collected data using Neuroscan, and I'm trying to import it into fieldtrip. It looks like fieldtrip is expecting it in 16 bit format, but my data is in 32. I can't see any way to change the format. Hope you can help! Many thanks in advance Niki ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From arno at SALK.EDU Tue Oct 9 19:46:31 2007 From: arno at SALK.EDU (Arnaud Delorme) Date: Tue, 9 Oct 2007 19:46:31 +0200 Subject: neuroscan 16 or 32 bit In-Reply-To: Message-ID: Dear Niki, if this is really your problem (I doubt it because most Neuroscan data is 32 bit these days and it would be strange if Fieldtrip could not read it), I would advise using the function in EEGLAB (http://sccn.ucsd.edu/eeglab/). I think the function name is loadcnt(). You can manually toggle between 16 and 32 bits. Best, Arno Niki Ray wrote: > Dear all, > I have collected data using Neuroscan, and I'm trying to import it into > fieldtrip. It looks like fieldtrip is expecting it in 16 bit format, but my > data is in 32. I can't see any way to change the format. > Hope you can help! > Many thanks in advance > Niki > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/fcdonders/fieldtrip. From d.oudebos at GMAIL.COM Thu Oct 11 09:55:08 2007 From: d.oudebos at GMAIL.COM (Danny Oude Bos) Date: Thu, 11 Oct 2007 09:55:08 +0200 Subject: Artefact detection - zsum implementation question Message-ID: At the moment I'm working with the artefact detection functions from Fieldtrip. I think using z-values is very smart, but I do have a question about the implementation. The z-values are calculated per time sample per channel, and then summed over the channels. But to do this, should you not take the absolute values of the z-values? A z-value can be positive or negative depending on a positive or negative deviation from the average. For artefact detection however only the fact that there is a deviation is important, not whether it is positive or negative. Also, summing large positive and large negative deviations could result in a low zsum, while there is most definitely something going on. Thank you for your time. Kind regards, Danny Oude Bos. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Thu Oct 11 17:06:21 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 11 Oct 2007 17:06:21 +0200 Subject: Postdoc research position in Cognitive Neuroscience at the University of Maastricht/FCDC Message-ID: Job Announcement Postdoc research position in Cognitive Neuroscience at the University of Maastricht/F.C. Donders Centre for Cognitive Neuroimaging The Department of Cognitive Neuroscience, Faculty of Psychology, Maastricht University, The Netherlands (www.psychology.unimaas.nl), which hosts the research dedicated Maastricht Brain Imaging Centre (http:// mbic.unimaas.nl/) is recruiting an enthousiastic researcher for a postdoc position in the collaboration with the F.C. Donders Centre for Cognitive Neuroimaging, in Nijmegen, NL (http://www.ru.nl/fcdonders/). The researcher will develop and apply methods to investigate large-scale functional and effective connectivity in the human brain by EEG and/ or MEG. She/He will be working at the F.C. Donders Centre in Nijmegen and has free access to state-of-the-art neuroimaging facilities (MRI, MEG, EEG). Minimum qualifications are a doctoral degree and demonstrated expertise in analysis and synthesis of neuroimaging data, specifically EEG/MEG. Experience with EEG/MEG inverse solutions, connectivity analysis, and MATLAB programming are of added value. The successful candidate will be part of the interdisciplinary teams both at the F.C. Donders Centre and the Maastricht Brain Imaging Centre, and interact with experts on fMRI, EEG, MEG, and TMS. Applicants should send a curriculum vitae, a one-page motivation letter, and the names of two persons that can provide references to Dr. Alard Roebroeck Department of Cognitive Neuroscience Faculty of Psychology Maastricht University P. O. Box 616 6200 MD Maastricht The Netherlands or email a. roebroeck at psychology.unimaas.nl with subject line 'postdoc NIJMEGEN'. Maastricht University is an equal opportunity employer. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ali.mazaheri at FCDONDERS.RU.NL Thu Oct 18 18:46:48 2007 From: ali.mazaheri at FCDONDERS.RU.NL (Ali Mazaheri) Date: Thu, 18 Oct 2007 18:46:48 +0200 Subject: neural activity index (NAI) beamforming... Message-ID: Hello, I decided to NAI to normalize my activations..... sourceNAI.avg.pow = sourcePost.avg.pow ./ sourcePost.avg.noise; but the avg.noise parameter is has zero values ( the only finite numbers in the matrice) my method to beamform has been straightforward cfg = []; cfg.grad = freqdata.grad; cfg.vol = vol; cfg.resolution = 1; cfg.reducerank = 2; cfg.channel = {'MEG'}; cfg.xgrid = 'auto'; cfg.ygrid = 'auto'; cfg.zgrid = 'auto'; [grid] = prepare_leadfield(cfg); cfg = []; cfg.frequency = 18; cfg.method = 'dics'; cfg.projectnoise = 'yes'; cfg.grid = grid; cfg.vol = vol; cfg.lambda = 0; sourcePost = sourceanalysis(cfg,freqdata ); My source.post.avg.pow has non-zero finite values...... any suggestions on what I am doing wrong would be greatly appreciated. Ali ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Thu Oct 18 20:59:51 2007 From: jan.schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Thu, 18 Oct 2007 20:59:51 +0200 Subject: neural activity index (NAI) beamforming... Message-ID: Dear Ali, The most likely reason for your finding is that the cross-spectral density matrix is rank-deficient. A solution would be to use some regularization by means of cfg.lambda = something. A more or less identical problem has been covered some time ago (but then in EEG-data). You might want to search the mailing list's archive (reachable through the fieldtrip-wiki), and search for the subject: problems using dics. Yours, Jan-Mathijs ----- Original Message ----- From: Ali Mazaheri Date: Thursday, October 18, 2007 6:46 pm Subject: [FIELDTRIP] neural activity index (NAI) beamforming... > Hello, > > I decided to NAI to normalize my activations..... > > sourceNAI.avg.pow = sourcePost.avg.pow ./ sourcePost.avg.noise; > > > but the avg.noise parameter is has zero values ( the only finite > numbers > in the matrice) > > > my method to beamform has been straightforward > > > cfg = []; > cfg.grad = freqdata.grad; > cfg.vol = vol; cfg.resolution = 1; > cfg.reducerank = 2; cfg.channel = {'MEG'}; > cfg.xgrid = 'auto'; cfg.ygrid = 'auto'; > cfg.zgrid = 'auto'; > [grid] = prepare_leadfield(cfg); > > > > cfg = []; > cfg.frequency = 18; > cfg.method = 'dics'; > cfg.projectnoise = 'yes'; > cfg.grid = grid; > cfg.vol = vol; cfg.lambda = 0; > sourcePost = sourceanalysis(cfg,freqdata ); > > My source.post.avg.pow has non-zero finite values...... > any suggestions on what I am doing wrong would be greatly > appreciated. > > > > Ali > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/fcdonders/fieldtrip. From bps231 at NYU.EDU Fri Oct 19 01:37:09 2007 From: bps231 at NYU.EDU (Bernhard Staresina) Date: Fri, 19 Oct 2007 01:37:09 +0200 Subject: clusterstats for depth electrodes Message-ID: Dear Fieldtrippers, We have a set of intracranial EEG recordings and would now like to assess statistical differences between two conditions of interest. Using the timelockstatistics function, however, it seems to require a ‘regular’ channel array, which we cannot provide with depth electrodes. That is, we don’t wanna do the cluster analysis across a spatial cluster, but simply across time. Is this possible in the current version? The code we took from the tutorial along with the error message we get is attached below, Thanks, Bernhard --- CODE cfg = []; cfg.correctm = 'no'; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 0; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 100; design = zeros(1,size(cond1.trial,1)+size(cond2.trial,1)); design(1,1:size(cond1.trial,1)) = 1; design(1,(size(cond1.trial,1)+1:(size(cond1.trial,1)+size(cond2.trial,1)))) = 2; cfg.design = design; cfg.ivar = 1; cfg.channel = {'all'}; cfg.latency = [0 1]; [stat] = timelockstatistics(cfg, cond1, cond2); -- ERROR >> [stat] = timelockstatistics(cfg, cond1, cond2); selected 32 channels selected 1000 time bins selected 1 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip-0.9.8/private/prepare_timefreq_data at 310 In fieldtrip-0.9.8/private/statistics_wrapper at 187 In timelockstatistics at 102 ??? Undefined function or variable "sens". Error in ==> neighbourselection at 87 if ~isstruct(sens) Error in ==> fieldtrip-0.9.8/private/statistics_wrapper at 211 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> timelockstatistics at 102 [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/fcdonders/fieldtrip. From maris at NICI.RU.NL Fri Oct 19 07:09:54 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Fri, 19 Oct 2007 07:09:54 +0200 Subject: clusterstats for depth electrodes In-Reply-To: Message-ID: Hi Bernhard, > We have a set of intracranial EEG recordings and would now like to assess > statistical differences between two conditions of interest. Using the > timelockstatistics function, however, it seems to require a 'regular' > channel array, which we cannot provide with depth electrodes. That is, we > don't wanna do the cluster analysis across a spatial cluster, but simply > across time. Is this possible in the current version? > The code we took from the tutorial along with the error message we get is > attached below, If you use cfg.neighbours={} (i.e., an empty neighbourhood structure), you will only cluster in time and (if present) frequency. Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience : www.ru.nl/master/cns/ > > Thanks, > Bernhard > > > --- CODE > > cfg = []; > cfg.correctm = 'no'; > cfg.method = 'montecarlo'; > cfg.statistic = 'indepsamplesT'; > > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 0; > > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 100; > > design = zeros(1,size(cond1.trial,1)+size(cond2.trial,1)); > design(1,1:size(cond1.trial,1)) = 1; > design(1,(size(cond1.trial,1)+1:(size(cond1.trial,1)+size(cond2.trial,1)))) = 2; > > cfg.design = design; > cfg.ivar = 1; > > cfg.channel = {'all'}; > cfg.latency = [0 1]; > > > [stat] = timelockstatistics(cfg, cond1, cond2); > > > -- ERROR > > >> [stat] = timelockstatistics(cfg, cond1, cond2); > selected 32 channels > selected 1000 time bins > selected 1 frequency bins > Warning: PACK can only be used from the MATLAB command line. > > In fieldtrip-0.9.8/private/prepare_timefreq_data at 310 > In fieldtrip-0.9.8/private/statistics_wrapper at 187 > In timelockstatistics at 102 > ??? Undefined function or variable "sens". > > Error in ==> neighbourselection at 87 > if ~isstruct(sens) > > Error in ==> fieldtrip-0.9.8/private/statistics_wrapper at 211 > cfg.neighbours = neighbourselection(cfg,varargin{1}); > > Error in ==> timelockstatistics at 102 > [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/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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.wibral at WEB.DE Fri Oct 19 11:08:46 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Fri, 19 Oct 2007 11:08:46 +0200 Subject: Problems plotting sourcestatistics Message-ID: Dear Fieldtrippers, we have a problem plotting results from multisubject source statistics. The problem seems to be due to the fact that sourcestats are calculated only on the 'inside' voxels and the source stats are returned in a small box (i.e. fewer voxels) because of the omitted 'outside'. If I then you sourceinterpolate to get template MRI and sourcestats together sourceinterpolate seems to think there is a need to stretch the stats voxels (because there are fewer of them than voxels in the anatomy) - smearing the stast all over the anatomy - mostly outside of the brain. Plotting normalized single subjects beamforming images works fine, though. Plotting the results using matlab's 'slice' method also works fine. I pasted the code we used below. Any help is greatly appreciated, Michael Wibral %%%%%%%%%%%%CODE%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%code for normalization%%%%%%%%%%%%%%%%%%%%%%%%%% Design = { 'MKA21_sourceUprightPreInt.mat', 'MKA21_sourceUprightPostInt.mat', 'MKA21_sourceDiffInt.mat' ; ..........more files....... }; PathName = '/net/M036-LFS1/srv/data1/home1/ctillman/data/MooneyMEEGFieldtripAnalysis/BeamformingFieldtrip/'; for i = 1:size(Design,1) % Normalization of condition 1 files fullnamePre = strcat(PathName,Design{i,1}); subjectID = Design{i,1}(1:5); disp(strcat('*******loading ', fullnamePre)); load(fullnamePre); cfg = []; cfg.coordinates = 'ctf'; cfg.template = '/net/M036-LFS1/srv/data1/home1/ctillman/tools/spm2/templates/T1.mnc'; % Normalise sourceUprightPreIntNorm = volumenormalise(cfg,sourceUprightPreInt); sourceUprightPreNormOutfile = strcat(PathName, subjectID,'_SourceUprightPreIntNorm.mat'); save(sourceUprightPreNormOutfile, 'sourceUprightPreIntNorm'); clear sourceUprightPreIntNorm; % Normalization of condition 2 files .......... % Normalization of condition 3 files .......... % check whether normalized data plot OK (they do) cfg = []; cfg.template = '/net/M036-LFS1/srv/data1/home1/ctillman/tools/spm2/templates/T1.mnc'; cfg.method = 'slice'; cfg.funparameter = 'avg.pow'; cfg.maskparameter = cfg.funparameter; cfg.funcolorlim = [0.0 1.2]; cfg.opacitylim = [0.0 1.2]; cfg.opacitymap = 'rampup'; figure; sourceplot(cfg,sourceUprightDiffIntNorm); clear sourceUprightDiffIntNorm; end %%%%%%%%%%%%code for sourcestatistics%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear all; path = '/net/M036-LFS1/srv/data1/home1/ctillman/data/MooneyMEEGFieldtripAnalysis/BeamformingFieldtrip/'; UprightPreNorm = {'MKA21_SourceUprightPreIntNorm.mat'; ..........more files...................... }; UprightPostNorm = {'MKA21_SourceUprightPostIntNorm.mat'; ...................more files...................... }; % 1. Load sourceUprightPreIntNorm for i = 1:length(UprightPreNorm) fullnamePre = strcat(path,UprightPreNorm{i,1}); UprightPre{i} = load(fullnamePre); end % Fix the structure properties for easier handling for l = 1:size(UprightPre,2) UprightPre{l} = UprightPre{l}.sourceUprightPreIntNorm; end % 2. Load sourceUprightPostIntNorm for i = 1:length(UprightPreNorm) fullnamePost = strcat(path,UprightPostNorm{i,1}); UprightPost{i} = load(fullnamePost); end % Fix the structure properties for easier handling for l = 1:size(UprightPost,2) UprightPost{l} = UprightPost{l}.sourceUprightPostIntNorm; end % prepare multisubject data for sourcestatistics (to identify common 'inside' voxels) % using sourcegrandaverage cfg = []; cfg.keepindividual = 'yes'; PostGrandAvg = sourcegrandaverage(cfg,... UprightPost{1},... UprightPost{2},... UprightPost{3},... UprightPost{4},... UprightPost{5},... UprightPost{6},... UprightPost{7},... UprightPost{8},... UprightPost{9},... UprightPost{10},... UprightPost{11},... UprightPost{12},... UprightPost{13},... UprightPost{14},... UprightPost{15},... UprightPost{16},... UprightPost{17}); cfg = []; cfg.keepindividual = 'yes'; PreGrandAvg = sourcegrandaverage(cfg,... UprightPre{1},... UprightPre{2},... UprightPre{3},... UprightPre{4},... UprightPre{5},... UprightPre{6},... UprightPre{7},... UprightPre{8},... UprightPre{9},... UprightPre{10},... UprightPre{11},... UprightPre{12},... UprightPre{13},... UprightPre{14},... UprightPre{15},... UprightPre{16},... UprightPre{17}); % 3. Compute source statistics (uncorrected at the moment) cfg = []; nSubjects = length(UprightPreNorm); a = [1:nSubjects]; b = ones(1,nSubjects); cfg.design = [a a; b (2*b)]; cfg.ivar = 2; % independent variable: condition cfg.uvar = 1; % subjects cfg.method = 'montecarlo'; cfg.numrandomization = 200; cfg.parameter = 'pow'; cfg.statistic = 'depsamplesT'; sourceStat = sourcestatistics(cfg,PostGrandAvg,PreGrandAvg); sourceStatOutfileName = strcat(path,'sourceStat.mat'); save(sourceStatOutfileName, 'sourceStat'); % 4. Plot statistics (code runs but plots are nonsensical) load(strcat(path,'sourceStat.mat')); MRIFilename = strcat(path, 'StandardMRI.mat'); % contains an MRI variable named StandardMRI load(MRIFilename); cfg = []; cfg.funparameter = 'stat'; sourceInterp = sourceinterpolate(cfg, sourceStat, StandardMRI); cfg = []; cfg.method = 'slice'; cfg.funparameter = 'stat'; cfg.maskparameter = cfg.funparameter; cfg.funcolorlim = [2.0 10.2]; cfg.opacitylim = [2.0 10.2]; cfg.opacitymap = 'rampup'; figure; sourceplot(cfg, sourceInterp); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From marie at PSY.GLA.AC.UK Wed Oct 24 17:56:55 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Wed, 24 Oct 2007 16:56:55 +0100 Subject: Meg planar Message-ID: Dear all, I want to use the planar gradient correction computed on individual trials as opposed to the average trial and i am getting some strange results. When i compute the planar gradient on the average of the trials, it seems to make sense wrt the original data (bottom plot, chans*time), however when the single trials are taken into account the new planar averaged seems to be very smeared into the baseline region (top plot). Even though the baseline has already been removed from every trial. Is this just a result of noise in the single trials and is there any way to correct for it? Looking at the statistics tutorial data this does not seem to be an issue for that data set, could it be caused by some sort of artifacts that i have not taken into account? Thanks, Marie Script info: cfg.keeptrials = 'yes'; cfg.baseline = [-0.2 0]; avg = timelockanalysis(cfg, data); avg = timelockbaseline(cfg,avg); pl = megplanar(cfg, avg); plcb = combineplanar(cfg, pl); cfg = []; cfg.keeptrials = 'no'; cfg.baseline = [-0.2 0]; avg = timelockanalysis(cfg, data); avg = timelockbaseline(cfg,avg); pl = megplanar(cfg, avg); plcb = combineplanar(cfg, pl); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Comparison_planar.tiff Type: image/tiff Size: 82920 bytes Desc: not available URL: From enteka at HOTMAIL.COM Thu Oct 25 01:50:29 2007 From: enteka at HOTMAIL.COM (Nicolas Robitaille) Date: Wed, 24 Oct 2007 23:50:29 +0000 Subject: question about the .previous field Message-ID: Dear fieldtrip developper, I would like to know if the .previous field is mandatory for current or future usage of fieldtrip. If not, I will remove them within my script. I observe that, for instance while looking at the output of timelockgrandaverage, the nested structures contain all the original triggers (avg.cfg.previous{}.previous.event) in the file. In my case, this end up being a 25 Megabytes variable for an ERP of 2 sec for 3 electrodes!! Thanks to automatic compression by Matlab, the saved file is very small (700 k), but loading it on my computer take more than 6 sec, which end up having drawing routines of very simple data to take minutes. Thanks Nicolas ************************************ Nicolas Robitaille, candidat Ph.D Département de Psychologie Université de Montréal C.P. 6128, succursale Centre-ville Montréal, Québec H3C 3J7 Tel.: 514-343-6111 x2631 Fax: 514-343-5787 ************************************ _________________________________________________________________ Envoie un sourire, fais rire, amuse-toi! Employez-le maintenant! http://www.emoticonesgratuites.ca/?icid=EMFRCA120 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Thu Oct 25 11:40:14 2007 From: jan.schoffelen at FCDONDERS.RU.NL (jan-mathijs schoffelen) Date: Thu, 25 Oct 2007 11:40:14 +0200 Subject: Meg planar In-Reply-To: Message-ID: Dear Marie, The planar gradient transformation algorithm is not dependent on single trial, or averaged data as an input. The transformation of the data, moving from 151 (in your case) axial gradients to 302 planar gradients, is just the consequence of applying a spatial transformation matrix on the data. This spatial transformation matrix is computed from the gradiometer information, and the method specified (btw: in my experience specifying cfg.method = 'sincos' gives the best results). Anyway, your problems are introduced when recombining the planar-data into 151 'sensors' again. This is done by combineplanar, which applies pythagoras to the -dH and -dV components of a given sensor. This means that all values become positive (agree?). Thus, applying this procedure on the single trials leads to a 'positive' baseline, because the average of positive valued numbers can never go to zero. If you are bothered by this, you could perhaps not already subtract the baseline prior to calling timelockstatistics, but after having called combineplanar. Yours, Jan-Mathijs On Oct 24, 2007, at 5:56 PM, Marie Smith wrote: > Dear all, > > I want to use the planar gradient correction computed on individual > trials as opposed to the average trial and i am getting some > strange results. When i compute the planar gradient on the average > of the trials, it seems to make sense wrt the original data (bottom > plot, chans*time), however when the single trials are taken into > account the new planar averaged seems to be very smeared into the > baseline region (top plot). Even though the baseline has already > been removed from every trial. > > Is this just a result of noise in the single trials and is there > any way to correct for it? Looking at the statistics tutorial data > this does not seem to be an issue for that data set, could it be > caused by some sort of artifacts that i have not taken into account? > > Thanks, > > Marie > > > Script info: > > cfg.keeptrials = 'yes'; > cfg.baseline = [-0.2 0]; > avg = timelockanalysis(cfg, data); > avg = timelockbaseline(cfg,avg); > pl = megplanar(cfg, avg); > plcb = combineplanar(cfg, pl); > > cfg = []; > cfg.keeptrials = 'no'; > cfg.baseline = [-0.2 0]; > avg = timelockanalysis(cfg, data); > avg = timelockbaseline(cfg,avg); > pl = megplanar(cfg, avg); > plcb = combineplanar(cfg, pl); > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and 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/fcdonders/fieldtrip. From marie at PSY.GLA.AC.UK Thu Oct 25 12:00:04 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Thu, 25 Oct 2007 11:00:04 +0100 Subject: Meg planar In-Reply-To: <34CA3DB1-664F-4176-869D-0617E5839998@fcdonders.ru.nl> Message-ID: Dear Jan-Mathijs, Thanks this does make sense and I now see the solution. I already tried removing the baseline as an option inside combineplanar, but I now realise this was only removing the baseline of the average not of the single trials. If I perform baseline correction on the planar transformed single trials it will work out as I expect. Thanks again, Marie On 25 Oct 2007, at 10:40, jan-mathijs schoffelen wrote: > Dear Marie, > > The planar gradient transformation algorithm is not dependent on > single trial, or averaged data as an input. The transformation of > the data, moving from 151 (in your case) axial gradients to 302 > planar gradients, is just the consequence of applying a spatial > transformation matrix on the data. This spatial transformation > matrix is computed from the gradiometer information, and the method > specified (btw: in my experience specifying cfg.method = 'sincos' > gives the best results). Anyway, your problems are introduced when > recombining the planar-data into 151 'sensors' again. This is done > by combineplanar, which applies pythagoras to the -dH and -dV > components of a given sensor. This means that all values become > positive (agree?). Thus, applying this procedure on the single > trials leads to a 'positive' baseline, because the average of > positive valued numbers can never go to zero. > If you are bothered by this, you could perhaps not already subtract > the baseline prior to calling timelockstatistics, but after having > called combineplanar. > > Yours, > > Jan-Mathijs > > > On Oct 24, 2007, at 5:56 PM, Marie Smith wrote: > >> Dear all, >> >> I want to use the planar gradient correction computed on >> individual trials as opposed to the average trial and i am getting >> some strange results. When i compute the planar gradient on the >> average of the trials, it seems to make sense wrt the original >> data (bottom plot, chans*time), however when the single trials are >> taken into account the new planar averaged seems to be very >> smeared into the baseline region (top plot). Even though the >> baseline has already been removed from every trial. >> >> Is this just a result of noise in the single trials and is there >> any way to correct for it? Looking at the statistics tutorial data >> this does not seem to be an issue for that data set, could it be >> caused by some sort of artifacts that i have not taken into account? >> >> Thanks, >> >> Marie >> >> >> Script info: >> >> cfg.keeptrials = 'yes'; >> cfg.baseline = [-0.2 0]; >> avg = timelockanalysis(cfg, data); >> avg = timelockbaseline(cfg,avg); >> pl = megplanar(cfg, avg); >> plcb = combineplanar(cfg, pl); >> >> cfg = []; >> cfg.keeptrials = 'no'; >> cfg.baseline = [-0.2 0]; >> avg = timelockanalysis(cfg, data); >> avg = timelockbaseline(cfg,avg); >> pl = megplanar(cfg, avg); >> plcb = combineplanar(cfg, pl); >> >> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http:// >> listserv.surfnet.nl/archives/fieldtrip.html and 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/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/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Fri Oct 26 10:34:03 2007 From: jan.schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Fri, 26 Oct 2007 10:34:03 +0200 Subject: question about the .previous field Message-ID: Dear Nicolas, The .previous field which is appended to the output-structure's cfg-field is not mandatory for fieldtrip. It's just in order to keep track of the configuration settings of the analysis steps earlier in the pipeline. Thus you can safely remove them. Yours, Jan-Mathijs ----- Original Message ----- From: Nicolas Robitaille Date: Thursday, October 25, 2007 1:50 am Subject: [FIELDTRIP] question about the .previous field > Dear fieldtrip developper, > > I would like to know if the .previous field is mandatory for > current or future usage of fieldtrip. If not, I will remove them > within my script. > > I observe that, for instance while looking at the output of > timelockgrandaverage, the nested structures contain all the > original triggers (avg.cfg.previous{}.previous.event) in the file. > In my case, this end up being a 25 Megabytes variable for an ERP of > 2 sec for 3 electrodes!! Thanks to automatic compression by Matlab, > the saved file is very small (700 k), but loading it on my computer > take more than 6 sec, which end up having drawing routines of very > simple data to take minutes. > > Thanks > > Nicolas > > ************************************ > Nicolas Robitaille, candidat Ph.D > Département de Psychologie > Université de Montréal > C.P. 6128, succursale Centre-ville > Montréal, Québec H3C 3J7 > Tel.: 514-343-6111 x2631 > Fax: 514-343-5787 > ************************************ > > _________________________________________________________________ > Envoie un sourire, fais rire, amuse-toi! Employez-le maintenant! > http://www.emoticonesgratuites.ca/?icid=EMFRCA120 > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/fcdonders/fieldtrip. From michael.wibral at WEB.DE Fri Oct 26 16:42:43 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Fri, 26 Oct 2007 16:42:43 +0200 Subject: plooting Multi-Subject beamforemer results Message-ID: Dear all, I have some problem plotting the output of sourcestatistics. When I use sourceinterpolate to get the template mri and the stats together something goes wrong resulting in strange output, that is defintely not coregistered. When I use "volumenormalise(sourcestats, mri)" to normalize the statistics output once again I'm told that 'sourcestats does not contain any anatomical information'. I am obviously missing something here. I used volumenormalise to get all subjects beamformer images into the same space. Then used sourcegrandaverage to prepare them as an input to sourcestatistics. Is the output of sourcestatistics intended to be a filed in some other structure (e.g. of the sourcegrandaverage type)? Is it possible that this pertains to the mm/cm problem (the output of sourceinterpolate that I used before plotting said something about converting cm to mm or the other way round... Any help on this is welcome. Michael Wibral MEG Unit Brain Imaging Center Frankfurt ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From michael.wibral at WEB.DE Tue Oct 30 14:10:40 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Tue, 30 Oct 2007 14:10:40 +0100 Subject: Problems with plotting sourcestatistics (partially) solved Message-ID: Dear Fieldtrippers, a while ago I posted to this list about some problems with plotting sourcestatistics for multiple subjects. That problem is solved by now, fortunately - the plotting routine after sourcestatistics simply needed an additional cfg.sourceunits='mm' although I do not get exactly where this information got lost on the way. The other problem I have now is that, despite (nonlinear) volume-normalisation the brains of my subjects do not seem to share too many voxels, i.e. the ".inside" field of sourcegrandaverage is pretty small. Even if I fake perfectly matching subjects by feeding the same subject 10 times the area used for the statistics is considerably smaller than the brain in the template MRI. Any idea what could be wrong? I made grid and hdm for the individual subjects as described in the tutorial and used Guido Noltes hdm - is that too spherical, possibly?? my result are especially "brain deficient" at the occipital pole. Thanks for your help, Michael Wibral ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From michael.wibral at WEB.DE Tue Oct 30 14:30:08 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Tue, 30 Oct 2007 14:30:08 +0100 Subject: balancing for nuisance effects in cluster-randomization stats Message-ID: Dear Eric, dear Fieldtrippers, I have a questions regading the control of certain effects that are usually controlled by balancing over subjects in old fashioned analyses: Imagine subjects see stimuli A and B and have to respond with the buttons C (for seeing A) and D (for seeing B). Of course, one could then not distinguish between perceptual effects (response to A,B) and motor effcts (pressing C,D). Usually one would now balance the button presses over subjects such that one (random) half of the subjects gets the inverted instruction (press D when seeing A and press C when seeing B). For an experiment with , say, six subjects one would get then the following set of correct 'trials': set1: {1-AC, 2-AC, 3-AC, 4-AD, 5-AD, 6-AD} set2: {1-BD, 2-BD, 3-BD, 4-BC, 5-BC, 6-BC} If one now tries to check parametrically whether there is an A versus B effect this should work given the balancing has worked. In permutation testing using dependend samples the following happens: One of the permutations will be (last three subjects with exchanged conditions): permutation set1: {1-AC, 2-AC, 3-AC, 4-BC, 5-BC, 6-BC} permutation set2: {1-BD, 2-BD, 3-BD, 4-AD, 5-AD, 6-AD} Hence one will get the full C versus D effect in this permutation sample and similar ones in all permutations that are not too far away from it. If the C versus D effect is a large one (as e.g. button presses tend to be) this will definitely dominate the extreme ends of the cluster-t distribution, killing any chance of detecting an A versus B effect. (I assume that clusterrandomisation also shouldn't work in this case because the prerequsite of exchangeability is violated even when the A/B null hypothesis was true.) Hence, my question how to design an experiment to control for the omnipresent button presses (or motor readiness potentials if one chooses a delayed response paradigm)? Any ideas appreciated, Michael Wibral ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Oct 30 15:38:21 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 30 Oct 2007 15:38:21 +0100 Subject: Problems with plotting sourcestatistics (partially) solved In-Reply-To: Message-ID: Dear Micheal, You could try cfg.inwardshift = -1.5; when you do prepare_leadfield. This makes that the "inside" field becomes larger (negative inside shift is actually an outward shift). Plotting of the grid to see if everything went okay is recommended. This should make the inside of the data coming out of sourcegrandaverage also larger, since that function only uses the voxels present in the inside of all subjects. It worked for me. Good luck, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Michael Wibral Sent: Tuesday, October 30, 2007 2:11 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Problems with plotting sourcestatistics (partially) solved Dear Fieldtrippers, a while ago I posted to this list about some problems with plotting sourcestatistics for multiple subjects. That problem is solved by now, fortunately - the plotting routine after sourcestatistics simply needed an additional cfg.sourceunits='mm' although I do not get exactly where this information got lost on the way. The other problem I have now is that, despite (nonlinear) volume-normalisation the brains of my subjects do not seem to share too many voxels, i.e. the ".inside" field of sourcegrandaverage is pretty small. Even if I fake perfectly matching subjects by feeding the same subject 10 times the area used for the statistics is considerably smaller than the brain in the template MRI. Any idea what could be wrong? I made grid and hdm for the individual subjects as described in the tutorial and used Guido Noltes hdm - is that too spherical, possibly?? my result are especially "brain deficient" at the occipital pole. Thanks for your help, Michael Wibral ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/fcdonders/fieldtrip. From michael.wibral at WEB.DE Tue Oct 30 17:17:28 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Tue, 30 Oct 2007 17:17:28 +0100 Subject: Problems with plotting sourcestatistic s (partially) solved Message-ID: Dear Ingrid, thanks for your quick reply, I'll try the inverse inward-shift and post whther it solved the problem. Michael > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list > Gesendet: 30.10.07 15:50:10 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] Problems with plotting sourcestatistics (partially) solved > > Dear Micheal, > > You could try cfg.inwardshift = -1.5; when you do prepare_leadfield. This > makes that the "inside" field becomes larger (negative inside shift is > actually an outward shift). Plotting of the grid to see if everything went > okay is recommended. This should make the inside of the data coming out of > sourcegrandaverage also larger, since that function only uses the voxels > present in the inside of all subjects. It worked for me. > > Good luck, > Ingrid > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Michael Wibral > Sent: Tuesday, October 30, 2007 2:11 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] Problems with plotting sourcestatistics (partially) > solved > > Dear Fieldtrippers, > > a while ago I posted to this list about some problems with plotting > sourcestatistics for multiple subjects. That problem is solved by now, > fortunately - the plotting routine after sourcestatistics simply needed an > additional cfg.sourceunits='mm' although I do not get exactly where this > information got lost on the way. The other problem I have now is that, > despite (nonlinear) volume-normalisation the brains of my subjects do not > seem to share too many voxels, i.e. the ".inside" field of > sourcegrandaverage > is pretty small. Even if I fake perfectly matching subjects by feeding the > same subject 10 times the area used for the statistics is considerably > smaller than the brain in the template MRI. > Any idea what could be wrong? I made grid and hdm for the individual > subjects as described in the tutorial and used Guido Noltes hdm - is that > too spherical, possibly?? my result are especially "brain deficient" at the > occipital pole. > > Thanks for your help, > Michael Wibral > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From maris at NICI.RU.NL Tue Oct 30 22:15:02 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Tue, 30 Oct 2007 22:15:02 +0100 Subject: balancing for nuisance effects in cluster-randomization stats In-Reply-To: Message-ID: Hi Michael, I think your question is about experimental design (i.c., control for confounding variables) and not about statistics. That being said, you could consider the following: 1. Use a Go-NoGo paradigm and instruct the subject to give the same response (e.g., NoGo) to the stimulus conditions that you want to compare. 2. Use a blocked Go-NoGo paradigm in which you reverse the stimulus-response associations between blocks (A-Go and B-NoGo in block 1, B-Go and A-NoGo in block 2). Good luck, Eric Maris > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of > Michael Wibral > Sent: Tuesday, October 30, 2007 2:30 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] balancing for nuisance effects in cluster-randomization stats > > Dear Eric, dear Fieldtrippers, > > I have a questions regading the control of certain effects that are usually > controlled by balancing over subjects in old fashioned analyses: > Imagine subjects see stimuli A and B and have to respond with the buttons C > (for seeing A) and D (for seeing B). Of course, one could then not > distinguish between perceptual effects (response to A,B) and motor effcts > (pressing C,D). > Usually one would now balance the button presses over subjects such that one > (random) half of the subjects gets the inverted instruction (press D when > seeing A and press C when seeing B). For an experiment with , say, six > subjects one would get then the following set of correct 'trials': > set1: > {1-AC, 2-AC, 3-AC, 4-AD, 5-AD, 6-AD} > set2: > {1-BD, 2-BD, 3-BD, 4-BC, 5-BC, 6-BC} > > If one now tries to check parametrically whether there is an A versus B > effect this should work given the balancing has worked. > In permutation testing using dependend samples the following happens: One of > the permutations will be (last three subjects with exchanged conditions): > permutation set1: > {1-AC, 2-AC, 3-AC, 4-BC, 5-BC, 6-BC} > permutation set2: > {1-BD, 2-BD, 3-BD, 4-AD, 5-AD, 6-AD} > > Hence one will get the full C versus D effect in this permutation sample and > similar ones in all permutations that are not too far away from it. If the C > versus D effect is a large one (as e.g. button presses tend to be) this will > definitely dominate the extreme ends of the cluster-t distribution, killing > any chance of detecting an A versus B effect. (I assume that > clusterrandomisation also shouldn't work in this case because the > prerequsite of exchangeability is violated even when the A/B null hypothesis > was true.) > > Hence, my question how to design an experiment to control for the > omnipresent button presses (or motor readiness potentials if one chooses a > delayed response paradigm)? > > Any ideas appreciated, > Michael Wibral > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/fcdonders/fieldtrip. From michael.wibral at WEB.DE Wed Oct 31 11:57:58 2007 From: michael.wibral at WEB.DE (Michael Wibral) Date: Wed, 31 Oct 2007 11:57:58 +0100 Subject: balancing for nuisance effects in clus ter-randomization stats Message-ID: Hi Eric, thank you very much for your suggestions. Suggestions (19 wouldn't work because we need a response that differentiates the conditions we want to compare (to check that actually perceived what we wanted them to perceive). But suggestions (2), running a blocked experiment with subsequent averaging over blocks before clusterrandomization should solve the problem. Best Regards, Michael > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list > Gesendet: 30.10.07 22:20:25 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] balancing for nuisance effects in cluster-randomization stats > > Hi Michael, > > > I think your question is about experimental design (i.c., control for > confounding variables) and not about statistics. That being said, you could > consider the following: > > 1. Use a Go-NoGo paradigm and instruct the subject to give the same response > (e.g., NoGo) to the stimulus conditions that you want to compare. > 2. Use a blocked Go-NoGo paradigm in which you reverse the stimulus-response > associations between blocks (A-Go and B-NoGo in block 1, B-Go and A-NoGo in > block 2). > > Good luck, > > Eric Maris > > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of > > Michael Wibral > > Sent: Tuesday, October 30, 2007 2:30 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: [FIELDTRIP] balancing for nuisance effects in > cluster-randomization stats > > > > Dear Eric, dear Fieldtrippers, > > > > I have a questions regading the control of certain effects that are > usually > > controlled by balancing over subjects in old fashioned analyses: > > Imagine subjects see stimuli A and B and have to respond with the buttons > C > > (for seeing A) and D (for seeing B). Of course, one could then not > > distinguish between perceptual effects (response to A,B) and motor effcts > > (pressing C,D). > > Usually one would now balance the button presses over subjects such that > one > > (random) half of the subjects gets the inverted instruction (press D when > > seeing A and press C when seeing B). For an experiment with , say, six > > subjects one would get then the following set of correct 'trials': > > set1: > > {1-AC, 2-AC, 3-AC, 4-AD, 5-AD, 6-AD} > > set2: > > {1-BD, 2-BD, 3-BD, 4-BC, 5-BC, 6-BC} > > > > If one now tries to check parametrically whether there is an A versus B > > effect this should work given the balancing has worked. > > In permutation testing using dependend samples the following happens: One > of > > the permutations will be (last three subjects with exchanged conditions): > > permutation set1: > > {1-AC, 2-AC, 3-AC, 4-BC, 5-BC, 6-BC} > > permutation set2: > > {1-BD, 2-BD, 3-BD, 4-AD, 5-AD, 6-AD} > > > > Hence one will get the full C versus D effect in this permutation sample > and > > similar ones in all permutations that are not too far away from it. If the > C > > versus D effect is a large one (as e.g. button presses tend to be) this > will > > definitely dominate the extreme ends of the cluster-t distribution, > killing > > any chance of detecting an A versus B effect. (I assume that > > clusterrandomisation also shouldn't work in this case because the > > prerequsite of exchangeability is violated even when the A/B null > hypothesis > > was true.) > > > > Hence, my question how to design an experiment to control for the > > omnipresent button presses (or motor readiness potentials if one chooses a > > delayed response paradigm)? > > > > Any ideas appreciated, > > Michael Wibral > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip > > toolbox, to share experiences and to discuss new ideas for MEG and EEG > analysis. > > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > > 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/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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: