From Alexander_Nakhnikian at hms.harvard.edu Fri Dec 2 19:17:35 2016 From: Alexander_Nakhnikian at hms.harvard.edu (Nakhnikian, Alexander) Date: Fri, 2 Dec 2016 18:17:35 +0000 Subject: [FieldTrip] Projecting connectivity data onto a template brain Message-ID: Hello All, I have some data that I need to project onto cortical slices/surfaces and I could use some advice. I've included a brief synopsis of my computation and the issue I'm having. Briefly, I'm generating data using a lot of code outside of field trip and the problem comes up with I try to import data returned by my home-grown code back into ft and use ft_sourceplot to visualize the data. I'm looking at connectivity between contralateral cortical homologous regions as a validation of my implementation of an existing connectivity metric. Based on prior research, we know where the connectivity should be at a maximum. This is basically seed region analysis. The flow of computation is: 1) Create an eLORETA filter kernel using ft's built-in functions and a template brain (I don't have individual sMRI). 2) Find the MNI coordinates in ft's template grid that are both inside the brain and confined to the cortical mantle. Keep the corresponding entries in the imaging matrix and discard the rest. 3) Localize the EEG signals and reduce the 3D dipoles to a single trace using PCA with my own code. 4) Define a seed region and compute functional connectivity with every other voxel in the grid. I've plotted the maximum connectivity versus the voxel location and the results look good but I need to project the data onto a cortical surface to visualize them and get publication graphics. I've tried taking a file returned by ft_sourceanalysis and replace the field .pow with the vector of connectivity values returned by my code and replacing the grid locations with the coordinates I get in my down sampled grid. Here's the problem: When I try to interpolate the connectivity values to the template brain and plot the results I get activity spread equally throughout the entire brain. I suspect it's an interpolation issue since there are many more grid points in the template than in my data set. I've been trying to find a way to downsample the number of voxels in the template before interpolating but I haven't been able to. Any input would be very much appreciated. Thank you, Alexander Alexander Nakhnikian, Ph.D. Research Investigator Boston VA Research Institute Instructor in Psychiatry, Harvard Medical School -------------- next part -------------- An HTML attachment was scrubbed... URL: From azeez.adebimpe5 at gmail.com Fri Dec 2 19:43:04 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Fri, 2 Dec 2016 13:43:04 -0500 Subject: [FieldTrip] Projecting connectivity data onto a template brain In-Reply-To: References: Message-ID: Hi Alexander, You can post the matlab code on how you replace the field .pow. That would make it faster to see where the error might come from. Best Azeez On Fri, Dec 2, 2016 at 1:17 PM, Nakhnikian, Alexander < Alexander_Nakhnikian at hms.harvard.edu> wrote: > Hello All, > > > I have some data that I need to project onto cortical slices/surfaces and > I could use some advice. I've included a brief synopsis of my computation > and the issue I'm having. Briefly, I'm generating data using a lot of code > outside of field trip and the problem comes up with I try to import data > returned by my home-grown code back into ft and use ft_sourceplot to > visualize the data. > > > I'm looking at connectivity between contralateral cortical homologous > regions as a validation of my implementation of an existing connectivity > metric. Based on prior research, we know where the connectivity should be > at a maximum. This is basically seed region analysis. The flow of > computation is: > > > 1) Create an eLORETA filter kernel using ft's built-in functions and a > template brain (I don't have individual sMRI). > > > 2) Find the MNI coordinates in ft's template grid that are both inside the > brain and confined to the cortical mantle. Keep the corresponding entries > in the imaging matrix and discard the rest. > > > 3) Localize the EEG signals and reduce the 3D dipoles to a single trace > using PCA with my own code. > > > 4) Define a seed region and compute functional connectivity with every > other voxel in the grid. > > > I've plotted the maximum connectivity versus the voxel location and the > results look good but I need to project the data onto a cortical surface to > visualize them and get publication graphics. I've tried taking a file > returned by ft_sourceanalysis and replace the field .pow with the vector of > connectivity values returned by my code and replacing the grid locations > with the coordinates I get in my down sampled grid. > > > Here's the problem: When I try to interpolate the connectivity values to > the template brain and plot the results I get activity spread equally > throughout the entire brain. I suspect it's an interpolation issue since > there are many more grid points in the template than in my data set. I've > been trying to find a way to downsample the number of voxels in the > template before interpolating but I haven't been able to. Any input would > be very much appreciated. > > > Thank you, > > > Alexander > > > Alexander Nakhnikian, Ph.D. > > Research Investigator > > Boston VA Research Institute > > Instructor in Psychiatry, Harvard Medical School > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfisher at bowdoin.edu Mon Dec 5 05:43:53 2016 From: hfisher at bowdoin.edu (Harrison Fisher) Date: Mon, 5 Dec 2016 04:43:53 +0000 Subject: [FieldTrip] Granger Causality to Compare Trial Conditions Message-ID: <2B69CC8D-C8AA-446D-AA23-886049A5F355@bowdoin.edu> Hello, I am a student researcher at Bowdoin College, working on applying granger causality to look at information flow during theta oscillations in an episodic memory retrieval task. I have several questions about the workflow I am using to execute GC analysis and plot the results. I have 30+ subjects, each with 2 sessions, and 16 conditions for the data trials. I ultimately want to look at the difference between connectivity in one condition compared to another. I’ve cleaned the data for each condition separately and used a multi taper for frequency transform (‘mtmfft’). Then I localized with the DICS beam former and created a difference data set for the 2 conditions of interest in order to compute a grand average of theta power to plot on an MRI head model to select regions of interest with high theta power. With those regions of interest, I created two virtual channels from the time locked dataset of all conditions concatenated and performed a mtmconvol analysis to get a wavelet (fr_frequencyanalysis, mtmconvol) for each of the virtual channels. Then I computed granger over the wavelet (ft_connectivityanalysis) and use ft_singleplotTFR to visualize. My main question is at what point do I need to separate out by condition in order to do a comparison of granger causality on the difference between two conditions? I am working off of a previous student’s scripts, and it appears that she was running the beamformer creation of the virtual channels on a trial by trial basis (see script excerpt below). So does this mean that the construction of the virtual channels will be unaffected if I just select a smaller subset of the trials corresponding to the individual conditions? Will this affect the subsequent wavelet and granger analyses? Or is there a way to pull the conditions out of the wavelet or granger matrices created for the entire appended dataset of all the conditions? Thanks for the help! Harrison Fisher Bowdoin College Class of 2017 time = timelock.All %select the appended dataset % apply LCMV spatial filter to location 01 of interest cfg = []; cfg.method = 'lcmv'; cfg.lcmv.keepfilter = 'yes'; cfg.headmodel = vol; cfg.elec = egi; cfg.grid.pos = roi1; source01 = ft_sourceanalysis(cfg, time); % construct 3-D virtual channel at location 01 beamformer01 = source01.avg.filter{1}; chansel = ft_channelselection('all' , data.label); % find the names chansel = match_str(data.label, chansel); % find the indices chan01_3D = []; chan01_3D.label = {'x', 'y', 'z'}; chan01_3D.time = data.time; for i=1:length(data.trial) chan01_3D.trial{i} = beamformer01 * data.trial{i}(chansel,:); end % construct a single virtual channel in the maximum power orientation timeseries = cat(2, chan01_3D.trial{:}); [u, s, v] = svd(timeseries, 'econ'); timeseriesmaxproj = u(:, 1)' * timeseries; chan01 = []; chan01.label = {'source01'}; chan01.time = data.time; for i = 1:length(data.trial) chan01.trial{i} = u(:, 1)' * beamformer01 * data.trial{i}(chansel, :); end From paul.sowman at mq.edu.au Tue Dec 6 04:56:15 2016 From: paul.sowman at mq.edu.au (Paul Sowman) Date: Tue, 6 Dec 2016 03:56:15 +0000 Subject: [FieldTrip] MEG postdoc Sydney Australia Message-ID: MEG postdoc Sydney Australia A 2-year position is available for an outstanding researcher to join the Department of Cognitive Science on an ARC grant-funded program to investigate brain network maturation in children using magnetoencephalography. The primary duties of the postdoc are experiment design, behavioral training, data acquisition and analysis for studies in the ARC grant. Other duties include (and are not restricted to) manuscript preparation, conference presentation and supervision of junior team members. Selection Criteria You will have expertise in cognitive neuroscience which may include experience in predictive coding, auditory processing or neurodevelopment. Preference may be given to applicants whose previous research experience includes work with children or MEG. To be considered for this role, applicants must address the selection criteria below and upload as a separate document in the application process. Essential * PhD in neuroscience, psychology, cognitive science, biomedical engineering or a related discipline * The ability to collaborate successfully in a team * Excellent communication skills * Proven ability to publish in peer reviewed journals of a high standing Desirable * Experience working with children * A track record of research in neuroscience/ experimental psychology * Experience with MEG/EEG or neuroimaging * Experience with Matlab, Statistical Parametric Mapping, Dynamic Causal Modelling or other forms of network analysis Employment in this position is conditional upon holding a Working with Children Check Clearance. Salary Package From $85,845 - $92,000 p.a. (Level A, Step 6, minimum step for a PhD), plus 17% employer's superannuation and annual leave loading Appointment Type: Full time, 2 year fixed-term, to commence January/February 2017 Specific Role Enquiries: Dr Paul Sowman on paul.sowman at mq.edu.au http://jobs.mq.edu.au/cw/en/job/499979/postdoctoral-research-fellow Paul F Sowman Associate Professor Department of Cognitive Science Level 3, Room 3.824 Australian Hearing Hub 16 University Drive Macquarie University, NSW 2109, Australia T: +61 2 9850 6732 | F: +61 2 9850 6059 W: Profile Page W: MQU Stuttering Research Facebook Page [Macquarie University] CRICOS Provider Number 00002J. Think before you print. Please consider the environment before printing this email. This message is intended for the addressee named and may contain confidential information. If you are not the intended recipient, please delete it and notify the sender. Views expressed in this message are those of the individual sender, and are not necessarily the views of Macquarie University. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michelic72 at gmail.com Tue Dec 6 18:00:09 2016 From: michelic72 at gmail.com (Cristiano Micheli) Date: Tue, 6 Dec 2016 18:00:09 +0100 Subject: [FieldTrip] Fwd: In-Reply-To: References: Message-ID: Dear List I recently got slowed down by a tedious problem regarding the compatibility of world coordinates of volumetric MRI images with different number of voxels. Say image1 (in FieldTrip format) contains a /dim/ field of dimensions [256 256 180] and image2 is a resliced version of image1 with dimensions [256 256 256] to make it Freesurfer compatible. Both Image1 and Image2 are defined according to the RAS conventions, although they have different voxel orders in the 3D image box. I need to coregister world coordinates (in mm) between the image1 and image2 spaces. However a multiplication of image2 coordinates by the transformation matrices in this form M = image1.transform/image2.transform would not correctly convert world-coordinate points from the system of reference defined in the space of image2 to the space of image1. I think this is due to the different number of voxels in the two volumes. Did anyone else stumble across this problem before and found a solution ? Cheers, Cris -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elana.Harris at cchmc.org Tue Dec 6 21:01:51 2016 From: Elana.Harris at cchmc.org (Harris, Elana) Date: Tue, 6 Dec 2016 20:01:51 +0000 Subject: [FieldTrip] How to import CTF MEG data into EEGlab In-Reply-To: References: , Message-ID: Can someone please advise which files/format I can bring into EEGlab. A screenshot of my choices in EEGlab are below & below that are the files recorded using CTF software with a 275 sensor MEG system. [cid:7116ec32-68fe-4050-82ac-b075589f920a] [cid:3568ef4c-5258-46ab-8e40-7a9a3b7595da] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 306113 bytes Desc: pastedImage.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 143128 bytes Desc: pastedImage.png URL: From nick.peatfield at gmail.com Tue Dec 6 21:13:27 2016 From: nick.peatfield at gmail.com (Nicholas A. Peatfield) Date: Tue, 6 Dec 2016 12:13:27 -0800 Subject: [FieldTrip] How to import CTF MEG data into EEGlab In-Reply-To: References: Message-ID: You should use the File-IO interface. With the GUI just click on the folder option and select the folder .ds folder. Alternatively, you can do it simply with a line of code: EEG = pop_fileio('/Users/CTF/TheFolder.ds'); On 6 December 2016 at 12:01, Harris, Elana wrote: > Can someone please advise which files/format I can bring into EEGlab. > > > A screenshot of my choices in EEGlab are below & below that are the files > recorded using CTF software with a 275 sensor MEG system. > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Nicholas Peatfield, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 143128 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 306113 bytes Desc: not available URL: From singht at musc.edu Wed Dec 7 02:04:57 2016 From: singht at musc.edu (Singh, Tarkeshwar) Date: Wed, 7 Dec 2016 01:04:57 +0000 Subject: [FieldTrip] Using ADJUST toolbox in Fieldtrip Message-ID: <0C4795CB-A2C8-4864-A8DE-8B7A16E3EF5B@musc.edu> Dear Fieldtrip users, One of my colleagues recently showed me the ADJUST toolbox in EEGLAB that he was using for rejecting artifacts based on ICA. I was wondering is there a way to use this toolbox in Fieldtrip. Is there an easy way to convert and use data structures between Fieldtrip and EEGLAB? There is a function called fieldtrip2eeglab but I have not been able to use it successfully. Thanks, Tarkesh -- Tarkeshwar Singh Postdoctoral Scholar Department of Health Sciences and Research Medical University of South Carolina 77 President Street, Room C305 Charleston, SC 29425 singht at musc.edu ------------------------------------------------------------------------- This message was secured via TLS by MUSC. -------------- next part -------------- An HTML attachment was scrubbed... URL: From xiew1202 at gmail.com Wed Dec 7 02:28:18 2016 From: xiew1202 at gmail.com (Xie Wanze) Date: Tue, 6 Dec 2016 20:28:18 -0500 Subject: [FieldTrip] Using ADJUST toolbox in Fieldtrip In-Reply-To: <0C4795CB-A2C8-4864-A8DE-8B7A16E3EF5B@musc.edu> References: <0C4795CB-A2C8-4864-A8DE-8B7A16E3EF5B@musc.edu> Message-ID: Hi Tarkeshwar, I have been using FT, EEGLAB, and ADJUST with data collected with the EGI system. The "eeglab2fieltrip" and "fieldtrip2eeglab" functions can be used to convert the data structures between EEGLAB and FT. They worked just fine for me. I used the ADJUST with EEGLAB/Matlab before I converted my data into FT structure, but I believe you can do it either way. Hopefully I could help on your questions if you could ask them more specifically. Wanze 2016-12-06 20:04 GMT-05:00 Singh, Tarkeshwar : > This message was sent securely by MUSC > > Dear Fieldtrip users, > > > > One of my colleagues recently showed me the ADJUST toolbox in EEGLAB that > he was using for rejecting artifacts based on ICA. I was wondering is there > a way to use this toolbox in Fieldtrip. > > > > Is there an easy way to convert and use data structures between Fieldtrip > and EEGLAB? There is a function called fieldtrip2eeglab but I have not been > able to use it successfully. > > > > Thanks, > > Tarkesh > > > > > > -- > > Tarkeshwar Singh > > Postdoctoral Scholar > > Department of Health Sciences and Research > > Medical University of South Carolina > > 77 President Street, Room C305 > > Charleston, SC 29425 > > singht at musc.edu > > > > > > > > > > > > ------------------------------------------------------------------------- > This message was secured via TLS by *MUSC *. > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at donders.ru.nl Wed Dec 7 08:39:17 2016 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Wed, 7 Dec 2016 07:39:17 +0000 Subject: [FieldTrip] Fwd: In-Reply-To: References: Message-ID: <7CCA2706D7A4DA45931A892DF3C2894C5218E1A6@exprd03.hosting.ru.nl> Hi Cris, Have you tried changing the volume dimensions manually, and then perform the coregistration? E.g.: %change grid dimensions mri_orig2=mri_orig; mri_orig2.anatomy=zeros(256,256,256); diff1=(256-mri_orig.dim(1))/2; diff2=(256-mri_orig.dim(2))/2; diff3=(256-mri_orig.dim(3))/2; mri_orig2.anatomy(diff1+1:256-diff1,diff2+1:256-diff2,diff3+1:256-diff3)=mri_orig.anatomy; mri_orig2.anatomy=int16(mri_orig2.anatomy); mri_orig2.dim=[256 256 256]; mri_orig=mri_orig2; Best, Stan From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Cristiano Micheli Sent: dinsdag 6 december 2016 18:00 To: FieldTrip discussion list Subject: [FieldTrip] Fwd: Dear List I recently got slowed down by a tedious problem regarding the compatibility of world coordinates of volumetric MRI images with different number of voxels. Say image1 (in FieldTrip format) contains a /dim/ field of dimensions [256 256 180] and image2 is a resliced version of image1 with dimensions [256 256 256] to make it Freesurfer compatible. Both Image1 and Image2 are defined according to the RAS conventions, although they have different voxel orders in the 3D image box. I need to coregister world coordinates (in mm) between the image1 and image2 spaces. However a multiplication of image2 coordinates by the transformation matrices in this form M = image1.transform/image2.transform would not correctly convert world-coordinate points from the system of reference defined in the space of image2 to the space of image1. I think this is due to the different number of voxels in the two volumes. Did anyone else stumble across this problem before and found a solution ? Cheers, Cris -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Wed Dec 7 08:57:26 2016 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Tue, 6 Dec 2016 23:57:26 -0800 Subject: [FieldTrip] Fwd: In-Reply-To: <7CCA2706D7A4DA45931A892DF3C2894C5218E1A6@exprd03.hosting.ru.nl> References: <7CCA2706D7A4DA45931A892DF3C2894C5218E1A6@exprd03.hosting.ru.nl> Message-ID: <83151D86-F059-4815-98B7-B8FF091DECEF@gmail.com> Hey Cris, The transform field typically describes how to get from ijk to your coord system of interest, ras in this case. You may want to doublecheck this by looking at how it's done in ft_volumerealign, but you'll need to first go from ras to ijk in image1 (inv(mri.transform)) in order to go from ijk to ras in image2. Ciao, Arjen > On Dec 6, 2016, at 11:39 PM, Pelt, S. van (Stan) wrote: > > Hi Cris, > > Have you tried changing the volume dimensions manually, and then perform the coregistration? E.g.: > > %change grid dimensions > mri_orig2=mri_orig; > mri_orig2.anatomy=zeros(256,256,256); > diff1=(256-mri_orig.dim(1))/2; > diff2=(256-mri_orig.dim(2))/2; > diff3=(256-mri_orig.dim(3))/2; > mri_orig2.anatomy(diff1+1:256-diff1,diff2+1:256-diff2,diff3+1:256-diff3)=mri_orig.anatomy; > mri_orig2.anatomy=int16(mri_orig2.anatomy); > mri_orig2.dim=[256 256 256]; > mri_orig=mri_orig2; > > Best, > Stan > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Cristiano Micheli > Sent: dinsdag 6 december 2016 18:00 > To: FieldTrip discussion list > Subject: [FieldTrip] Fwd: > > Dear List > > I recently got slowed down by a tedious problem regarding the compatibility of world coordinates of volumetric MRI images with different number of voxels. > Say image1 (in FieldTrip format) contains a /dim/ field of dimensions [256 256 180] and image2 is a resliced version of image1 with dimensions [256 256 256] to make it Freesurfer compatible. Both Image1 and Image2 are defined according to the RAS conventions, although they have different voxel orders in the 3D image box. > > I need to coregister world coordinates (in mm) between the image1 and image2 spaces. However a multiplication of image2 coordinates by the transformation matrices in this form > > M = image1.transform/image2.transform > > would not correctly convert world-coordinate points from the system of reference defined in the space of image2 to the space of image1. I think this is due to the different number of voxels in the two volumes. > > Did anyone else stumble across this problem before and found a solution ? > > Cheers, > Cris > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Matthew.J.Rollo at uth.tmc.edu Wed Dec 7 23:04:28 2016 From: Matthew.J.Rollo at uth.tmc.edu (Rollo, Matthew J) Date: Wed, 7 Dec 2016 22:04:28 +0000 Subject: [FieldTrip] Posting Postdoctoral Position Message-ID: The Tandon Lab is currently looking to fill an open Postdoctoral Research Position. We were hoping that you would post the job description below to your mailing list. Two postdoctoral research positions are available at the NeuroImaging and Electrophysiology Lab (www.tandonlab.org) in the Department of Neurosurgery at the University of Texas Medical School in Houston. The project uses electrocorticographic (ECoG) recordings on a large cohort (n=80) to evaluate psycho-linguistic models of reading and speech production with the goal being to create network level representation of language. Collaborators on the project with whom the post-doc will work closely are Nathan Crone (Hopkins), Greg Hickok (UCI), Stanislas Dehaene (College de France), Xaq Pitkow (Baylor) and Josh Breier (UT Houston). This is a close multi center collaboration that brings together investigators with established track records in intracranial EEG (iEEG) recordings, neuroscience of language and computational neuroscience to better understand the uniquely human behavior of reading and producing language. More details about the U01 grant are online at NIH Reporter. The post-doc will benefit from a close interaction with several experts in the fields of reading, semantics, and speech production. Post-doc Responsibilities: The selected individuals are expected to be highly motivated, team players who have the passion to study cognitive processes using direct recordings in humans. They will be responsible for 1) optimizing and refining paradigms for use in the project, 2) data collection in the epilepsy monitoring unit and in the MRI scanner, 3) ECoG data analysis using a analysis pipelines existent in the lab and via the development of innovative strategies, and 4) data presentation at conferences, manuscript and grant writing. Requirements: The selected individuals must have a Ph.D. in one or more of the following - neuroscience, psychology, cognitive science, mathematics, electrical engineering or computer science. Previous experience in neural time series data analysis or functional imaging studies of reading or speech production is highly desirable. Crucial is the ability to independently code in either or all of the following - MATLAB, R or Python. Given the multiple unpredictable variables and privacy issues around data collection in human patients, the individual must possess high ethical and professionalism standards, be able to adapt to a changing environment, reorganize schedules dynamically, and work with tight deadlines. The individual must possess the ability to work effectively independently, yet collaborate effectively on projects with multiple investigators. A strong publication record and excellent prior academic credentials are highly desirable. If you are interested, you can email us at nitin.tandon at uth.tmc.edu or call us at (713) 500-5475. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michak at is.umk.pl Fri Dec 9 14:24:44 2016 From: michak at is.umk.pl (=?UTF-8?Q?Micha=C5=82_Komorowski?=) Date: Fri, 9 Dec 2016 14:24:44 +0100 Subject: [FieldTrip] DICS: ft_sourceanalysis - why headmodel is necessary? Leadfield is not sufficient? Message-ID: Hello, I am using ft_sourceanalysis to analize EEG signal using DICS method ( https://www.ncbi.nlm.nih.gov/pubmed/11209067). I wonder why headmodel is needed to be passed to cfg to ft_sourceanalysis even though the correct leadfield is provided? In the equations for DICS there is only a leadfield needed, not a headmodel. Best regards, Michał -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Dec 9 15:05:07 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 9 Dec 2016 14:05:07 +0000 Subject: [FieldTrip] DICS: ft_sourceanalysis - why headmodel is necessary? Leadfield is not sufficient? In-Reply-To: References: Message-ID: <93441F68-753E-4E50-A52D-E58BC3DF0AD7@donders.ru.nl> Hi Michal, You’re absolutely right. In theory the headmodel shouldn’t be required if you already provide the forward model. Yet, it’s a rather annoying feature of the code that it is still required for the code to run through. This is the consequence of a ‘once-upon-a-time’, where the forward model computation was done within ft_sourceanalysis. We have never managed to clean this up completely. If you have a clean suggestion of how to clear this, please feel free to make a suggestion through github. Best wishes, Jan-Mathijs J.M.Schoffelen Senior Researcher Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 09 Dec 2016, at 14:24, Michał Komorowski > wrote: Hello, I am using ft_sourceanalysis to analize EEG signal using DICS method (https://www.ncbi.nlm.nih.gov/pubmed/11209067). I wonder why headmodel is needed to be passed to cfg to ft_sourceanalysis even though the correct leadfield is provided? In the equations for DICS there is only a leadfield needed, not a headmodel. Best regards, Michał _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Markus.Bauer at nottingham.ac.uk Fri Dec 9 19:29:23 2016 From: Markus.Bauer at nottingham.ac.uk (Markus Bauer) Date: Fri, 9 Dec 2016 18:29:23 +0000 Subject: [FieldTrip] PhD projects on Brain Oscillations optionally combined with Neuropharmacology Message-ID: PhD projects on Brain Oscillations and Human Electrophysiology Several PhD opportunities are available for MEG/EEG projects on brain oscillations, cognition and neuromodulation with Dr Markus Bauer at the University of Nottingham, UK. We have excellent access to the imaging facilities of the Sir Peter Mansfield Imaging Centre (one of the birthplaces of MRI) with 7T & 3T MRI, MEG and EEG, as well as to different EEG and brain-stimulation techniques (TMS, tACS/tDCS) and psychophysical testing environments at the School of Psychology. For clinical studies, collaborations exist with different groups at the Queen's Medical Centre. 1) An MRC funded PhD position is available to investigate the integration of prior expectations and sensory signals in perception in healthy volunteers and psychotic patients. Application deadline: 16th January 2017. 2) Applications to further PhD funding for several projects on Brain oscillations, Cognition and Neuromodulation are solicited (different selection criteria apply) for which details can be found further below. Application deadline: 12th December 2016. MRC PhD project (deadline 16th January 2017) "Distortions of perception and attention in psychosis and healthy controls" A key goal is to investigate, both from a phenomenological and mechanistical perspective, the integration of prior expectations and sensory signals in the context of a Bayesian perception framework. One focus will be the role of specific brain oscillations in integrating feedforward and feedback signals and the role of glutamatergic, GABAergic and cholinergic signalling. Coincidentally, different lines of theoretical work have further suggested that psychosis may be a result of suboptimal integration of top-down and bottom-up aspects of perception and that psychotic patients show anomalies in these neurotransmitter systems, presumably leading to abnormal oscillatory patterns in this patient group. This PhD position will be supervised by Dr Markus Bauer (School of Psychology) and Prof Peter Liddle (Translational Neuroimaging Centre). The candidate will combine neuroimaging techniques (in particular MEG but potentially also EEG-fMRI) with sophisticated psychophysical experiments in healthy controls and patients as well as psychopharmacological interventions and optionally computational modelling. BBSRC Doctoral Training Program PhD projects (deadline 12th December 2016) "Cholinergic neuromodulation, spatial memory and hippocampal theta oscillations" (can be combined with work in animals as a collaborative project) "Brain oscillations and feedforward and feedback processing" School of Psychology, University of Nottingham, PhD projects (deadline 12th December 2016) https://www.nottingham.ac.uk/psychology/study-with-us/postgraduate/phd-by-research/phd-supervisors.aspx#Bauer (several, partly overlapping projects available, open for international candidates) The candidates for these programs should have strong numerical/analytical skills and a degree in one of the following fields: Neuroscience, psychology, physics, medicine, biology, computer science, mathematics or related. Experience with MATLAB programming, neuroimaging data analyses and experimental work are strongly desirable or otherwise have to be learned quickly. PhD students will receive extensive (further) training on these and will conduct their research in an internationally competitive environment. Informal enquiries can be sent to Dr Markus Bauer markus.bauer at nottingham.ac.uk Selected reading: Bauer et al. 2014; Bauer et al. 2012; Brookes et al. 2016; Adams et al. 2013 This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mervekaptan5 at gmail.com Sun Dec 11 18:42:25 2016 From: mervekaptan5 at gmail.com (Merve Kaptan) Date: Sun, 11 Dec 2016 18:42:25 +0100 Subject: [FieldTrip] Error in source model Message-ID: Hello dear FieldTrip users, I have a problem in source modeling. I get my Suma processed anatomical files >file_LH = fullfile(SubjectDir,'std.10.lh.white.gii) ; >file_RH= fullfile(SubjectDir,'std.10.rh.white.gii'); file_LH = C:\Users\Christoph\Documents\ MATLAB\forHilola\data\vp01-fs\bem\SUMA\std.10.lh.white.gii (same for Right hemisphere) And then I simply want to read headshape >sourcespace_S_SUMA = ft_read_headshape({file_LH file_RH}, 'format', 'gifti'); But it gives this error message error message: Error using read_gifti_file (line 17) [GIFTI] Loading of XML file C:\Users\Christoph\Documents\MATLAB\forHilola\data\vp01-fs\bem\SUMA\std.10.lh.white.gii failed. Error in gifti (line 68) this = read_gifti_file(varargin{1},giftistruct); Error in ft_read_headshape (line 289) g = gifti(filename); Error in ft_read_headshape (line 93) tmp = ft_read_headshape(filename{i}, varargin{:}); I checked the directory and everything, so should not be a problem. Any help would be appreciated! Thank you very much! Hilola Hakimova, Tuebingen MEG center -------------- next part -------------- An HTML attachment was scrubbed... URL: From aneeshan at u.northwestern.edu Mon Dec 12 02:27:06 2016 From: aneeshan at u.northwestern.edu (Aneesha Nilakantan) Date: Sun, 11 Dec 2016 19:27:06 -0600 Subject: [FieldTrip] Postdoctoral Fellowship in Memory Message-ID: *Full-Time Postdoctoral Fellowship in Memory * *Laboratory for Human Neuroscience Northwestern University * *Feinberg School of Medicine * http://www.lhn.northwestern.edu/Postdocsearch2017.pdf One full-time postdoctoral fellowship is available in The Laboratory for Human Neuroscience at the Northwestern University Feinberg School of Medicine, directed by Dr. Joel Voss (www.lhn.northwestern.edu). The research focus for this position is the effects of transcranial magnetic stimulation (TMS) on cortical networks of the human hippocampus and their contributions to learning and memory. The successful candidate would work with a large, longitudinal fMRI dataset collected from individuals participating in multi-week TMS experiments, including both young and elderly adults (supported by NIH grants R01MH106512, R01MH111790, and R01AG049002). The successful candidate would also be encouraged to develop an independent research focus, and would be provided with access to laboratory resources including equipment for TMS, high-density EEG, and eye-movement tracking studies of memory, a research registry of individuals with circumscribed neurological injuries, and excellent fMRI scanning facilities (www.cti.northwestern.edu). The Northwestern University Feinberg School of Medicine is a large academic medical center in the heart of downtown Chicago. It is home to a vibrant neuroscience community, structured around a multi-departmental neuroscience program (www.nuin.northwestern.edu). Position requires a Ph.D. or M.D./Ph.D. in a neuroscience-related field, broadly specified. We are seeking candidates with strong computational abilities, substantial experience in fMRI or EEG data analysis, and excellent written and verbal communication abilities. To apply, please send a cover letter, C.V. (or NIH-style biographical sketch), and the names of at least three individuals who could provide references if required. Contact name: Jonathan O’Neil Contact email: lhn at northwestern.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From lorenalsc at hotmail.com Mon Dec 12 02:37:06 2016 From: lorenalsc at hotmail.com (Lorena Santamaria Covarrubias) Date: Mon, 12 Dec 2016 01:37:06 +0000 Subject: [FieldTrip] time-frequeny analysis task vs resting Message-ID: Good morning, I am new in this topic and I have a basic question about baseline correction (ft_freqbaseline) when I am trying to study the time frequency analysis of task versus resting period. I have two data-sets, one with the tasks information, 64 channels x 1s epoch x 100 trials (50 trials task1 and 50 trials task2) and then 5 minutes of continuous recording for resting state. I obtained the power spectrum for both tasks: cfg = []; cfg.output = 'pow'; cfg.method = 'tfr'; cfg.foi = 8:1:130; cfg.toi = 0.3:0.01:1.3; cfg.keeptrials = 'no'; cfg.trials = find(epoch_data.trialinfo == 1); Task1Spec= ft_freqanalysis(cfg,epoch_data); cfg.trials = find(epoch_data.trialinfo == 2); Task2Spec = ft_freqanalysis(cfg,epoch_data); But now I don't know how to do the baseline correction with the 5 minutes continuous data to can compare the power spectrum of both tasks in relation to the resting state. Maybe I missing something pretty basic, apologies in advance for it if this is the case. Any suggestions will be appreciated. Thanks!! -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.gerhold at gmail.com Mon Dec 12 06:26:22 2016 From: matt.gerhold at gmail.com (Matt Gerhold) Date: Mon, 12 Dec 2016 07:26:22 +0200 Subject: [FieldTrip] time-frequeny analysis task vs resting In-Reply-To: References: Message-ID: What do your tasks entail? Can you provide more specific details regarding your experimental design? That will help clarify what the best analytical work-flow will be in your case. Matt On Mon, Dec 12, 2016 at 3:37 AM, Lorena Santamaria Covarrubias < lorenalsc at hotmail.com> wrote: > Good morning, > > > I am new in this topic and I have a basic question about baseline > correction (ft_freqbaseline) when I am trying to study the time frequency > analysis of task versus resting period. > > > I have two data-sets, one with the tasks information, 64 channels x 1s > epoch x 100 trials (50 trials task1 and 50 trials task2) and then 5 > minutes of continuous recording for resting state. > > I obtained the power spectrum for both tasks: > > > cfg = []; > cfg.output = 'pow'; > cfg.method = 'tfr'; > cfg.foi = 8:1:130; > cfg.toi = 0.3:0.01:1.3; > cfg.keeptrials = 'no'; > > cfg.trials = find(epoch_data.trialinfo == 1); > Task1Spec= ft_freqanalysis(cfg,epoch_data); > > cfg.trials = find(epoch_data.trialinfo == 2); > Task2Spec = ft_freqanalysis(cfg,epoch_data); > > But now I don't know how to do the baseline correction with the 5 minutes > continuous data to can compare the power spectrum of both tasks in relation > to the resting state. > > Maybe I missing something pretty basic, apologies in advance for it if > this is the case. > > Any suggestions will be appreciated. > > Thanks!! > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lorenalsc at hotmail.com Mon Dec 12 06:47:57 2016 From: lorenalsc at hotmail.com (Lorena Santamaria Covarrubias) Date: Mon, 12 Dec 2016 05:47:57 +0000 Subject: [FieldTrip] time-frequeny analysis task vs resting In-Reply-To: References: , Message-ID: Hi Matt, Thank you for you reply Matt. I am working with ECoG. The tasks that participants have to perform is movements of hand and tongue, indicated by a visual stimuli. Five repetitions each motor task followed by a fixation cross on the screen and then the next motor task, in a random order. Resting state were recorded prior to the motor tasks during 5 minutes were participants has to look to a fixation cross and not perform any movement. If you need any other information please let me know. Thank you. ________________________________ De: fieldtrip-bounces at science.ru.nl en nombre de Matt Gerhold Enviado: lunes, 12 de diciembre de 2016 5:26 Para: FieldTrip discussion list Asunto: Re: [FieldTrip] time-frequeny analysis task vs resting What do your tasks entail? Can you provide more specific details regarding your experimental design? That will help clarify what the best analytical work-flow will be in your case. Matt On Mon, Dec 12, 2016 at 3:37 AM, Lorena Santamaria Covarrubias > wrote: Good morning, I am new in this topic and I have a basic question about baseline correction (ft_freqbaseline) when I am trying to study the time frequency analysis of task versus resting period. I have two data-sets, one with the tasks information, 64 channels x 1s epoch x 100 trials (50 trials task1 and 50 trials task2) and then 5 minutes of continuous recording for resting state. I obtained the power spectrum for both tasks: cfg = []; cfg.output = 'pow'; cfg.method = 'tfr'; cfg.foi = 8:1:130; cfg.toi = 0.3:0.01:1.3; cfg.keeptrials = 'no'; cfg.trials = find(epoch_data.trialinfo == 1); Task1Spec= ft_freqanalysis(cfg,epoch_data); cfg.trials = find(epoch_data.trialinfo == 2); Task2Spec = ft_freqanalysis(cfg,epoch_data); But now I don't know how to do the baseline correction with the 5 minutes continuous data to can compare the power spectrum of both tasks in relation to the resting state. Maybe I missing something pretty basic, apologies in advance for it if this is the case. Any suggestions will be appreciated. Thanks!! _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Dec 12 08:40:39 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 12 Dec 2016 07:40:39 +0000 Subject: [FieldTrip] Error in source model In-Reply-To: References: Message-ID: I don’t know about SUMA. This looks as if it’s a low-level reading error, which does not have anything to do with FieldTrip. The error message suggests that the gifti-reading function cannot handle the files. Have you asked Christoph? Best, Jan-Mathijs J.M.Schoffelen Senior Researcher, VIDI-fellow Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 11 Dec 2016, at 18:42, Merve Kaptan > wrote: Hello dear FieldTrip users, I have a problem in source modeling. I get my Suma processed anatomical files >file_LH = fullfile(SubjectDir,'std.10.lh.white.gii) ; >file_RH= fullfile(SubjectDir,'std.10.rh.white.gii'); file_LH = C:\Users\Christoph\Documents\MATLAB\forHilola\data\vp01-fs\bem\SUMA\std.10.lh.white.gii (same for Right hemisphere) And then I simply want to read headshape >sourcespace_S_SUMA = ft_read_headshape({file_LH file_RH}, 'format', 'gifti'); But it gives this error message error message: Error using read_gifti_file (line 17) [GIFTI] Loading of XML file C:\Users\Christoph\Documents\MATLAB\forHilola\data\vp01-fs\bem\SUMA\std.10.lh.white.gii failed. Error in gifti (line 68) this = read_gifti_file(varargin{1},giftistruct); Error in ft_read_headshape (line 289) g = gifti(filename); Error in ft_read_headshape (line 93) tmp = ft_read_headshape(filename{i}, varargin{:}); I checked the directory and everything, so should not be a problem. Any help would be appreciated! Thank you very much! Hilola Hakimova, Tuebingen MEG center _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tmadsen at emory.edu Mon Dec 12 17:23:34 2016 From: tmadsen at emory.edu (Teresa Madsen) Date: Mon, 12 Dec 2016 11:23:34 -0500 Subject: [FieldTrip] impact of skewed power distributions on data analysis Message-ID: FieldTrippers, While analyzing my data for the annual Society for Neuroscience meeting, I developed a concern that was quickly validated by another poster (full abstract copied and linked below) focusing on the root of the problem: neural oscillatory power is not normally distributed across time, frequency, or space. The specific problem I had encountered was in baseline-correcting my experimental data, where, regardless of cfg.baselinetype, ft_freqbaseline depends on the mean power over time. However, I found that the distribution of raw power over time is so skewed that the mean was not a reasonable approximation of the central tendency of the baseline power, so it made most of my experimental data look like it had decreased power compared to baseline. The more I think about it, the more I realize that averaging is everywhere in the way we analyze neural oscillations (across time points, frequency bins, electrodes, trials, subjects, etc.), and many of the standard statistics people use also rely on assumptions of normality. The most obvious solution for me was to log transform the data first, as it appears to be fairly log normal, and I always use log-scale visualizations anyway. Erik Peterson, middle author on the poster, agreed that this would at least "restore (some) symmetry to the error distribution." I used a natural log transform, sort of arbitrarily to differentiate from the standard decibel transform included in FieldTrip as cfg.baselinetype = 'db'. The following figures compare the 2 distributions across several frequency bands (using power values from a wavelet spectrogram obtained from a baseline LFP recorded in rat prelimbic cortex). The lines at the top represent the mean +/- one standard deviation for each frequency band, and you can see how those descriptive stats are much more representative of the actual distributions in the log scale. ​​ For my analysis, I also calculated a z-score on the log transformed power to assess how my experimental data compared to the variability of the noise in a long baseline recording from before conditioning, rather than a short pre-trial baseline period, since I find that more informative than any of FieldTrip's built-in baseline types. I'm happy to share the custom functions I wrote for this if people think it would be a useful addition to FieldTrip. I can also share more about my analysis and/or a copy of the poster, if anyone wants more detail - I just didn't want to make this email too big. Mostly, I'm just hoping to start some discussion here as to how to address this. I searched the wiki , listserv archives , and bugzilla for anything related and came up with a few topics surrounding normalization and baseline correction, but only skirting this issue. It seems important, so I want to find out whether others agree with my approach or already have other ways of avoiding the problem, and whether FieldTrip's code needs to be changed or just documentation added, or what? Thanks for any insights, Teresa 271.03 / LLL17 - Neural oscillatory power is not Gaussian distributed across time Authors**L. IZHIKEVICH*, E. PETERSON, B. VOYTEK; Cognitive Sci., UCSD, San Diego, CADisclosures *L. Izhikevich:* None. *E. Peterson:* None. *B. Voytek:* None.AbstractNeural oscillations are important in organizing activity across the human brain in healthy cognition, while oscillatory disruptions are linked to numerous disease states. Oscillations are known to vary by frequency and amplitude across time and between different brain regions; however, this variability has never been well characterized. We examined human and animal EEG, LFP, MEG, and ECoG data from over 100 subjects to analyze the distribution of power and frequency across time, space and species. We report that between data types, subjects, frequencies, electrodes, and time, an inverse power law, or negative exponential distribution, is present in all recordings. This is contrary to, and not compatible with, the Gaussian noise assumption made in many digital signal processing techniques. The statistical assumptions underlying common algorithms for power spectral estimation, such as Welch's method, are being violated resulting in non-trivial misestimates of oscillatory power. Different statistical approaches are warranted. -- Teresa E. Madsen, PhD Research Technical Specialist: *in vivo *electrophysiology & data analysis Division of Behavioral Neuroscience and Psychiatric Disorders Yerkes National Primate Research Center Emory University Rainnie Lab, NSB 5233 954 Gatewood Rd. NE Atlanta, GA 30329 (770) 296-9119 braingirl at gmail.com https://www.linkedin.com/in/temadsen -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: RawVsLogPowerDistributions.png Type: image/png Size: 38279 bytes Desc: not available URL: From tmadsen at emory.edu Mon Dec 12 17:58:11 2016 From: tmadsen at emory.edu (Teresa Madsen) Date: Mon, 12 Dec 2016 11:58:11 -0500 Subject: [FieldTrip] time-frequeny analysis task vs resting In-Reply-To: References: Message-ID: Lorena, As far as I know, I don't think there is a way currently built into FieldTrip to adjust all experimental trials by the same separate baseline period, but it is something I also prefer to do, since my pre-trial "baselines" change across conditioning in my behavioral paradigm. I've written a custom function to perform this on my data, and it is part of the code I'm offering to share in the email I just sent out asking another question that relates to baseline correction and other issues. Are you interested? ~Teresa On Mon, Dec 12, 2016 at 12:47 AM, Lorena Santamaria Covarrubias < lorenalsc at hotmail.com> wrote: > Hi Matt, > > > Thank you for you reply Matt. > > I am working with ECoG. The tasks that participants have to perform is > movements of hand and tongue, indicated by a visual stimuli. > > Five repetitions each motor task followed by a fixation cross on the > screen and then the next motor task, in a random order. > > Resting state were recorded prior to the motor tasks during 5 minutes were > participants has to look to a fixation cross and not perform any movement. > > If you need any other information please let me know. > > Thank you. > > > ------------------------------ > *De:* fieldtrip-bounces at science.ru.nl > en nombre de Matt Gerhold > *Enviado:* lunes, 12 de diciembre de 2016 5:26 > *Para:* FieldTrip discussion list > *Asunto:* Re: [FieldTrip] time-frequeny analysis task vs resting > > What do your tasks entail? Can you provide more specific details regarding > your experimental design? That will help clarify what the best analytical > work-flow will be in your case. > > Matt > > On Mon, Dec 12, 2016 at 3:37 AM, Lorena Santamaria Covarrubias < > lorenalsc at hotmail.com> wrote: > >> Good morning, >> >> >> I am new in this topic and I have a basic question about baseline >> correction (ft_freqbaseline) when I am trying to study the time frequency >> analysis of task versus resting period. >> >> >> I have two data-sets, one with the tasks information, 64 channels x 1s >> epoch x 100 trials (50 trials task1 and 50 trials task2) and then 5 >> minutes of continuous recording for resting state. >> >> I obtained the power spectrum for both tasks: >> >> >> cfg = []; >> cfg.output = 'pow'; >> cfg.method = 'tfr'; >> cfg.foi = 8:1:130; >> cfg.toi = 0.3:0.01:1.3; >> cfg.keeptrials = 'no'; >> >> cfg.trials = find(epoch_data.trialinfo == 1); >> Task1Spec= ft_freqanalysis(cfg,epoch_data); >> >> cfg.trials = find(epoch_data.trialinfo == 2); >> Task2Spec = ft_freqanalysis(cfg,epoch_data); >> >> But now I don't know how to do the baseline correction with the 5 minutes >> continuous data to can compare the power spectrum of both tasks in relation >> to the resting state. >> >> Maybe I missing something pretty basic, apologies in advance for it if >> this is the case. >> >> Any suggestions will be appreciated. >> >> Thanks!! >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Teresa E. Madsen, PhD Division of Behavioral Neuroscience and Psychiatric Disorders Yerkes National Primate Research Center Emory University Rainnie Lab, NSB 5233 954 Gatewood Rd. NE Atlanta, GA 30329 (770) 296-9119 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfisher at bowdoin.edu Mon Dec 12 22:12:15 2016 From: hfisher at bowdoin.edu (Harrison Fisher) Date: Mon, 12 Dec 2016 21:12:15 +0000 Subject: [FieldTrip] Granger Causality Group Analysis Message-ID: <4CAC5769-AD2C-4FB6-BA1C-5AB181835EC4@bowdoin.edu> Hello, I have 30+ subjects, each with 2 sessions, and 16 conditions for the data trials. I ultimately want to look at the difference between connectivity in one condition compared to another. For selected regions of interest, I created two virtual channels from the time locked dataset of all conditions concatenated and performed a mtmconvol analysis to get a wavelet (fr_frequencyanalysis, mtmconvol) for each of the virtual channels. Then I computed granger over the wavelet (ft_connectivityanalysis) and use ft_singleplotTFR to visualize. My main question is at what point do I need to separate out by condition in order to do a comparison of granger causality on the difference between two conditions? I am working off of a previous student’s scripts, and it appears that she was running the beamformer creation of the virtual channels on a trial by trial basis (see script excerpt below). Or is there a way to pull the conditions out of the wavelet or granger matrices created for the entire appended dataset of all the conditions? Thanks for the help! Harrison Fisher Bowdoin College Class of 2017 time = timelock.All %select the appended dataset % apply LCMV spatial filter to location 01 of interest cfg = []; cfg.method = 'lcmv'; cfg.lcmv.keepfilter = 'yes'; cfg.headmodel = vol; cfg.elec = egi; cfg.grid.pos = roi1; source01 = ft_sourceanalysis(cfg, time); % construct 3-D virtual channel at location 01 beamformer01 = source01.avg.filter{1}; chansel = ft_channelselection('all' , data.label); % find the names chansel = match_str(data.label, chansel); % find the indices chan01_3D = []; chan01_3D.label = {'x', 'y', 'z'}; chan01_3D.time = data.time; for i=1:length(data.trial) chan01_3D.trial{i} = beamformer01 * data.trial{i}(chansel,:); end % construct a single virtual channel in the maximum power orientation timeseries = cat(2, chan01_3D.trial{:}); [u, s, v] = svd(timeseries, 'econ'); timeseriesmaxproj = u(:, 1)' * timeseries; chan01 = []; chan01.label = {'source01'}; chan01.time = data.time; for i = 1:length(data.trial) chan01.trial{i} = u(:, 1)' * beamformer01 * data.trial{i}(chansel, :); end From tmadsen at emory.edu Mon Dec 12 22:39:03 2016 From: tmadsen at emory.edu (Teresa Madsen) Date: Mon, 12 Dec 2016 21:39:03 +0000 Subject: [FieldTrip] impact of skewed power distributions on data analysis In-Reply-To: References: Message-ID: No, sorry, that's not what I meant, but thanks for giving me the opportunity to clarify. Of course everyone is familiar with the 1/f pattern across frequencies, but the distribution across time (and according to the poster, also across space), also has an extremely skewed, negative exponential distribution. I probably confused everyone by trying to show too much data in my figure, but each color represents the distribution of power values for a single frequency over time, using a histogram and a line above with circles at the mean +/- one standard deviation. My main point was that the mean is not representative of the central tendency of such an asymmetrical distribution of power values over time. It's even more obvious which is more representative of their actual distributions when I plot e^mean(logpower) on the raw plot and log(mean(rawpower)) on the log plot, but that made the figure even more busy and confusing. I hope that helps, Teresa On Mon, Dec 12, 2016 at 3:47 PM Nicholas A. Peatfield < nick.peatfield at gmail.com> wrote: > Hi Teresa, > > I think what you are discussing is the 1/f power scaling of the power > spectrum. This is one of the reasons that comparisons are made within > a band (i.e. alpha to alpha) and not between bands (i.e. alpha to gamma), > as such the assumption is that within bands there should be a relative > change against baseline and this is what the statistics are performed on. > That is, baseline correction is assumed to be the mean for a specific > frequency and not a mean across frequencies. > > And this leads to another point that when you are selecting a frequency > range to do the non-parametric statistics on you should not do 1-64 Hz but > break it up based on the bands. > > Hope my interpretation of your point is correct. I sent in individually, > as I wanted to ensure I followed your point. > > Cheers, > > Nick > > > On 12 December 2016 at 08:23, Teresa Madsen wrote: > > FieldTrippers, > > While analyzing my data for the annual Society for Neuroscience meeting, I > developed a concern that was quickly validated by another poster (full > abstract copied and linked below) focusing on the root of the problem: > neural oscillatory power is not normally distributed across time, > frequency, or space. The specific problem I had encountered was in > baseline-correcting my experimental data, where, regardless of > cfg.baselinetype, ft_freqbaseline depends on the mean power over time. > However, I found that the distribution of raw power over time is so skewed > that the mean was not a reasonable approximation of the central tendency of > the baseline power, so it made most of my experimental data look like it > had decreased power compared to baseline. The more I think about it, the > more I realize that averaging is everywhere in the way we analyze neural > oscillations (across time points, frequency bins, electrodes, trials, > subjects, etc.), and many of the standard statistics people use also rely > on assumptions of normality. > > The most obvious solution for me was to log transform the data first, as > it appears to be fairly log normal, and I always use log-scale > visualizations anyway. Erik Peterson, middle author on the poster, agreed > that this would at least "restore (some) symmetry to the error > distribution." I used a natural log transform, sort of arbitrarily to > differentiate from the standard decibel transform included in FieldTrip as > cfg.baselinetype = 'db'. The following figures compare the 2 > distributions across several frequency bands (using power values from a > wavelet spectrogram obtained from a baseline LFP recorded in rat prelimbic > cortex). The lines at the top represent the mean +/- one standard > deviation for each frequency band, and you can see how those descriptive > stats are much more representative of the actual distributions in the log > scale. > > > ​​ > For my analysis, I also calculated a z-score on the log transformed power > to assess how my experimental data compared to the variability of the noise > in a long baseline recording from before conditioning, rather than a short > pre-trial baseline period, since I find that more informative than any of > FieldTrip's built-in baseline types. I'm happy to share the custom > functions I wrote for this if people think it would be a useful addition to > FieldTrip. I can also share more about my analysis and/or a copy of the > poster, if anyone wants more detail - I just didn't want to make this email > too big. > > Mostly, I'm just hoping to start some discussion here as to how to address > this. I searched the wiki > , listserv > > archives > , > and bugzilla for > anything related and came up with a few topics surrounding normalization > and baseline correction, but only skirting this issue. It seems important, > so I want to find out whether others agree with my approach or already have > other ways of avoiding the problem, and whether FieldTrip's code needs to > be changed or just documentation added, or what? > > Thanks for any insights, > Teresa > > > 271.03 / LLL17 - Neural oscillatory power is not Gaussian distributed > across time > > Authors**L. IZHIKEVICH*, E. PETERSON, B. VOYTEK; > Cognitive Sci., UCSD, San Diego, CADisclosures *L. Izhikevich:* None. *E. > Peterson:* None. *B. Voytek:* None.AbstractNeural oscillations are > important in organizing activity across the human brain in healthy > cognition, while oscillatory disruptions are linked to numerous disease > states. Oscillations are known to vary by frequency and amplitude across > time and between different brain regions; however, this variability has > never been well characterized. We examined human and animal EEG, LFP, MEG, > and ECoG data from over 100 subjects to analyze the distribution of power > and frequency across time, space and species. We report that between data > types, subjects, frequencies, electrodes, and time, an inverse power law, > or negative exponential distribution, is present in all recordings. This is > contrary to, and not compatible with, the Gaussian noise assumption made in > many digital signal processing techniques. The statistical assumptions > underlying common algorithms for power spectral estimation, such as Welch's > method, are being violated resulting in non-trivial misestimates of > oscillatory power. Different statistical approaches are warranted. > > -- > Teresa E. Madsen, PhD > Research Technical Specialist: *in vivo *electrophysiology & data > analysis > Division of Behavioral Neuroscience and Psychiatric Disorders > Yerkes National Primate Research Center > Emory University > Rainnie Lab, NSB 5233 > 954 Gatewood Rd. NE > Atlanta, GA 30329 > (770) 296-9119 > braingirl at gmail.com > https://www.linkedin.com/in/temadsen > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Nicholas Peatfield, PhD > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: RawVsLogPowerDistributions.png Type: image/png Size: 38279 bytes Desc: not available URL: From nick.peatfield at gmail.com Mon Dec 12 22:55:35 2016 From: nick.peatfield at gmail.com (Nicholas A. Peatfield) Date: Mon, 12 Dec 2016 13:55:35 -0800 Subject: [FieldTrip] impact of skewed power distributions on data analysis In-Reply-To: References: Message-ID: Correct me if I'm wrong, but, if you are using the non-parametric statistics implemented by fieldtrip, the data does not need to be normally distributed. On 12 December 2016 at 13:39, Teresa Madsen wrote: > No, sorry, that's not what I meant, but thanks for giving me the > opportunity to clarify. Of course everyone is familiar with the 1/f pattern > across frequencies, but the distribution across time (and according to the > poster, also across space), also has an extremely skewed, negative > exponential distribution. I probably confused everyone by trying to show > too much data in my figure, but each color represents the distribution of > power values for a single frequency over time, using a histogram and a line > above with circles at the mean +/- one standard deviation. > > My main point was that the mean is not representative of the central > tendency of such an asymmetrical distribution of power values over time. > It's even more obvious which is more representative of their actual > distributions when I plot e^mean(logpower) on the raw plot and > log(mean(rawpower)) on the log plot, but that made the figure even more > busy and confusing. > > I hope that helps, > Teresa > > On Mon, Dec 12, 2016 at 3:47 PM Nicholas A. Peatfield < > nick.peatfield at gmail.com> wrote: > >> Hi Teresa, >> >> I think what you are discussing is the 1/f power scaling of the power >> spectrum. This is one of the reasons that comparisons are made within >> a band (i.e. alpha to alpha) and not between bands (i.e. alpha to gamma), >> as such the assumption is that within bands there should be a relative >> change against baseline and this is what the statistics are performed on. >> That is, baseline correction is assumed to be the mean for a specific >> frequency and not a mean across frequencies. >> >> And this leads to another point that when you are selecting a frequency >> range to do the non-parametric statistics on you should not do 1-64 Hz but >> break it up based on the bands. >> >> Hope my interpretation of your point is correct. I sent in individually, >> as I wanted to ensure I followed your point. >> >> Cheers, >> >> Nick >> >> >> On 12 December 2016 at 08:23, Teresa Madsen wrote: >> >> FieldTrippers, >> >> While analyzing my data for the annual Society for Neuroscience meeting, >> I developed a concern that was quickly validated by another poster (full >> abstract copied and linked below) focusing on the root of the problem: >> neural oscillatory power is not normally distributed across time, >> frequency, or space. The specific problem I had encountered was in >> baseline-correcting my experimental data, where, regardless of >> cfg.baselinetype, ft_freqbaseline depends on the mean power over time. >> However, I found that the distribution of raw power over time is so skewed >> that the mean was not a reasonable approximation of the central tendency of >> the baseline power, so it made most of my experimental data look like it >> had decreased power compared to baseline. The more I think about it, >> the more I realize that averaging is everywhere in the way we analyze >> neural oscillations (across time points, frequency bins, electrodes, >> trials, subjects, etc.), and many of the standard statistics people use >> also rely on assumptions of normality. >> >> The most obvious solution for me was to log transform the data first, as >> it appears to be fairly log normal, and I always use log-scale >> visualizations anyway. Erik Peterson, middle author on the poster, agreed >> that this would at least "restore (some) symmetry to the error >> distribution." I used a natural log transform, sort of arbitrarily to >> differentiate from the standard decibel transform included in FieldTrip as >> cfg.baselinetype = 'db'. The following figures compare the 2 >> distributions across several frequency bands (using power values from a >> wavelet spectrogram obtained from a baseline LFP recorded in rat prelimbic >> cortex). The lines at the top represent the mean +/- one standard >> deviation for each frequency band, and you can see how those descriptive >> stats are much more representative of the actual distributions in the log >> scale. >> >> >> ​​ >> For my analysis, I also calculated a z-score on the log transformed power >> to assess how my experimental data compared to the variability of the noise >> in a long baseline recording from before conditioning, rather than a short >> pre-trial baseline period, since I find that more informative than any of >> FieldTrip's built-in baseline types. I'm happy to share the custom >> functions I wrote for this if people think it would be a useful addition to >> FieldTrip. I can also share more about my analysis and/or a copy of the >> poster, if anyone wants more detail - I just didn't want to make this email >> too big. >> >> Mostly, I'm just hoping to start some discussion here as to how to >> address this. I searched the wiki >> , listserv >> >> archives >> , >> and bugzilla for >> anything related and came up with a few topics surrounding normalization >> and baseline correction, but only skirting this issue. It seems important, >> so I want to find out whether others agree with my approach or already have >> other ways of avoiding the problem, and whether FieldTrip's code needs to >> be changed or just documentation added, or what? >> >> Thanks for any insights, >> Teresa >> >> >> 271.03 / LLL17 - Neural oscillatory power is not Gaussian distributed >> across time >> >> Authors**L. IZHIKEVICH*, E. PETERSON, B. VOYTEK; >> Cognitive Sci., UCSD, San Diego, CADisclosures *L. Izhikevich:* None. *E. >> Peterson:* None. *B. Voytek:* None.AbstractNeural oscillations are >> important in organizing activity across the human brain in healthy >> cognition, while oscillatory disruptions are linked to numerous disease >> states. Oscillations are known to vary by frequency and amplitude across >> time and between different brain regions; however, this variability has >> never been well characterized. We examined human and animal EEG, LFP, MEG, >> and ECoG data from over 100 subjects to analyze the distribution of power >> and frequency across time, space and species. We report that between data >> types, subjects, frequencies, electrodes, and time, an inverse power law, >> or negative exponential distribution, is present in all recordings. This is >> contrary to, and not compatible with, the Gaussian noise assumption made in >> many digital signal processing techniques. The statistical assumptions >> underlying common algorithms for power spectral estimation, such as Welch's >> method, are being violated resulting in non-trivial misestimates of >> oscillatory power. Different statistical approaches are warranted. >> >> -- >> Teresa E. Madsen, PhD >> Research Technical Specialist: *in vivo *electrophysiology & data >> analysis >> Division of Behavioral Neuroscience and Psychiatric Disorders >> Yerkes National Primate Research Center >> Emory University >> Rainnie Lab, NSB 5233 >> 954 Gatewood Rd. NE >> Atlanta, GA 30329 >> (770) 296-9119 >> braingirl at gmail.com >> https://www.linkedin.com/in/temadsen >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> Nicholas Peatfield, PhD >> >> -- Nicholas Peatfield, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: RawVsLogPowerDistributions.png Type: image/png Size: 38279 bytes Desc: not available URL: From poil.simonshlomo at nbt-analytics.com Tue Dec 13 00:14:56 2016 From: poil.simonshlomo at nbt-analytics.com (Simon-Shlomo Poil) Date: Tue, 13 Dec 2016 00:14:56 +0100 Subject: [FieldTrip] impact of skewed power distributions on data analysis In-Reply-To: References: Message-ID: Dear Teresa, The power is indeed not normally distributed over time. A more robust method is to use the median instead of the mean. -Simon -- Dr. Simon-Shlomo Poil Co-founder / Chief Technology Officer NBT Analytics BV Amsterdam Health and Technology Center Paasheuvelweg 25 1105BP Amsterdam The Netherlands Mobile number (Swiss): +41 (0)76 399 5809 Mobile number (Dutch): +31 (0) 62 030 7288 Skype: poil.simonshlomo Website: https://www.nbt-analytics.com 2016-12-12 22:39 GMT+01:00 Teresa Madsen : > No, sorry, that's not what I meant, but thanks for giving me the > opportunity to clarify. Of course everyone is familiar with the 1/f pattern > across frequencies, but the distribution across time (and according to the > poster, also across space), also has an extremely skewed, negative > exponential distribution. I probably confused everyone by trying to show > too much data in my figure, but each color represents the distribution of > power values for a single frequency over time, using a histogram and a line > above with circles at the mean +/- one standard deviation. > > My main point was that the mean is not representative of the central > tendency of such an asymmetrical distribution of power values over time. > It's even more obvious which is more representative of their actual > distributions when I plot e^mean(logpower) on the raw plot and > log(mean(rawpower)) on the log plot, but that made the figure even more > busy and confusing. > > I hope that helps, > Teresa > > On Mon, Dec 12, 2016 at 3:47 PM Nicholas A. Peatfield < > nick.peatfield at gmail.com> wrote: > >> Hi Teresa, >> >> I think what you are discussing is the 1/f power scaling of the power >> spectrum. This is one of the reasons that comparisons are made within >> a band (i.e. alpha to alpha) and not between bands (i.e. alpha to gamma), >> as such the assumption is that within bands there should be a relative >> change against baseline and this is what the statistics are performed on. >> That is, baseline correction is assumed to be the mean for a specific >> frequency and not a mean across frequencies. >> >> And this leads to another point that when you are selecting a frequency >> range to do the non-parametric statistics on you should not do 1-64 Hz but >> break it up based on the bands. >> >> Hope my interpretation of your point is correct. I sent in individually, >> as I wanted to ensure I followed your point. >> >> Cheers, >> >> Nick >> >> >> On 12 December 2016 at 08:23, Teresa Madsen wrote: >> >> FieldTrippers, >> >> While analyzing my data for the annual Society for Neuroscience meeting, >> I developed a concern that was quickly validated by another poster (full >> abstract copied and linked below) focusing on the root of the problem: >> neural oscillatory power is not normally distributed across time, >> frequency, or space. The specific problem I had encountered was in >> baseline-correcting my experimental data, where, regardless of >> cfg.baselinetype, ft_freqbaseline depends on the mean power over time. >> However, I found that the distribution of raw power over time is so skewed >> that the mean was not a reasonable approximation of the central tendency of >> the baseline power, so it made most of my experimental data look like it >> had decreased power compared to baseline. The more I think about it, >> the more I realize that averaging is everywhere in the way we analyze >> neural oscillations (across time points, frequency bins, electrodes, >> trials, subjects, etc.), and many of the standard statistics people use >> also rely on assumptions of normality. >> >> The most obvious solution for me was to log transform the data first, as >> it appears to be fairly log normal, and I always use log-scale >> visualizations anyway. Erik Peterson, middle author on the poster, agreed >> that this would at least "restore (some) symmetry to the error >> distribution." I used a natural log transform, sort of arbitrarily to >> differentiate from the standard decibel transform included in FieldTrip as >> cfg.baselinetype = 'db'. The following figures compare the 2 >> distributions across several frequency bands (using power values from a >> wavelet spectrogram obtained from a baseline LFP recorded in rat prelimbic >> cortex). The lines at the top represent the mean +/- one standard >> deviation for each frequency band, and you can see how those descriptive >> stats are much more representative of the actual distributions in the log >> scale. >> >> >> ​​ >> For my analysis, I also calculated a z-score on the log transformed power >> to assess how my experimental data compared to the variability of the noise >> in a long baseline recording from before conditioning, rather than a short >> pre-trial baseline period, since I find that more informative than any of >> FieldTrip's built-in baseline types. I'm happy to share the custom >> functions I wrote for this if people think it would be a useful addition to >> FieldTrip. I can also share more about my analysis and/or a copy of the >> poster, if anyone wants more detail - I just didn't want to make this email >> too big. >> >> Mostly, I'm just hoping to start some discussion here as to how to >> address this. I searched the wiki >> , listserv >> >> archives >> , >> and bugzilla for >> anything related and came up with a few topics surrounding normalization >> and baseline correction, but only skirting this issue. It seems important, >> so I want to find out whether others agree with my approach or already have >> other ways of avoiding the problem, and whether FieldTrip's code needs to >> be changed or just documentation added, or what? >> >> Thanks for any insights, >> Teresa >> >> >> 271.03 / LLL17 - Neural oscillatory power is not Gaussian distributed >> across time >> >> Authors**L. IZHIKEVICH*, E. PETERSON, B. VOYTEK; >> Cognitive Sci., UCSD, San Diego, CADisclosures *L. Izhikevich:* None. *E. >> Peterson:* None. *B. Voytek:* None.AbstractNeural oscillations are >> important in organizing activity across the human brain in healthy >> cognition, while oscillatory disruptions are linked to numerous disease >> states. Oscillations are known to vary by frequency and amplitude across >> time and between different brain regions; however, this variability has >> never been well characterized. We examined human and animal EEG, LFP, MEG, >> and ECoG data from over 100 subjects to analyze the distribution of power >> and frequency across time, space and species. We report that between data >> types, subjects, frequencies, electrodes, and time, an inverse power law, >> or negative exponential distribution, is present in all recordings. This is >> contrary to, and not compatible with, the Gaussian noise assumption made in >> many digital signal processing techniques. The statistical assumptions >> underlying common algorithms for power spectral estimation, such as Welch's >> method, are being violated resulting in non-trivial misestimates of >> oscillatory power. Different statistical approaches are warranted. >> >> -- >> Teresa E. Madsen, PhD >> Research Technical Specialist: *in vivo *electrophysiology & data >> analysis >> Division of Behavioral Neuroscience and Psychiatric Disorders >> Yerkes National Primate Research Center >> Emory University >> Rainnie Lab, NSB 5233 >> 954 Gatewood Rd. NE >> Atlanta, GA 30329 >> (770) 296-9119 >> braingirl at gmail.com >> https://www.linkedin.com/in/temadsen >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> Nicholas Peatfield, PhD >> >> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- NBT Analytics BV http://www.nbt-analytics.com IMPORTANT: This message and any attachments are intended for the individual or entity named above. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, you must not read, copy, use or disclose this communication to others; also please notify the sender by replying to this message, and then delete it from your system. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: logosmall.png Type: image/png Size: 2855 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: RawVsLogPowerDistributions.png Type: image/png Size: 38279 bytes Desc: not available URL: From tmadsen at emory.edu Tue Dec 13 00:45:17 2016 From: tmadsen at emory.edu (Teresa Madsen) Date: Mon, 12 Dec 2016 23:45:17 +0000 Subject: [FieldTrip] impact of skewed power distributions on data analysis In-Reply-To: References: Message-ID: That may very well be true; to be honest, I haven't looked that deeply into the stats offerings yet. However, my plan is to express each electrode's experimental data in terms of change from their respective baseline recordings before attempting any group averaging or statistical testing, and this problem shows up first in the baseline correction step, where FieldTrip averages raw power over time. ~Teresa On Mon, Dec 12, 2016 at 4:56 PM Nicholas A. Peatfield < nick.peatfield at gmail.com> wrote: > Correct me if I'm wrong, but, if you are using the non-parametric > statistics implemented by fieldtrip, the data does not need to be normally > distributed. > > On 12 December 2016 at 13:39, Teresa Madsen wrote: > > No, sorry, that's not what I meant, but thanks for giving me the > opportunity to clarify. Of course everyone is familiar with the 1/f pattern > across frequencies, but the distribution across time (and according to the > poster, also across space), also has an extremely skewed, negative > exponential distribution. I probably confused everyone by trying to show > too much data in my figure, but each color represents the distribution of > power values for a single frequency over time, using a histogram and a line > above with circles at the mean +/- one standard deviation. > > My main point was that the mean is not representative of the central > tendency of such an asymmetrical distribution of power values over time. > It's even more obvious which is more representative of their actual > distributions when I plot e^mean(logpower) on the raw plot and > log(mean(rawpower)) on the log plot, but that made the figure even more > busy and confusing. > > I hope that helps, > Teresa > > On Mon, Dec 12, 2016 at 3:47 PM Nicholas A. Peatfield < > nick.peatfield at gmail.com> wrote: > > Hi Teresa, > > I think what you are discussing is the 1/f power scaling of the power > spectrum. This is one of the reasons that comparisons are made within > a band (i.e. alpha to alpha) and not between bands (i.e. alpha to gamma), > as such the assumption is that within bands there should be a relative > change against baseline and this is what the statistics are performed on. > That is, baseline correction is assumed to be the mean for a specific > frequency and not a mean across frequencies. > > And this leads to another point that when you are selecting a frequency > range to do the non-parametric statistics on you should not do 1-64 Hz but > break it up based on the bands. > > Hope my interpretation of your point is correct. I sent in individually, > as I wanted to ensure I followed your point. > > Cheers, > > Nick > > > On 12 December 2016 at 08:23, Teresa Madsen wrote: > > FieldTrippers, > > While analyzing my data for the annual Society for Neuroscience meeting, I > developed a concern that was quickly validated by another poster (full > abstract copied and linked below) focusing on the root of the problem: > neural oscillatory power is not normally distributed across time, > frequency, or space. The specific problem I had encountered was in > baseline-correcting my experimental data, where, regardless of > cfg.baselinetype, ft_freqbaseline depends on the mean power over time. > However, I found that the distribution of raw power over time is so skewed > that the mean was not a reasonable approximation of the central tendency of > the baseline power, so it made most of my experimental data look like it > had decreased power compared to baseline. The more I think about it, the > more I realize that averaging is everywhere in the way we analyze neural > oscillations (across time points, frequency bins, electrodes, trials, > subjects, etc.), and many of the standard statistics people use also rely > on assumptions of normality. > > The most obvious solution for me was to log transform the data first, as > it appears to be fairly log normal, and I always use log-scale > visualizations anyway. Erik Peterson, middle author on the poster, agreed > that this would at least "restore (some) symmetry to the error > distribution." I used a natural log transform, sort of arbitrarily to > differentiate from the standard decibel transform included in FieldTrip as > cfg.baselinetype = 'db'. The following figures compare the 2 > distributions across several frequency bands (using power values from a > wavelet spectrogram obtained from a baseline LFP recorded in rat prelimbic > cortex). The lines at the top represent the mean +/- one standard > deviation for each frequency band, and you can see how those descriptive > stats are much more representative of the actual distributions in the log > scale. > > > ​​ > For my analysis, I also calculated a z-score on the log transformed power > to assess how my experimental data compared to the variability of the noise > in a long baseline recording from before conditioning, rather than a short > pre-trial baseline period, since I find that more informative than any of > FieldTrip's built-in baseline types. I'm happy to share the custom > functions I wrote for this if people think it would be a useful addition to > FieldTrip. I can also share more about my analysis and/or a copy of the > poster, if anyone wants more detail - I just didn't want to make this email > too big. > > Mostly, I'm just hoping to start some discussion here as to how to address > this. I searched the wiki > , listserv > > archives > , > and bugzilla for > anything related and came up with a few topics surrounding normalization > and baseline correction, but only skirting this issue. It seems important, > so I want to find out whether others agree with my approach or already have > other ways of avoiding the problem, and whether FieldTrip's code needs to > be changed or just documentation added, or what? > > Thanks for any insights, > Teresa > > > 271.03 / LLL17 - Neural oscillatory power is not Gaussian distributed > across time > > Authors**L. IZHIKEVICH*, E. PETERSON, B. VOYTEK; > Cognitive Sci., UCSD, San Diego, CADisclosures *L. Izhikevich:* None. *E. > Peterson:* None. *B. Voytek:* None.AbstractNeural oscillations are > important in organizing activity across the human brain in healthy > cognition, while oscillatory disruptions are linked to numerous disease > states. Oscillations are known to vary by frequency and amplitude across > time and between different brain regions; however, this variability has > never been well characterized. We examined human and animal EEG, LFP, MEG, > and ECoG data from over 100 subjects to analyze the distribution of power > and frequency across time, space and species. We report that between data > types, subjects, frequencies, electrodes, and time, an inverse power law, > or negative exponential distribution, is present in all recordings. This is > contrary to, and not compatible with, the Gaussian noise assumption made in > many digital signal processing techniques. The statistical assumptions > underlying common algorithms for power spectral estimation, such as Welch's > method, are being violated resulting in non-trivial misestimates of > oscillatory power. Different statistical approaches are warranted. > > -- > Teresa E. Madsen, PhD > Research Technical Specialist: *in vivo *electrophysiology & data > analysis > Division of Behavioral Neuroscience and Psychiatric Disorders > Yerkes National Primate Research Center > Emory University > Rainnie Lab, NSB 5233 > 954 Gatewood Rd. NE > Atlanta, GA 30329 > (770) 296-9119 > braingirl at gmail.com > https://www.linkedin.com/in/temadsen > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Nicholas Peatfield, PhD > > > > > -- > Nicholas Peatfield, PhD > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: RawVsLogPowerDistributions.png Type: image/png Size: 38279 bytes Desc: not available URL: From lorenalsc at hotmail.com Tue Dec 13 01:48:09 2016 From: lorenalsc at hotmail.com (Lorena Santamaria Covarrubias) Date: Tue, 13 Dec 2016 00:48:09 +0000 Subject: [FieldTrip] time-frequeny analysis task vs resting In-Reply-To: References: , Message-ID: Hi Teresa, If you don't mind to share it I would like to. Thanks in advance Teresa for your help. Best, Lorena. ________________________________ De: fieldtrip-bounces at science.ru.nl en nombre de Teresa Madsen Enviado: lunes, 12 de diciembre de 2016 16:58 Para: FieldTrip discussion list Asunto: Re: [FieldTrip] time-frequeny analysis task vs resting Lorena, As far as I know, I don't think there is a way currently built into FieldTrip to adjust all experimental trials by the same separate baseline period, but it is something I also prefer to do, since my pre-trial "baselines" change across conditioning in my behavioral paradigm. I've written a custom function to perform this on my data, and it is part of the code I'm offering to share in the email I just sent out asking another question that relates to baseline correction and other issues. Are you interested? ~Teresa On Mon, Dec 12, 2016 at 12:47 AM, Lorena Santamaria Covarrubias > wrote: Hi Matt, Thank you for you reply Matt. I am working with ECoG. The tasks that participants have to perform is movements of hand and tongue, indicated by a visual stimuli. Five repetitions each motor task followed by a fixation cross on the screen and then the next motor task, in a random order. Resting state were recorded prior to the motor tasks during 5 minutes were participants has to look to a fixation cross and not perform any movement. If you need any other information please let me know. Thank you. ________________________________ De: fieldtrip-bounces at science.ru.nl > en nombre de Matt Gerhold > Enviado: lunes, 12 de diciembre de 2016 5:26 Para: FieldTrip discussion list Asunto: Re: [FieldTrip] time-frequeny analysis task vs resting What do your tasks entail? Can you provide more specific details regarding your experimental design? That will help clarify what the best analytical work-flow will be in your case. Matt On Mon, Dec 12, 2016 at 3:37 AM, Lorena Santamaria Covarrubias > wrote: Good morning, I am new in this topic and I have a basic question about baseline correction (ft_freqbaseline) when I am trying to study the time frequency analysis of task versus resting period. I have two data-sets, one with the tasks information, 64 channels x 1s epoch x 100 trials (50 trials task1 and 50 trials task2) and then 5 minutes of continuous recording for resting state. I obtained the power spectrum for both tasks: cfg = []; cfg.output = 'pow'; cfg.method = 'tfr'; cfg.foi = 8:1:130; cfg.toi = 0.3:0.01:1.3; cfg.keeptrials = 'no'; cfg.trials = find(epoch_data.trialinfo == 1); Task1Spec= ft_freqanalysis(cfg,epoch_data); cfg.trials = find(epoch_data.trialinfo == 2); Task2Spec = ft_freqanalysis(cfg,epoch_data); But now I don't know how to do the baseline correction with the 5 minutes continuous data to can compare the power spectrum of both tasks in relation to the resting state. Maybe I missing something pretty basic, apologies in advance for it if this is the case. Any suggestions will be appreciated. Thanks!! _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Teresa E. Madsen, PhD Division of Behavioral Neuroscience and Psychiatric Disorders Yerkes National Primate Research Center Emory University Rainnie Lab, NSB 5233 954 Gatewood Rd. NE Atlanta, GA 30329 (770) 296-9119 -------------- next part -------------- An HTML attachment was scrubbed... URL: From alik.widge at gmail.com Tue Dec 13 15:09:33 2016 From: alik.widge at gmail.com (Alik Widge) Date: Tue, 13 Dec 2016 09:09:33 -0500 Subject: [FieldTrip] impact of skewed power distributions on data analysis In-Reply-To: References: Message-ID: In this, Teresa is right and we have observed this in our own EEG data -- depending on one's level of noise and number of trials/patients, the mean can be a very poor estimator of central tendency. My students are still arguing about what we really want to do with it, but at least one of them has shifted to using the median as a matter of course for baseline normalization. Alik Widge alik.widge at gmail.com (206) 866-5435 On Mon, Dec 12, 2016 at 6:45 PM, Teresa Madsen wrote: > That may very well be true; to be honest, I haven't looked that deeply > into the stats offerings yet. However, my plan is to express each > electrode's experimental data in terms of change from their respective > baseline recordings before attempting any group averaging or statistical > testing, and this problem shows up first in the baseline correction step, > where FieldTrip averages raw power over time. > > ~Teresa > > On Mon, Dec 12, 2016 at 4:56 PM Nicholas A. Peatfield < > nick.peatfield at gmail.com> wrote: > >> Correct me if I'm wrong, but, if you are using the non-parametric >> statistics implemented by fieldtrip, the data does not need to be normally >> distributed. >> >> On 12 December 2016 at 13:39, Teresa Madsen wrote: >> >> No, sorry, that's not what I meant, but thanks for giving me the >> opportunity to clarify. Of course everyone is familiar with the 1/f pattern >> across frequencies, but the distribution across time (and according to the >> poster, also across space), also has an extremely skewed, negative >> exponential distribution. I probably confused everyone by trying to show >> too much data in my figure, but each color represents the distribution of >> power values for a single frequency over time, using a histogram and a line >> above with circles at the mean +/- one standard deviation. >> >> My main point was that the mean is not representative of the central >> tendency of such an asymmetrical distribution of power values over time. >> It's even more obvious which is more representative of their actual >> distributions when I plot e^mean(logpower) on the raw plot and >> log(mean(rawpower)) on the log plot, but that made the figure even more >> busy and confusing. >> >> I hope that helps, >> Teresa >> >> On Mon, Dec 12, 2016 at 3:47 PM Nicholas A. Peatfield < >> nick.peatfield at gmail.com> wrote: >> >> Hi Teresa, >> >> I think what you are discussing is the 1/f power scaling of the power >> spectrum. This is one of the reasons that comparisons are made within >> a band (i.e. alpha to alpha) and not between bands (i.e. alpha to gamma), >> as such the assumption is that within bands there should be a relative >> change against baseline and this is what the statistics are performed on. >> That is, baseline correction is assumed to be the mean for a specific >> frequency and not a mean across frequencies. >> >> And this leads to another point that when you are selecting a frequency >> range to do the non-parametric statistics on you should not do 1-64 Hz but >> break it up based on the bands. >> >> Hope my interpretation of your point is correct. I sent in individually, >> as I wanted to ensure I followed your point. >> >> Cheers, >> >> Nick >> >> >> On 12 December 2016 at 08:23, Teresa Madsen wrote: >> >> FieldTrippers, >> >> While analyzing my data for the annual Society for Neuroscience meeting, >> I developed a concern that was quickly validated by another poster (full >> abstract copied and linked below) focusing on the root of the problem: >> neural oscillatory power is not normally distributed across time, >> frequency, or space. The specific problem I had encountered was in >> baseline-correcting my experimental data, where, regardless of >> cfg.baselinetype, ft_freqbaseline depends on the mean power over time. >> However, I found that the distribution of raw power over time is so skewed >> that the mean was not a reasonable approximation of the central tendency of >> the baseline power, so it made most of my experimental data look like it >> had decreased power compared to baseline. The more I think about it, >> the more I realize that averaging is everywhere in the way we analyze >> neural oscillations (across time points, frequency bins, electrodes, >> trials, subjects, etc.), and many of the standard statistics people use >> also rely on assumptions of normality. >> >> The most obvious solution for me was to log transform the data first, as >> it appears to be fairly log normal, and I always use log-scale >> visualizations anyway. Erik Peterson, middle author on the poster, agreed >> that this would at least "restore (some) symmetry to the error >> distribution." I used a natural log transform, sort of arbitrarily to >> differentiate from the standard decibel transform included in FieldTrip as >> cfg.baselinetype = 'db'. The following figures compare the 2 >> distributions across several frequency bands (using power values from a >> wavelet spectrogram obtained from a baseline LFP recorded in rat prelimbic >> cortex). The lines at the top represent the mean +/- one standard >> deviation for each frequency band, and you can see how those descriptive >> stats are much more representative of the actual distributions in the log >> scale. >> >> >> ​​ >> For my analysis, I also calculated a z-score on the log transformed power >> to assess how my experimental data compared to the variability of the noise >> in a long baseline recording from before conditioning, rather than a short >> pre-trial baseline period, since I find that more informative than any of >> FieldTrip's built-in baseline types. I'm happy to share the custom >> functions I wrote for this if people think it would be a useful addition to >> FieldTrip. I can also share more about my analysis and/or a copy of the >> poster, if anyone wants more detail - I just didn't want to make this email >> too big. >> >> Mostly, I'm just hoping to start some discussion here as to how to >> address this. I searched the wiki >> , listserv >> >> archives >> , >> and bugzilla for >> anything related and came up with a few topics surrounding normalization >> and baseline correction, but only skirting this issue. It seems important, >> so I want to find out whether others agree with my approach or already have >> other ways of avoiding the problem, and whether FieldTrip's code needs to >> be changed or just documentation added, or what? >> >> Thanks for any insights, >> Teresa >> >> >> 271.03 / LLL17 - Neural oscillatory power is not Gaussian distributed >> across time >> >> Authors**L. IZHIKEVICH*, E. PETERSON, B. VOYTEK; >> Cognitive Sci., UCSD, San Diego, CADisclosures *L. Izhikevich:* None. *E. >> Peterson:* None. *B. Voytek:* None.AbstractNeural oscillations are >> important in organizing activity across the human brain in healthy >> cognition, while oscillatory disruptions are linked to numerous disease >> states. Oscillations are known to vary by frequency and amplitude across >> time and between different brain regions; however, this variability has >> never been well characterized. We examined human and animal EEG, LFP, MEG, >> and ECoG data from over 100 subjects to analyze the distribution of power >> and frequency across time, space and species. We report that between data >> types, subjects, frequencies, electrodes, and time, an inverse power law, >> or negative exponential distribution, is present in all recordings. This is >> contrary to, and not compatible with, the Gaussian noise assumption made in >> many digital signal processing techniques. The statistical assumptions >> underlying common algorithms for power spectral estimation, such as Welch's >> method, are being violated resulting in non-trivial misestimates of >> oscillatory power. Different statistical approaches are warranted. >> >> -- >> Teresa E. Madsen, PhD >> Research Technical Specialist: *in vivo *electrophysiology & data >> analysis >> Division of Behavioral Neuroscience and Psychiatric Disorders >> Yerkes National Primate Research Center >> Emory University >> Rainnie Lab, NSB 5233 >> 954 Gatewood Rd. NE >> Atlanta, GA 30329 >> (770) 296-9119 >> braingirl at gmail.com >> https://www.linkedin.com/in/temadsen >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> Nicholas Peatfield, PhD >> >> >> >> >> -- >> Nicholas Peatfield, PhD >> >> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: RawVsLogPowerDistributions.png Type: image/png Size: 38279 bytes Desc: not available URL: From SXM1085 at student.bham.ac.uk Tue Dec 13 17:41:00 2016 From: SXM1085 at student.bham.ac.uk (Sebastian Michelmann) Date: Tue, 13 Dec 2016 16:41:00 +0000 Subject: [FieldTrip] problem with offline head movement compensation in MEG (ft_headmovement) Message-ID: <2D9C9145AF1E4D4799ADDB2C0F996AE8019EF67A9D@EX4.adf.bham.ac.uk> Dear FT community , I tried to use ft_headmovement to adjust my grad structure in order to account for head movement before source reconstruction. I run into the following problem: % code cfg = []; cfg.dataset = filenames{1}; cfg.trl = trl_used; [grad_adj] = ft_headmovement(cfg); >> output processing channel { 'HLC0011' 'HLC0012' 'HLC0013' 'HLC0021' 'HLC0022' 'HLC0023' 'HLC0031' 'HLC0032' 'HLC0033' } reading and preprocessing reading and preprocessing trial 687 from 687 the call to "ft_preprocessing" took 58 seconds and required the additional allocation of an estimated 14 MB >> error Error using kmeans (line 262) X must have more rows than the number of clusters. Error in ft_headmovement (line 125) [bin, cluster] = kmeans(dat', cfg.numclusters); ---------------------------------------------------------------------- The problem is, that the dat passed to kmeans clustering is empty. It seems that only headpositions that are at least 100 times present in the downsampled data are actually considered for clustering. I don't understand the reason for that, especially since the data is not rounded and scaled in 'mm' (there are a lot of tiny changes between the sampling points) Thanks for any suggestions! All the best, Sebastian This is in line 92 of the function dat = zeros(length(data.label), 0); wdat = zeros(1, 0); for k = 1:length(data.trial) tmpdat = data.trial{k}; utmpdat = unique(tmpdat','rows')'; dat = [dat utmpdat]; wtmpdat = zeros(1,size(utmpdat,2)); for m = 1:size(utmpdat,2) wtmpdat(1,m) = sum(sum(tmpdat-utmpdat(:,m)*ones(1,size(tmpdat,2))==0,1)==9); end wdat = [wdat wtmpdat]; end dat(:, wdat<100) = []; wdat(wdat<100) = []; -------------- next part -------------- An HTML attachment was scrubbed... URL: From J.Herring at donders.ru.nl Wed Dec 14 10:22:00 2016 From: J.Herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 14 Dec 2016 09:22:00 +0000 Subject: [FieldTrip] impact of skewed power distributions on data analysis In-Reply-To: References: Message-ID: <6F9804CE79B042468FDC7E8C86CF4CBC4E777ACF@exprd04.hosting.ru.nl> In terms of statistics it is the distribution of values that you do the statistics on that matters. In case of a paired-samples t-test when comparing two conditions, it is the distribution of difference values that has to be normally distributed. The distribution of difference values is often normal given two similarly non-normal distributions, offering no complications for a regular parametric test. The non-parametric tests offered in fieldtrip indeed do not assume normality, so you should have no problem there either. From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alik Widge Sent: Tuesday, December 13, 2016 3:10 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] impact of skewed power distributions on data analysis In this, Teresa is right and we have observed this in our own EEG data -- depending on one's level of noise and number of trials/patients, the mean can be a very poor estimator of central tendency. My students are still arguing about what we really want to do with it, but at least one of them has shifted to using the median as a matter of course for baseline normalization. Alik Widge alik.widge at gmail.com (206) 866-5435 On Mon, Dec 12, 2016 at 6:45 PM, Teresa Madsen > wrote: That may very well be true; to be honest, I haven't looked that deeply into the stats offerings yet. However, my plan is to express each electrode's experimental data in terms of change from their respective baseline recordings before attempting any group averaging or statistical testing, and this problem shows up first in the baseline correction step, where FieldTrip averages raw power over time. ~Teresa On Mon, Dec 12, 2016 at 4:56 PM Nicholas A. Peatfield > wrote: Correct me if I'm wrong, but, if you are using the non-parametric statistics implemented by fieldtrip, the data does not need to be normally distributed. On 12 December 2016 at 13:39, Teresa Madsen > wrote: No, sorry, that's not what I meant, but thanks for giving me the opportunity to clarify. Of course everyone is familiar with the 1/f pattern across frequencies, but the distribution across time (and according to the poster, also across space), also has an extremely skewed, negative exponential distribution. I probably confused everyone by trying to show too much data in my figure, but each color represents the distribution of power values for a single frequency over time, using a histogram and a line above with circles at the mean +/- one standard deviation. My main point was that the mean is not representative of the central tendency of such an asymmetrical distribution of power values over time. It's even more obvious which is more representative of their actual distributions when I plot e^mean(logpower) on the raw plot and log(mean(rawpower)) on the log plot, but that made the figure even more busy and confusing. I hope that helps, Teresa On Mon, Dec 12, 2016 at 3:47 PM Nicholas A. Peatfield > wrote: Hi Teresa, I think what you are discussing is the 1/f power scaling of the power spectrum. This is one of the reasons that comparisons are made within a band (i.e. alpha to alpha) and not between bands (i.e. alpha to gamma), as such the assumption is that within bands there should be a relative change against baseline and this is what the statistics are performed on. That is, baseline correction is assumed to be the mean for a specific frequency and not a mean across frequencies. And this leads to another point that when you are selecting a frequency range to do the non-parametric statistics on you should not do 1-64 Hz but break it up based on the bands. Hope my interpretation of your point is correct. I sent in individually, as I wanted to ensure I followed your point. Cheers, Nick On 12 December 2016 at 08:23, Teresa Madsen > wrote: FieldTrippers, While analyzing my data for the annual Society for Neuroscience meeting, I developed a concern that was quickly validated by another poster (full abstract copied and linked below) focusing on the root of the problem: neural oscillatory power is not normally distributed across time, frequency, or space. The specific problem I had encountered was in baseline-correcting my experimental data, where, regardless of cfg.baselinetype, ft_freqbaseline depends on the mean power over time. However, I found that the distribution of raw power over time is so skewed that the mean was not a reasonable approximation of the central tendency of the baseline power, so it made most of my experimental data look like it had decreased power compared to baseline. The more I think about it, the more I realize that averaging is everywhere in the way we analyze neural oscillations (across time points, frequency bins, electrodes, trials, subjects, etc.), and many of the standard statistics people use also rely on assumptions of normality. The most obvious solution for me was to log transform the data first, as it appears to be fairly log normal, and I always use log-scale visualizations anyway. Erik Peterson, middle author on the poster, agreed that this would at least "restore (some) symmetry to the error distribution." I used a natural log transform, sort of arbitrarily to differentiate from the standard decibel transform included in FieldTrip as cfg.baselinetype = 'db'. The following figures compare the 2 distributions across several frequency bands (using power values from a wavelet spectrogram obtained from a baseline LFP recorded in rat prelimbic cortex). The lines at the top represent the mean +/- one standard deviation for each frequency band, and you can see how those descriptive stats are much more representative of the actual distributions in the log scale. [cid:image001.png at 01D255F3.787B5C10] ​​ For my analysis, I also calculated a z-score on the log transformed power to assess how my experimental data compared to the variability of the noise in a long baseline recording from before conditioning, rather than a short pre-trial baseline period, since I find that more informative than any of FieldTrip's built-in baseline types. I'm happy to share the custom functions I wrote for this if people think it would be a useful addition to FieldTrip. I can also share more about my analysis and/or a copy of the poster, if anyone wants more detail - I just didn't want to make this email too big. Mostly, I'm just hoping to start some discussion here as to how to address this. I searched the wiki, listserv archives, and bugzilla for anything related and came up with a few topics surrounding normalization and baseline correction, but only skirting this issue. It seems important, so I want to find out whether others agree with my approach or already have other ways of avoiding the problem, and whether FieldTrip's code needs to be changed or just documentation added, or what? Thanks for any insights, Teresa 271.03 / LLL17 - Neural oscillatory power is not Gaussian distributed across time Authors *L. IZHIKEVICH, E. PETERSON, B. VOYTEK; Cognitive Sci., UCSD, San Diego, CA Disclosures L. Izhikevich: None. E. Peterson: None. B. Voytek: None. Abstract Neural oscillations are important in organizing activity across the human brain in healthy cognition, while oscillatory disruptions are linked to numerous disease states. Oscillations are known to vary by frequency and amplitude across time and between different brain regions; however, this variability has never been well characterized. We examined human and animal EEG, LFP, MEG, and ECoG data from over 100 subjects to analyze the distribution of power and frequency across time, space and species. We report that between data types, subjects, frequencies, electrodes, and time, an inverse power law, or negative exponential distribution, is present in all recordings. This is contrary to, and not compatible with, the Gaussian noise assumption made in many digital signal processing techniques. The statistical assumptions underlying common algorithms for power spectral estimation, such as Welch's method, are being violated resulting in non-trivial misestimates of oscillatory power. Different statistical approaches are warranted. -- Teresa E. Madsen, PhD Research Technical Specialist: in vivo electrophysiology & data analysis Division of Behavioral Neuroscience and Psychiatric Disorders Yerkes National Primate Research Center Emory University Rainnie Lab, NSB 5233 954 Gatewood Rd. NE Atlanta, GA 30329 (770) 296-9119 braingirl at gmail.com https://www.linkedin.com/in/temadsen _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Nicholas Peatfield, PhD -- Nicholas Peatfield, PhD _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 38279 bytes Desc: image001.png URL: From J.Herring at donders.ru.nl Wed Dec 14 10:23:37 2016 From: J.Herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 14 Dec 2016 09:23:37 +0000 Subject: [FieldTrip] impact of skewed power distributions on data analysis In-Reply-To: References: Message-ID: <6F9804CE79B042468FDC7E8C86CF4CBC4E777AE0@exprd04.hosting.ru.nl> Additionally, power values are by definition non-normal as they are, well, power values (squared amplitude). The mean, therefore, indeed might not be the best measure of central tendency. From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alik Widge Sent: Tuesday, December 13, 2016 3:10 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] impact of skewed power distributions on data analysis In this, Teresa is right and we have observed this in our own EEG data -- depending on one's level of noise and number of trials/patients, the mean can be a very poor estimator of central tendency. My students are still arguing about what we really want to do with it, but at least one of them has shifted to using the median as a matter of course for baseline normalization. Alik Widge alik.widge at gmail.com (206) 866-5435 On Mon, Dec 12, 2016 at 6:45 PM, Teresa Madsen > wrote: That may very well be true; to be honest, I haven't looked that deeply into the stats offerings yet. However, my plan is to express each electrode's experimental data in terms of change from their respective baseline recordings before attempting any group averaging or statistical testing, and this problem shows up first in the baseline correction step, where FieldTrip averages raw power over time. ~Teresa On Mon, Dec 12, 2016 at 4:56 PM Nicholas A. Peatfield > wrote: Correct me if I'm wrong, but, if you are using the non-parametric statistics implemented by fieldtrip, the data does not need to be normally distributed. On 12 December 2016 at 13:39, Teresa Madsen > wrote: No, sorry, that's not what I meant, but thanks for giving me the opportunity to clarify. Of course everyone is familiar with the 1/f pattern across frequencies, but the distribution across time (and according to the poster, also across space), also has an extremely skewed, negative exponential distribution. I probably confused everyone by trying to show too much data in my figure, but each color represents the distribution of power values for a single frequency over time, using a histogram and a line above with circles at the mean +/- one standard deviation. My main point was that the mean is not representative of the central tendency of such an asymmetrical distribution of power values over time. It's even more obvious which is more representative of their actual distributions when I plot e^mean(logpower) on the raw plot and log(mean(rawpower)) on the log plot, but that made the figure even more busy and confusing. I hope that helps, Teresa On Mon, Dec 12, 2016 at 3:47 PM Nicholas A. Peatfield > wrote: Hi Teresa, I think what you are discussing is the 1/f power scaling of the power spectrum. This is one of the reasons that comparisons are made within a band (i.e. alpha to alpha) and not between bands (i.e. alpha to gamma), as such the assumption is that within bands there should be a relative change against baseline and this is what the statistics are performed on. That is, baseline correction is assumed to be the mean for a specific frequency and not a mean across frequencies. And this leads to another point that when you are selecting a frequency range to do the non-parametric statistics on you should not do 1-64 Hz but break it up based on the bands. Hope my interpretation of your point is correct. I sent in individually, as I wanted to ensure I followed your point. Cheers, Nick On 12 December 2016 at 08:23, Teresa Madsen > wrote: FieldTrippers, While analyzing my data for the annual Society for Neuroscience meeting, I developed a concern that was quickly validated by another poster (full abstract copied and linked below) focusing on the root of the problem: neural oscillatory power is not normally distributed across time, frequency, or space. The specific problem I had encountered was in baseline-correcting my experimental data, where, regardless of cfg.baselinetype, ft_freqbaseline depends on the mean power over time. However, I found that the distribution of raw power over time is so skewed that the mean was not a reasonable approximation of the central tendency of the baseline power, so it made most of my experimental data look like it had decreased power compared to baseline. The more I think about it, the more I realize that averaging is everywhere in the way we analyze neural oscillations (across time points, frequency bins, electrodes, trials, subjects, etc.), and many of the standard statistics people use also rely on assumptions of normality. The most obvious solution for me was to log transform the data first, as it appears to be fairly log normal, and I always use log-scale visualizations anyway. Erik Peterson, middle author on the poster, agreed that this would at least "restore (some) symmetry to the error distribution." I used a natural log transform, sort of arbitrarily to differentiate from the standard decibel transform included in FieldTrip as cfg.baselinetype = 'db'. The following figures compare the 2 distributions across several frequency bands (using power values from a wavelet spectrogram obtained from a baseline LFP recorded in rat prelimbic cortex). The lines at the top represent the mean +/- one standard deviation for each frequency band, and you can see how those descriptive stats are much more representative of the actual distributions in the log scale. [cid:image001.png at 01D255F4.21119FB0] ​​ For my analysis, I also calculated a z-score on the log transformed power to assess how my experimental data compared to the variability of the noise in a long baseline recording from before conditioning, rather than a short pre-trial baseline period, since I find that more informative than any of FieldTrip's built-in baseline types. I'm happy to share the custom functions I wrote for this if people think it would be a useful addition to FieldTrip. I can also share more about my analysis and/or a copy of the poster, if anyone wants more detail - I just didn't want to make this email too big. Mostly, I'm just hoping to start some discussion here as to how to address this. I searched the wiki, listserv archives, and bugzilla for anything related and came up with a few topics surrounding normalization and baseline correction, but only skirting this issue. It seems important, so I want to find out whether others agree with my approach or already have other ways of avoiding the problem, and whether FieldTrip's code needs to be changed or just documentation added, or what? Thanks for any insights, Teresa 271.03 / LLL17 - Neural oscillatory power is not Gaussian distributed across time Authors *L. IZHIKEVICH, E. PETERSON, B. VOYTEK; Cognitive Sci., UCSD, San Diego, CA Disclosures L. Izhikevich: None. E. Peterson: None. B. Voytek: None. Abstract Neural oscillations are important in organizing activity across the human brain in healthy cognition, while oscillatory disruptions are linked to numerous disease states. Oscillations are known to vary by frequency and amplitude across time and between different brain regions; however, this variability has never been well characterized. We examined human and animal EEG, LFP, MEG, and ECoG data from over 100 subjects to analyze the distribution of power and frequency across time, space and species. We report that between data types, subjects, frequencies, electrodes, and time, an inverse power law, or negative exponential distribution, is present in all recordings. This is contrary to, and not compatible with, the Gaussian noise assumption made in many digital signal processing techniques. The statistical assumptions underlying common algorithms for power spectral estimation, such as Welch's method, are being violated resulting in non-trivial misestimates of oscillatory power. Different statistical approaches are warranted. -- Teresa E. Madsen, PhD Research Technical Specialist: in vivo electrophysiology & data analysis Division of Behavioral Neuroscience and Psychiatric Disorders Yerkes National Primate Research Center Emory University Rainnie Lab, NSB 5233 954 Gatewood Rd. NE Atlanta, GA 30329 (770) 296-9119 braingirl at gmail.com https://www.linkedin.com/in/temadsen _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Nicholas Peatfield, PhD -- Nicholas Peatfield, PhD _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 38279 bytes Desc: image001.png URL: From pelli001 at umn.edu Wed Dec 14 14:44:26 2016 From: pelli001 at umn.edu (Giuseppe Pellizzer) Date: Wed, 14 Dec 2016 07:44:26 -0600 Subject: [FieldTrip] impact of skewed power distributions on data analysis Message-ID: You are definitely correct, the distribution of power is highly skewed. However, using the log-transform does a pretty decent job at 'normalizing' the distribution. A related issue is that when comparing power during a task with baseline, the ratio Task Power/Baseline Power is highly asymmetric (because it is equal to 1 when Task Power=Baseline Power, and it can only go down to 0 on one side and can go to infinity on the other). For all of those reasons, it is better to use the log-transform of the ratio of power, that is, log(Task Power/Baseline Power)=log(Task Power) - Log(Baseline Power) (when using Log10 the result can be expressed in dB by multiplying it by 10). Giuseppe Pellizzer -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.molinaro at bcbl.eu Fri Dec 16 12:26:57 2016 From: n.molinaro at bcbl.eu (Nicola Molinaro) Date: Fri, 16 Dec 2016 12:26:57 +0100 (CET) Subject: [FieldTrip] BCBL - 1 Post-doc position Message-ID: <149437307.282213.1481887617513.JavaMail.zimbra@bcbl.eu> Dear "Fieldtrip" community, I would like to advertise the following post-doc position Thanks a lot (and sorry for multiple posting) Nicola POSTDOCTORAL POSITION at the BCBL- Basque Center on Cognition Brain and Language (San Sebastián, Basque Country, Spain) www.bcbl.eu (Center of excellence Severo Ochoa) The Basque Center on Cognition Brain and Language (San Sebastián, Basque Country, Spain) offers a Postdoctoral position in Cognitive Neuroscience. The main project will focus on the oscillatory correlates of predictive processing with a special focus on neural entrainment phenomena. The successful candidate will be working within the research lines of the Proactive group whose main aim is to develop high-risk/high gain projects at the frontiers of neurocognitive science. The project is based upon a set of MEG experiments that will be designed to unveil the neural mechanism supporting predictive coding and predictive timing across sensory modalities and cognitive domains. The long-term goal is to evaluate the role that such predictive skills play for developmental disorders (such as dyslexia or SLI). The BCBL Center (recently awarded the label of excellence Severo Ochoa) promotes a vibrant research environment without substantial teaching obligations. It provides access to the most advanced behavioral and neuroimaging techniques, including 3 Tesla MRI, a whole-head MEG system, four ERP labs, a NIRS lab, a baby lab including an eyetracker, two eyetracking labs, and several well-equipped behavioral labs. There are excellent technical support staff and research personnel (PhD and postdoctoral students). The positions have a term of appointment of 2 years with a possible renewal.We are looking for cognitive neuroscientists, computational modelers, physicists or engineers with EEG/MEG expertise. Candidates should have a convincing publication track record and familiarity with computing tools (Python/Matlab). Deadline: January 31st, 2016. We encourage immediate applications as the selection process will be ongoing and the appointment may be made before the deadline. To submit your application please follow this link: http://www.bcbl.eu/calls, applying for "Postdoc MEG 2016 Proactive" and upload: 1. Your curriculum vitae. 2. A cover letter/statement describing your research interests (4000 characters maximun) 3. The names of two referees who would be willing to write letters of recommendation For information about the position, please contact Nicola Molinaro (n.molinaro at bcbl.eu). From Bastiaansen4.M at nhtv.nl Fri Dec 16 13:13:39 2016 From: Bastiaansen4.M at nhtv.nl (Bastiaansen, Marcel) Date: Fri, 16 Dec 2016 12:13:39 +0000 Subject: [FieldTrip] phase distribution Message-ID: Dear Fieldtrippers, I want to analyze data from an EEG experiment in which I split trials from one participant in two sets based on some response criterion. I want to know how (absolute) phase at a particular point in time (say t=0) is distributed within each set of trials, and whether there is (on average) a difference in absolute phase between the two sets of trials. I have found a matlab toolbox (circ_stats) that allows me to plot circular phase data, do tests on phase distributions, and to compare two distributions, but I would like to use Fieldtrip to extract the instantaneous phase angles (radians or degrees) from the single trials for a given point in time using multitapers (which I believe is the preferred method for this, right?). Browsing through the Fieldtrip discussion archive, I haven't been able to find a dedicated Fieldtrip function for that, but I am sure that functions such as ft_mtmconvol do compute absolute phase at some point... Can anyone give me advise on how to achieve my goal? Thanks, Marcel. *** Dr Marcel C.M. Bastiaansen Lecturer and researcher in quantitative research methods Academy for Leisure & Academy for Tourism NHTV Breda University of Applied Sciences Visiting adress: Room C1.011, Academy for Leisure Archimedesstraat 17, 4816 BA, Breda Phone: +31 76 533 2869 Email: bastiaansen4.m at nhtv.nl And Department of Cognitive Neuropsychology Tilburg School of Social and Behavioral Sciences Tilburg University Visiting address: Room S217, Simon building Warandelaan 2 5000 LE Tilburg Email: M.C.M.Bastiaansen at uvt.nl publications linked-in *** ----------------------------------------------------- Op deze e-mail zijn de volgende voorwaarden van toepassing : The following disclaimer applies to the e-mail message : http://www.nhtv.nl/disclaimer ----------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmontefusco at med.uchile.cl Fri Dec 16 13:51:31 2016 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Fri, 16 Dec 2016 09:51:31 -0300 Subject: [FieldTrip] phase distribution In-Reply-To: References: Message-ID: Hi Marcel, Have you tried by using the Hilbert transform present already in matlab, and extract the "angle" from it. something like x= angle(hilbert(data)); I think should work. Consider using a good filter that don't introduce any artifact to your data. If there are better suggestions, please let us know. Best Rodrigo On Fri, Dec 16, 2016 at 9:13 AM, Bastiaansen, Marcel wrote: > Dear Fieldtrippers, > > > > I want to analyze data from an EEG experiment in which I split trials from > one participant in two sets based on some response criterion. > > I want to know how (absolute) phase at a particular point in time (say > t=0) is distributed within each set of trials, and whether there is (on > average) a difference in absolute phase between the two sets of trials. > > I have found a matlab toolbox (circ_stats) that allows me to plot circular > phase data, do tests on phase distributions, and to compare two > distributions, but I would like to use Fieldtrip to extract the > instantaneous phase angles (radians or degrees) from the single trials for > a given point in time using multitapers (which I believe is the preferred > method for this, right?). > > Browsing through the Fieldtrip discussion archive, I haven’t been able to > find a dedicated Fieldtrip function for that, but I am sure that functions > such as ft_mtmconvol do compute absolute phase at some point… > > Can anyone give me advise on how to achieve my goal? > > > > Thanks, > > Marcel. > > > > > > *** > > Dr Marcel C.M. Bastiaansen > > Lecturer and researcher in quantitative research methods > > Academy for Leisure & Academy for Tourism > > NHTV Breda University of Applied Sciences > > Visiting adress: > > Room C1.011, Academy for Leisure > > Archimedesstraat 17, > > 4816 BA, Breda > > Phone: +31 76 533 2869 <+31%2076%20533%202869> > > Email: bastiaansen4.m at nhtv.nl > > > > And > > > > Department of Cognitive Neuropsychology > > Tilburg School of Social and Behavioral Sciences > > Tilburg University > > Visiting address: > > Room S217, Simon building > > Warandelaan 2 > > 5000 LE Tilburg > > Email: M.C.M.Bastiaansen at uvt.nl > > > > publications > > > linked-in > > > *** > > > ----------------------------------------------------- > Op deze e-mail zijn de volgende voorwaarden van toepassing : > The following disclaimer applies to the e-mail message : > http://www.nhtv.nl/disclaimer > ----------------------------------------------------- > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bioeng.yoosofzadeh at gmail.com Fri Dec 16 21:32:04 2016 From: bioeng.yoosofzadeh at gmail.com (Vahab Yousofzadeh) Date: Fri, 16 Dec 2016 15:32:04 -0500 Subject: [FieldTrip] Cerebellum source estimation Message-ID: Dear all, My results based on source analysis and network-based parcellation shows significant differences between two groups in cerebellar regions. I wonder how reliable these results would be given that MEG is not explicitly modelled during forward problem? Best, Vahab -------------- next part -------------- An HTML attachment was scrubbed... URL: From tomh at kurage.nimh.nih.gov Fri Dec 16 22:27:29 2016 From: tomh at kurage.nimh.nih.gov (Tom Holroyd) Date: Fri, 16 Dec 2016 16:27:29 -0500 Subject: [FieldTrip] Cerebellum source estimation In-Reply-To: References: Message-ID: <20161216162729.595c8447@kurage.nimh.nih.gov> Everything you said up to "given that" makes sense. On Fri, 16 Dec 2016 15:32:04 -0500 Vahab Yousofzadeh wrote: > Dear all, > > > My results based on source analysis and network-based parcellation shows > significant differences between two groups in cerebellar regions. I wonder > how reliable these results would be given that MEG is not > explicitly modelled during forward problem? > > > Best, > > Vahab -- Dr. Tom -- "A man of genius makes no mistakes. His errors are volitional and are the portals of discovery." -- James Joyce From susmitasen.ece at gmail.com Sat Dec 17 07:39:52 2016 From: susmitasen.ece at gmail.com (Susmita Sen) Date: Sat, 17 Dec 2016 12:09:52 +0530 Subject: [FieldTrip] Estimate of cross spectral density in a frequency band Message-ID: Dear Community, I want to estimate the cross spectra of two time-series in a particular frequency band (not at individual frequency points), at the same time I also want to keep the time information as well. So, I preferred to use wavelet time-frequency transformation. If I use the following code I get cross spectra at 21 different frequency points. However, I want to compute it in a particular frequency band. I would be very grateful if any could kindly give me suggestions how to achieve this. cfg = []; cfg.method = 'wavelet'; cfg.output = 'powandcsd'; cfg.toi = 1:0.01:2; cfg.foilim = [8 13]; cfg.keeptrials = 'yes'; freq = ft_freqanalysis(cfg,data); Thanks and Regards, Susmita Sen Research Scholar Audio and Bio Signal Processing Lab. E & ECE Dept. IIT Kharagpur -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseluisblues at gmail.com Sat Dec 17 19:27:06 2016 From: joseluisblues at gmail.com (Jose) Date: Sat, 17 Dec 2016 19:27:06 +0100 Subject: [FieldTrip] phase distribution Message-ID: > ------------------------------ > > Message: 2 > Date: Fri, 16 Dec 2016 12:13:39 +0000 > From: "Bastiaansen, Marcel" > To: "'fieldtrip at science.ru.nl'" > Subject: [FieldTrip] phase distribution > Message-ID: > > Content-Type: text/plain; charset="us-ascii" > > Dear Fieldtrippers, > > I want to analyze data from an EEG experiment in which I split trials from > one participant in two sets based on some response criterion. > I want to know how (absolute) phase at a particular point in time (say > t=0) is distributed within each set of trials, and whether there is (on > average) a difference in absolute phase between the two sets of trials. > I have found a matlab toolbox (circ_stats) that allows me to plot circular > phase data, do tests on phase distributions, and to compare two > distributions, but I would like to use Fieldtrip to extract the > instantaneous phase angles (radians or degrees) from the single trials for > a given point in time using multitapers (which I believe is the preferred > method for this, right?). > Browsing through the Fieldtrip discussion archive, I haven't been able to > find a dedicated Fieldtrip function for that, but I am sure that functions > such as ft_mtmconvol do compute absolute phase at some point... > Can anyone give me advise on how to achieve my goal? > > Thanks, > Marcel. > > > *** > Dr Marcel C.M. Bastiaansen > Lecturer and researcher in quantitative research methods > Academy for Leisure & Academy for Tourism > NHTV Breda University of Applied Sciences > Visiting adress: > Room C1.011, Academy for Leisure > Archimedesstraat 17, > 4816 BA, Breda > Phone: +31 76 533 2869 > Email: bastiaansen4.m at nhtv.nl > > And > > Department of Cognitive Neuropsychology > Tilburg School of Social and Behavioral Sciences > Tilburg University > Visiting address: > Room S217, Simon building > Warandelaan 2 > 5000 LE Tilburg > Email: M.C.M.Bastiaansen at uvt.nl > > publications view_op=list_works&gmla=AJsN-F5MJ8q_0925xM3GL1HwKMWkGTQGnfGN0Ofdsk > oTXoB9cHMSkWFYZRW6Bp8iwksfnsTgAKylZkZ6NqoYRJj6skmxruDP8Q&user=u4iWSLoAAAAJ > > > linked-in AAMAAAHu0sABfdcxLjPvTgFyfucAZvQQcwfJXi0&trk=hp-identity-name> > *** > hi Marcel, It seems you want to compute the clustering of phases across trials (a.k.a. inter-trial phase clustering, ITPC). From what I've seen in Fieldtrip there is no direct way to compute the ITPC, but it can be easily done with abs(mean(exp(1i*phaseTimeSeries))) once you have the phase time series. You can apply the function 'angle' to your analytic signal which is obtained with any of the method that Fieldtrip has to decompose your signal (see http://www.fieldtriptoolbox.org/tutorial/timefrequencyanalysis) and by setting the parameter cfg.output = 'fourier' when you call the ft_freqanalysis function (see http://www.fieldtriptoolbox.org/reference/ft_freqanalysis), >From what I know, please correct if I'm wrong, there is no preferred method to do this. Multitaper is the preferred method to analyse fast oscillations like gamma, but for ITPC any method that allow you to have phase time series is enough, Finalize for the statistical analysis, this can be done using non-parametric methods, and these functions are indeed implemented in Fieldtrip (see http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics) so there must be a way to do this, otherwise you can implement your own permutation tests in Matlab, The book (chapter 19 and 34) and web of Mike Cohen (http://mikexcohen.com/) are excellent resources to implement all these calculations, best, Jose -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sun Dec 18 12:55:20 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Sun, 18 Dec 2016 11:55:20 +0000 Subject: [FieldTrip] Fwd: ASSR and midline activity References: Message-ID: Begin forwarded message: From: Olga Sysoeva > Subject: ASSR and midline activity Date: 17 December 2016 at 23:47:38 GMT+1 To: > Recently, I've got some unexpected results from localization of Auditory Steady-State Response (ASSR) with Fieldtrip. The stimulation was monaural 40 Hz clicks train (500 ms). In addition to the clear two clusters of significant activity in left and right auditory cortex, I see big and pronounced increase in ITPC (as well as total and evoked response) along the midline structures (see Figure 1 as example of source reconstruction of grandaverage of 40Hz ITPC values (N = 30). The monaural presentation of 40Hz clicks into left ear). Can it be some artifact of the method I used for localization? That was: 1. preprocessing/artefact detection; 1. bandpass filtered form 35 to 45 Hz using Infinite Impulse Response (IIR) Butterworth two-pass filter of 4th order (forward and reverse), which results in a zero-phase shift of ERP signal; 2. Preprocessing of individual MRI/head model and so on construction; 3. Than the data were averaged for each ear separately, and covariance matrix was calculated based on the whole epoch; 4. The output of this stage analysis was used for calculation the beamformer filter transformation from sensor to the source level. In particular I used Linearly Constrained Minimum Variance (LCMV). 5. ITPC (as well as Evoked and total power) was calculate at each vxl. a) we performed frequency decomposition using wavelet method based on Morlet wavelets for the frequency of 40 Hz for 200-500 ms post click onset. As the output we used complex Fourier spectra to be able to extract the ITPC information. b) For each voxel the total power was calculated as mean of absolute value, and ITPC as sum of absolute value divided by the averaging, which takes into account the phase difference. 6. Statistical analysis with permutation test : activity vs baseline (midline cluster is also highly significant). I am also attaching my script for details. My doubts about the "reality" of this midline cluster came from observation of the sensor level individual response (see picture from Neuromag). By the way, here in Moscow MEG Center we use Elekta 306-channel “ Vectorview” , Neuromag System. Best Regards, Olga. [cid:bd30cea7-e4ba-408f-87b1-b2572bfcf6f2 at hosting.ru.nl] [cid:b69d17a4-a840-4dc7-a6d9-169109675a72 at hosting.ru.nl] [cid:78ec9aa9-0996-42cf-a311-7d9acdd4c3b8 at hosting.ru.nl] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: EvokedDiffBL.png Type: image/png Size: 15582 bytes Desc: EvokedDiffBL.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ITPC_ASSR40hz.png Type: image/png Size: 17042 bytes Desc: ITPC_ASSR40hz.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Neuromag_40ASSRgrandave_LE.png Type: image/png Size: 226315 bytes Desc: Neuromag_40ASSRgrandave_LE.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pipeline_ITC_allgrid_template20042016_TD_LE_addAug2016.m Type: application/octet-stream Size: 8832 bytes Desc: pipeline_ITC_allgrid_template20042016_TD_LE_addAug2016.m URL: From jorn at artinis.com Mon Dec 19 09:35:48 2016 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 19 Dec 2016 09:35:48 +0100 Subject: [FieldTrip] ARTscientific 2017 - NIRS symposium Message-ID: <009a01d259d2$e6b15030$b413f090$@artinis.com> Dear all, In May 2017, we are organizing a NIRS symposium, to which we would like to cordially invite everyone who is interested in NIRS (with only few spaces left). We will create an open platform for both experienced and novice researchers to share experiences, discuss NIRS and enjoy hands-on workshops. We are delighted with our key note speakers, Prof. Scherder, Dr. van Wanrooij, Prof. Perrey and Prof. Cooper, who will provide valuable insight into NIRS and brain and muscle research. We are excited to share the program of our symposium ARTscientific with you (see http://www.artinis.com/symposium2017)! You can expect three days full of NIRS talks, workshops and wining and dining in a beautiful environment on the country side of the Netherlands. We carefully selected some very interesting topics for our hands-on NIRS workshops. Several topics will be discussed, including but not limited to correcting for confounding factors, explanation of TSI/TOI, an overview of different analysis software packages, multimodal measurements and much more! We encourage you to submit your abstract(s) for poster and/or oral presentation to symposium at artinis.com . There is an early bird discount until January 4th. Registration costs include accommodation, breakfast, lunch and dinner. Should you have any questions, please feel free to also contact me directly. It would be great seeing some of you there! With best regards, Jörn -- Jörn M. Horschig, PhD Software Engineer & Project Leader NeuroGuard XS A Einsteinweg 17 6662PW Elst The Netherlands T +31 481 350 980 F +31 84 210 5702 I www.artinis.com The information in this e-mail is confidential and intended solely for the person to whom it is addressed. If this message is not addressed to you, please be aware that you have no authorization to read this e-mail, to copy it, to furnish it to any person other than the addressee, or to use or misuse its content in any way whatsoever. Should you have received this e-mail by mistake, please bring this to the attention of the sender, after which you are kindly requested to destroy the original message. Sign up for our NIRS newsletter Or meet us at: May 11-13, 2017 –ArtScientific 2017, 1st Artinis symposium, The Netherlands. Register here -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 9919 bytes Desc: not available URL: From recasensmarc at gmail.com Mon Dec 19 13:29:35 2016 From: recasensmarc at gmail.com (Marc Recasens) Date: Mon, 19 Dec 2016 12:29:35 +0000 Subject: [FieldTrip] Fwd: ASSR and midline activity In-Reply-To: References: Message-ID: Hi Olga I haven't looked at your code in detail. Just wondering whether you have considered the possibility to be picking up genuine ASSR source activity in frontal areas? Additional ASSR generators outside auditory cortices have been described previously using both MEG (https://www.ncbi.nlm.nih.gov/pubmed/15925187) and PET (https://www.ncbi.nlm.nih.gov/pubmed/15276678). It wouldn't be surprising that beamformer is showing sources not apparent at sensor-level. On the other hand, beamformer results might show a bias towards the center of the brain unless normalized leadfields or pseudo-t/z are used (but just by looking at your plots this doesn't seem to be the case, sources seem to fall nicely over auditory cortices). Beamformer output can be also affected by highly correlated sources, but since you've used monoaural stimulation that shouldn't be a great deal here. It may be worth trying a different source estimation method and compare the results. Best wishes Marc On Sun, Dec 18, 2016 at 11:55 AM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > > > Begin forwarded message: > > *From: *Olga Sysoeva > *Subject: **ASSR and midline activity* > *Date: *17 December 2016 at 23:47:38 GMT+1 > *To: * > > Recently, I've got some unexpected results from localization of Auditory > Steady-State Response (ASSR) with Fieldtrip. The stimulation was monaural > 40 Hz clicks train (500 ms). In addition to the clear two clusters of > significant activity in left and right auditory cortex, I see big and > pronounced increase in ITPC (as well as total and evoked response) along > the midline structures (see Figure 1 as example of source reconstruction of > grandaverage of 40Hz ITPC values (N = 30). The monaural presentation of > 40Hz clicks into left ear). Can it be some artifact of the method I used > for localization? That was: > > 1. preprocessing/artefact detection; > > 1. > > bandpass filtered form 35 to 45 Hz using Infinite Impulse Response > (IIR) Butterworth two-pass filter of 4th order (forward and reverse), > which results in a zero-phase shift of ERP signal; > 2. > > Preprocessing of individual MRI/head model and so on construction; > 3. > > Than the data were averaged for each ear separately, and covariance > matrix was calculated based on the whole epoch; > 4. > > *The output of this stage analysis was used for calculation the > beamformer filter transformation from sensor to the source level. In > particular I used Linearly Constrained Minimum Variance (LCMV).* > 5. > > ITPC (as well as Evoked and total power) was calculate at each vxl. > > a) we performed frequency decomposition using wavelet method based on > Morlet wavelets for the frequency of 40 Hz for 200-500 ms post click onset. > As the output we used complex Fourier spectra to be able to extract the > ITPC information. > > b) For each voxel the total power was calculated as mean of absolute > value, and ITPC as sum of absolute value divided by the averaging, which > takes into account the phase difference. > 6. Statistical analysis with permutation test : activity vs baseline > (midline cluster is also highly significant). > > I am also attaching my script for details. > > My doubts about the "reality" of this midline cluster came from > observation of the sensor level individual response (see picture from > Neuromag). By the way, here in Moscow MEG Center we use Elekta 306-channel > *“* Vectorview*”* , Neuromag System. > > Best Regards, > > Olga. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Marc Recasens Tel.: +44 7845810006 Tel.: +34 639241598 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ITPC_ASSR40hz.png Type: image/png Size: 17042 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: EvokedDiffBL.png Type: image/png Size: 15582 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Neuromag_40ASSRgrandave_LE.png Type: image/png Size: 226315 bytes Desc: not available URL: From Nicholas.R.Murphy at uth.tmc.edu Mon Dec 19 20:15:46 2016 From: Nicholas.R.Murphy at uth.tmc.edu (Murphy, Nicholas R) Date: Mon, 19 Dec 2016 19:15:46 +0000 Subject: [FieldTrip] Problem Loading .fif Data Files Message-ID: Dear all, My name is Nik Murphy and I work in the department of psychiatry at UTHealth Houston. I'm currently experiencing some problems with the design of my MEG pipeline which seem to stem back to how the data is loaded. When I run the read header and data commands Fieldtrip begins the reading at an (I'm guessing) arbitrary point in the data. I have a total of 452,999 samples (1000hz sampling rate) per run and a total of 54 trials. When I load the data using brainstorm the total number of samples and events identified is correct, however, when I load the data using fieldtrip I consistently lose up to 100,000 samples from the beginning of my data. My pipeline currently looks like this hdr = ft_read_header(file); data = ft_read_data(file); events = ft_read_events(file); cfg = []; cfg.dataset = file; cfg.channel = 'meg'; cfg.padding = 0; cfg.padtype = 'data'; cfg.bpfilter = 'yes'; cfg.bpfreq = [0.1 100]; cfg.bsfilter = 'yes'; cfg.bsfreq = [59 61]; cfg.event = events; cfg.trialdef.eventtype = 'STI101'; cfg.trialdef.prestim = .5; cfg.trialdef.poststim= 6; cfg.baselinewindow = [-.2 0]; cfg.demean = 'yes'; cfg = ft_defintetrial(cfg); [data_new] = ft_preprocessing(cfg); Any help with this would be greatly appreciated. Many thanks Regards Nik ------------------ Dr Nicholas Murphy MSc BSc(HONS) Nicholas.R.Murphy at uth.tmc.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From tmadsen at emory.edu Mon Dec 19 22:08:40 2016 From: tmadsen at emory.edu (Teresa Madsen) Date: Mon, 19 Dec 2016 16:08:40 -0500 Subject: [FieldTrip] impact of skewed power distributions on data analysis In-Reply-To: <6F9804CE79B042468FDC7E8C86CF4CBC4E777ACF@exprd04.hosting.ru.nl> References: <6F9804CE79B042468FDC7E8C86CF4CBC4E777ACF@exprd04.hosting.ru.nl> Message-ID: I appreciate everyone's feedback, but I still wonder if something is being missed. I understand that the non-normally distributed power values may be less of an issue when performing non-parametric stats or even a paired-samples t-test that looks at difference values which may be normal even when the raw data isn't. However, my concern comes into play even before these statistical comparisons are made, whenever any averaging is done to freq-type data across times, frequencies, trials, electrodes, subjects, etc. That means any time any of these configuration options are used for any of these functions, and probably more: ft_freqanalysis: cfg.keeptrials or cfg.keeptapers = 'no'; ft_freqgrandaverage: cfg.keepindividual = 'no'; ft_freqstatistics: cfg.avgoverchan, cfg.avgovertime, or cfg.avgoverfreq = 'yes'; ft_freqbaseline: cfg.baseline = anything but 'no' In each case, if raw power values are averaged, the result will be positively skewed. Maybe it's not a huge problem if all of the data is treated identically, but the specific case that triggered my concern was in ft_freqbaseline, where the individual time-frequency bins are compared to the mean over time for the baseline period. For example, when using cfg.baselinetype = 'db', as Giuseppe Pellizzer suggested, the output freq data does indeed have a more normal distribution over time, but the mean over the baseline time period is performed *before* the log transform, when the distribution is still highly skewed: meanVals = repmat(nanmean(data(:,:,baselineTimes), 3), [1 1 size(data, 3)]); data = 10*log10(data ./ meanVals); That's what I had originally done when analyzing data for my SfN poster, when I realized the background noise that shouldn't have changed much from baseline was mostly showing a decrease from baseline of about -3dB. Now, I've realized I'm seeing this as more of a problem than others because of another tweak I made, which was to use a long, separate baseline recording to normalize my trial data, rather than a short pre-trial period as ft_freqbaseline is designed to do. Averaging a few hundred milliseconds for a baseline power estimate might be okay because overlapping time points in the original data are used to calculate those power values anyway, probably making them less skewed, but also (it seems to me) more arbitrary and prone to error. I already offered my custom function BLnorm.m to one person who was asking about this issue of normalizing to a separate baseline recording, and I would be happy to contribute it to FieldTrip if others would appreciate it. Since a few people suggested using the median, and it is also suggested in Cohen's textbook as an alternative measure of the central tendency for skewed raw power values, I wonder if the simplest fix might be to add an option to select mean or median in each of the functions listed above. Another possibility would be adding an option to transform the power values upon output from ft_freqanalysis. Would anyone else find such changes useful? Thanks, Teresa On Wed, Dec 14, 2016 at 4:22 AM, Herring, J.D. (Jim) < J.Herring at donders.ru.nl> wrote: > In terms of statistics it is the distribution of values that you do the > statistics on that matters. In case of a paired-samples t-test when > comparing two conditions, it is the distribution of difference values that > has to be normally distributed. The distribution of difference values is > often normal given two similarly non-normal distributions, offering no > complications for a regular parametric test. > > > > The non-parametric tests offered in fieldtrip indeed do not assume > normality, so you should have no problem there either. > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces@ > science.ru.nl] *On Behalf Of *Alik Widge > *Sent:* Tuesday, December 13, 2016 3:10 PM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] impact of skewed power distributions on data > analysis > > > > In this, Teresa is right and we have observed this in our own EEG data -- > depending on one's level of noise and number of trials/patients, the mean > can be a very poor estimator of central tendency. My students are still > arguing about what we really want to do with it, but at least one of them > has shifted to using the median as a matter of course for baseline > normalization. > > > Alik Widge > alik.widge at gmail.com > (206) 866-5435 > > > > On Mon, Dec 12, 2016 at 6:45 PM, Teresa Madsen wrote: > > That may very well be true; to be honest, I haven't looked that deeply > into the stats offerings yet. However, my plan is to express each > electrode's experimental data in terms of change from their respective > baseline recordings before attempting any group averaging or statistical > testing, and this problem shows up first in the baseline correction step, > where FieldTrip averages raw power over time. > > ~Teresa > > > > On Mon, Dec 12, 2016 at 4:56 PM Nicholas A. Peatfield < > nick.peatfield at gmail.com> wrote: > > Correct me if I'm wrong, but, if you are using the non-parametric > statistics implemented by fieldtrip, the data does not need to be normally > distributed. > > > > On 12 December 2016 at 13:39, Teresa Madsen wrote: > > No, sorry, that's not what I meant, but thanks for giving me the > opportunity to clarify. Of course everyone is familiar with the 1/f pattern > across frequencies, but the distribution across time (and according to the > poster, also across space), also has an extremely skewed, negative > exponential distribution. I probably confused everyone by trying to show > too much data in my figure, but each color represents the distribution of > power values for a single frequency over time, using a histogram and a line > above with circles at the mean +/- one standard deviation. > > My main point was that the mean is not representative of the central > tendency of such an asymmetrical distribution of power values over time. > It's even more obvious which is more representative of their actual > distributions when I plot e^mean(logpower) on the raw plot and > log(mean(rawpower)) on the log plot, but that made the figure even more > busy and confusing. > > I hope that helps, > Teresa > > > > On Mon, Dec 12, 2016 at 3:47 PM Nicholas A. Peatfield < > nick.peatfield at gmail.com> wrote: > > Hi Teresa, > > > > I think what you are discussing is the 1/f power scaling of the power > spectrum. This is one of the reasons that comparisons are made within > a band (i.e. alpha to alpha) and not between bands (i.e. alpha to gamma), > as such the assumption is that within bands there should be a relative > change against baseline and this is what the statistics are performed on. > That is, baseline correction is assumed to be the mean for a specific > frequency and not a mean across frequencies. > > > > And this leads to another point that when you are selecting a frequency > range to do the non-parametric statistics on you should not do 1-64 Hz but > break it up based on the bands. > > > > Hope my interpretation of your point is correct. I sent in individually, > as I wanted to ensure I followed your point. > > > > Cheers, > > > > Nick > > > > > > On 12 December 2016 at 08:23, Teresa Madsen wrote: > > FieldTrippers, > > > > While analyzing my data for the annual Society for Neuroscience meeting, I > developed a concern that was quickly validated by another poster (full > abstract copied and linked below) focusing on the root of the problem: > neural oscillatory power is not normally distributed across time, > frequency, or space. The specific problem I had encountered was in > baseline-correcting my experimental data, where, regardless of > cfg.baselinetype, ft_freqbaseline depends on the mean power over time. > However, I found that the distribution of raw power over time is so skewed > that the mean was not a reasonable approximation of the central tendency of > the baseline power, so it made most of my experimental data look like it > had decreased power compared to baseline. The more I think about it, the > more I realize that averaging is everywhere in the way we analyze neural > oscillations (across time points, frequency bins, electrodes, trials, > subjects, etc.), and many of the standard statistics people use also rely > on assumptions of normality. > > > > The most obvious solution for me was to log transform the data first, as > it appears to be fairly log normal, and I always use log-scale > visualizations anyway. Erik Peterson, middle author on the poster, agreed > that this would at least "restore (some) symmetry to the error > distribution." I used a natural log transform, sort of arbitrarily to > differentiate from the standard decibel transform included in FieldTrip as > cfg.baselinetype = 'db'. The following figures compare the 2 distributions > across several frequency bands (using power values from a wavelet > spectrogram obtained from a baseline LFP recorded in rat prelimbic > cortex). The lines at the top represent the mean +/- one standard > deviation for each frequency band, and you can see how those descriptive > stats are much more representative of the actual distributions in the log > scale. > > > > > ​​ > > For my analysis, I also calculated a z-score on the log transformed power > to assess how my experimental data compared to the variability of the noise > in a long baseline recording from before conditioning, rather than a short > pre-trial baseline period, since I find that more informative than any of > FieldTrip's built-in baseline types. I'm happy to share the custom > functions I wrote for this if people think it would be a useful addition to > FieldTrip. I can also share more about my analysis and/or a copy of the > poster, if anyone wants more detail - I just didn't want to make this email > too big. > > > > Mostly, I'm just hoping to start some discussion here as to how to address > this. I searched the wiki > , listserv > > archives > , > and bugzilla for > anything related and came up with a few topics surrounding normalization > and baseline correction, but only skirting this issue. It seems important, > so I want to find out whether others agree with my approach or already have > other ways of avoiding the problem, and whether FieldTrip's code needs to > be changed or just documentation added, or what? > > > > Thanks for any insights, > > Teresa > > > > > 271.03 / LLL17 - Neural oscillatory power is not Gaussian distributed > across time > > > *Authors* > > **L. IZHIKEVICH*, E. PETERSON, B. VOYTEK; > Cognitive Sci., UCSD, San Diego, CA > > *Disclosures* > > *L. Izhikevich:* None. *E. Peterson:* None. *B. Voytek:* None. > > *Abstract* > > Neural oscillations are important in organizing activity across the human > brain in healthy cognition, while oscillatory disruptions are linked to > numerous disease states. Oscillations are known to vary by frequency and > amplitude across time and between different brain regions; however, this > variability has never been well characterized. We examined human and animal > EEG, LFP, MEG, and ECoG data from over 100 subjects to analyze the > distribution of power and frequency across time, space and species. We > report that between data types, subjects, frequencies, electrodes, and > time, an inverse power law, or negative exponential distribution, is > present in all recordings. This is contrary to, and not compatible with, > the Gaussian noise assumption made in many digital signal processing > techniques. The statistical assumptions underlying common algorithms for > power spectral estimation, such as Welch's method, are being violated > resulting in non-trivial misestimates of oscillatory power. Different > statistical approaches are warranted. > > > > -- > > Teresa E. Madsen, PhD > Research Technical Specialist: *in vivo *electrophysiology & data > analysis > > Division of Behavioral Neuroscience and Psychiatric Disorders > Yerkes National Primate Research Center > > Emory University > > Rainnie Lab, NSB 5233 > 954 Gatewood Rd. NE > Atlanta, GA 30329 > > (770) 296-9119 > > braingirl at gmail.com > > https://www.linkedin.com/in/temadsen > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > -- > > Nicholas Peatfield, PhD > > > > > > > > -- > > Nicholas Peatfield, PhD > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Teresa E. Madsen, PhD Division of Behavioral Neuroscience and Psychiatric Disorders Yerkes National Primate Research Center Emory University Rainnie Lab, NSB 5233 954 Gatewood Rd. NE Atlanta, GA 30329 (770) 296-9119 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 38279 bytes Desc: not available URL: From olga.v.sysoeva at gmail.com Mon Dec 19 22:44:31 2016 From: olga.v.sysoeva at gmail.com (Olga Sysoeva) Date: Tue, 20 Dec 2016 00:44:31 +0300 Subject: [FieldTrip] Fwd: ASSR and midline activity In-Reply-To: References: Message-ID: Thank you, Marc! That was exactly my point - how to differentiate "genuine" ASSR source from "artificial"... What other localization method is worth to try? As for sensor-level data - as you can see in the magnetic field distribution - the "frontal/midline" cluster might be the results of the "meeting" of two magnetic field produced by dipoles in the auditory cortex... Best Regards, Olga. On Mon, Dec 19, 2016 at 3:29 PM, Marc Recasens wrote: > Hi Olga > > I haven't looked at your code in detail. Just wondering whether you have > considered the possibility to be picking up genuine ASSR source activity in > frontal areas? > Additional ASSR generators outside auditory cortices have been described > previously using both MEG (https://www.ncbi.nlm.nih.gov/pubmed/15925187) > and PET (https://www.ncbi.nlm.nih.gov/pubmed/15276678). > It wouldn't be surprising that beamformer is showing sources not apparent > at sensor-level. > > On the other hand, beamformer results might show a bias towards the center > of the brain unless normalized leadfields or pseudo-t/z are used (but just > by looking at your plots this doesn't seem to be the case, sources seem to > fall nicely over auditory cortices). > Beamformer output can be also affected by highly correlated sources, but > since you've used monoaural stimulation that shouldn't be a great deal here. > It may be worth trying a different source estimation method and compare > the results. > > Best wishes > Marc > > On Sun, Dec 18, 2016 at 11:55 AM, Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl> wrote: > >> >> >> Begin forwarded message: >> >> *From: *Olga Sysoeva >> *Subject: **ASSR and midline activity* >> *Date: *17 December 2016 at 23:47:38 GMT+1 >> *To: * >> >> Recently, I've got some unexpected results from localization of Auditory >> Steady-State Response (ASSR) with Fieldtrip. The stimulation was monaural >> 40 Hz clicks train (500 ms). In addition to the clear two clusters of >> significant activity in left and right auditory cortex, I see big and >> pronounced increase in ITPC (as well as total and evoked response) along >> the midline structures (see Figure 1 as example of source reconstruction of >> grandaverage of 40Hz ITPC values (N = 30). The monaural presentation of >> 40Hz clicks into left ear). Can it be some artifact of the method I used >> for localization? That was: >> >> 1. preprocessing/artefact detection; >> >> 1. >> >> bandpass filtered form 35 to 45 Hz using Infinite Impulse Response >> (IIR) Butterworth two-pass filter of 4th order (forward and reverse), >> which results in a zero-phase shift of ERP signal; >> 2. >> >> Preprocessing of individual MRI/head model and so on construction; >> 3. >> >> Than the data were averaged for each ear separately, and covariance >> matrix was calculated based on the whole epoch; >> 4. >> >> *The output of this stage analysis was used for calculation the >> beamformer filter transformation from sensor to the source level. In >> particular I used Linearly Constrained Minimum Variance (LCMV).* >> 5. >> >> ITPC (as well as Evoked and total power) was calculate at each vxl. >> >> a) we performed frequency decomposition using wavelet method based on >> Morlet wavelets for the frequency of 40 Hz for 200-500 ms post click onset. >> As the output we used complex Fourier spectra to be able to extract the >> ITPC information. >> >> b) For each voxel the total power was calculated as mean of absolute >> value, and ITPC as sum of absolute value divided by the averaging, which >> takes into account the phase difference. >> 6. Statistical analysis with permutation test : activity vs baseline >> (midline cluster is also highly significant). >> >> I am also attaching my script for details. >> >> My doubts about the "reality" of this midline cluster came from >> observation of the sensor level individual response (see picture from >> Neuromag). By the way, here in Moscow MEG Center we use Elekta 306-channel >> *“* Vectorview*”* , Neuromag System. >> >> Best Regards, >> >> Olga. >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Marc Recasens > > Tel.: +44 7845810006 <+44%207845%20810006> > Tel.: +34 639241598 <+34%20639%2024%2015%2098> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Neuromag_40ASSRgrandave_LE.png Type: image/png Size: 226315 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ITPC_ASSR40hz.png Type: image/png Size: 17042 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: EvokedDiffBL.png Type: image/png Size: 15582 bytes Desc: not available URL: From nick.peatfield at gmail.com Mon Dec 19 23:07:07 2016 From: nick.peatfield at gmail.com (Nicholas A. Peatfield) Date: Mon, 19 Dec 2016 14:07:07 -0800 Subject: [FieldTrip] impact of skewed power distributions on data analysis In-Reply-To: References: <6F9804CE79B042468FDC7E8C86CF4CBC4E777ACF@exprd04.hosting.ru.nl> Message-ID: I think this paper is relevant to this discussion. Grandchamp, R., & Delorme, A. (2011). Single-Trial Normalization for Event-Related Spectral Decomposition Reduces Sensitivity to Noisy Trials. *Frontiers in Psychology*, *2*, 236. http://doi.org/10.3389/fpsyg.2011.00236 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3183439/ On 19 December 2016 at 13:08, Teresa Madsen wrote: > I appreciate everyone's feedback, but I still wonder if something is being > missed. I understand that the non-normally distributed power values may be > less of an issue when performing non-parametric stats or even a > paired-samples t-test that looks at difference values which may be normal > even when the raw data isn't. However, my concern comes into play even > before these statistical comparisons are made, whenever any averaging is > done to freq-type data across times, frequencies, trials, electrodes, > subjects, etc. That means any time any of these configuration options are > used for any of these functions, and probably more: > > ft_freqanalysis: cfg.keeptrials or cfg.keeptapers = 'no'; > ft_freqgrandaverage: cfg.keepindividual = 'no'; > ft_freqstatistics: cfg.avgoverchan, cfg.avgovertime, or > cfg.avgoverfreq = 'yes'; > ft_freqbaseline: cfg.baseline = anything but 'no' > > In each case, if raw power values are averaged, the result will be > positively skewed. Maybe it's not a huge problem if all of the data is > treated identically, but the specific case that triggered my concern was in > ft_freqbaseline, where the individual time-frequency bins are compared to > the mean over time for the baseline period. For example, when using > cfg.baselinetype = 'db', as Giuseppe Pellizzer suggested, the output freq > data does indeed have a more normal distribution over time, but the mean > over the baseline time period is performed *before* the log transform, when > the distribution is still highly skewed: > > meanVals = repmat(nanmean(data(:,:,baselineTimes), 3), [1 1 size(data, > 3)]); > data = 10*log10(data ./ meanVals); > > That's what I had originally done when analyzing data for my SfN poster, > when I realized the background noise that shouldn't have changed much from > baseline was mostly showing a decrease from baseline of about -3dB. > > Now, I've realized I'm seeing this as more of a problem than others > because of another tweak I made, which was to use a long, separate baseline > recording to normalize my trial data, rather than a short pre-trial period > as ft_freqbaseline is designed to do. Averaging a few hundred milliseconds > for a baseline power estimate might be okay because overlapping time points > in the original data are used to calculate those power values anyway, > probably making them less skewed, but also (it seems to me) more arbitrary > and prone to error. I already offered my custom function BLnorm.m to one > person who was asking about this issue of normalizing to a separate > baseline recording, and I would be happy to contribute it to FieldTrip if > others would appreciate it. > > Since a few people suggested using the median, and it is also suggested in Cohen's > textbook > as an > alternative measure of the central tendency for skewed raw power values, I > wonder if the simplest fix might be to add an option to select mean or > median in each of the functions listed above. Another possibility would be > adding an option to transform the power values upon output from > ft_freqanalysis. > > Would anyone else find such changes useful? > > Thanks, > Teresa > > > On Wed, Dec 14, 2016 at 4:22 AM, Herring, J.D. (Jim) < > J.Herring at donders.ru.nl> wrote: > >> In terms of statistics it is the distribution of values that you do the >> statistics on that matters. In case of a paired-samples t-test when >> comparing two conditions, it is the distribution of difference values that >> has to be normally distributed. The distribution of difference values is >> often normal given two similarly non-normal distributions, offering no >> complications for a regular parametric test. >> >> >> >> The non-parametric tests offered in fieldtrip indeed do not assume >> normality, so you should have no problem there either. >> >> >> >> >> >> *From:* fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at scie >> nce.ru.nl] *On Behalf Of *Alik Widge >> *Sent:* Tuesday, December 13, 2016 3:10 PM >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] impact of skewed power distributions on data >> analysis >> >> >> >> In this, Teresa is right and we have observed this in our own EEG data -- >> depending on one's level of noise and number of trials/patients, the mean >> can be a very poor estimator of central tendency. My students are still >> arguing about what we really want to do with it, but at least one of them >> has shifted to using the median as a matter of course for baseline >> normalization. >> >> >> Alik Widge >> alik.widge at gmail.com >> (206) 866-5435 >> >> >> >> On Mon, Dec 12, 2016 at 6:45 PM, Teresa Madsen wrote: >> >> That may very well be true; to be honest, I haven't looked that deeply >> into the stats offerings yet. However, my plan is to express each >> electrode's experimental data in terms of change from their respective >> baseline recordings before attempting any group averaging or statistical >> testing, and this problem shows up first in the baseline correction step, >> where FieldTrip averages raw power over time. >> >> ~Teresa >> >> >> >> On Mon, Dec 12, 2016 at 4:56 PM Nicholas A. Peatfield < >> nick.peatfield at gmail.com> wrote: >> >> Correct me if I'm wrong, but, if you are using the non-parametric >> statistics implemented by fieldtrip, the data does not need to be normally >> distributed. >> >> >> >> On 12 December 2016 at 13:39, Teresa Madsen wrote: >> >> No, sorry, that's not what I meant, but thanks for giving me the >> opportunity to clarify. Of course everyone is familiar with the 1/f pattern >> across frequencies, but the distribution across time (and according to the >> poster, also across space), also has an extremely skewed, negative >> exponential distribution. I probably confused everyone by trying to show >> too much data in my figure, but each color represents the distribution of >> power values for a single frequency over time, using a histogram and a line >> above with circles at the mean +/- one standard deviation. >> >> My main point was that the mean is not representative of the central >> tendency of such an asymmetrical distribution of power values over time. >> It's even more obvious which is more representative of their actual >> distributions when I plot e^mean(logpower) on the raw plot and >> log(mean(rawpower)) on the log plot, but that made the figure even more >> busy and confusing. >> >> I hope that helps, >> Teresa >> >> >> >> On Mon, Dec 12, 2016 at 3:47 PM Nicholas A. Peatfield < >> nick.peatfield at gmail.com> wrote: >> >> Hi Teresa, >> >> >> >> I think what you are discussing is the 1/f power scaling of the power >> spectrum. This is one of the reasons that comparisons are made within >> a band (i.e. alpha to alpha) and not between bands (i.e. alpha to gamma), >> as such the assumption is that within bands there should be a relative >> change against baseline and this is what the statistics are performed on. >> That is, baseline correction is assumed to be the mean for a specific >> frequency and not a mean across frequencies. >> >> >> >> And this leads to another point that when you are selecting a frequency >> range to do the non-parametric statistics on you should not do 1-64 Hz but >> break it up based on the bands. >> >> >> >> Hope my interpretation of your point is correct. I sent in individually, >> as I wanted to ensure I followed your point. >> >> >> >> Cheers, >> >> >> >> Nick >> >> >> >> >> >> On 12 December 2016 at 08:23, Teresa Madsen wrote: >> >> FieldTrippers, >> >> >> >> While analyzing my data for the annual Society for Neuroscience meeting, >> I developed a concern that was quickly validated by another poster (full >> abstract copied and linked below) focusing on the root of the problem: >> neural oscillatory power is not normally distributed across time, >> frequency, or space. The specific problem I had encountered was in >> baseline-correcting my experimental data, where, regardless of >> cfg.baselinetype, ft_freqbaseline depends on the mean power over time. >> However, I found that the distribution of raw power over time is so skewed >> that the mean was not a reasonable approximation of the central tendency of >> the baseline power, so it made most of my experimental data look like it >> had decreased power compared to baseline. The more I think about it, the >> more I realize that averaging is everywhere in the way we analyze neural >> oscillations (across time points, frequency bins, electrodes, trials, >> subjects, etc.), and many of the standard statistics people use also rely >> on assumptions of normality. >> >> >> >> The most obvious solution for me was to log transform the data first, as >> it appears to be fairly log normal, and I always use log-scale >> visualizations anyway. Erik Peterson, middle author on the poster, agreed >> that this would at least "restore (some) symmetry to the error >> distribution." I used a natural log transform, sort of arbitrarily to >> differentiate from the standard decibel transform included in FieldTrip as >> cfg.baselinetype = 'db'. The following figures compare the 2 distributions >> across several frequency bands (using power values from a wavelet >> spectrogram obtained from a baseline LFP recorded in rat prelimbic >> cortex). The lines at the top represent the mean +/- one standard >> deviation for each frequency band, and you can see how those descriptive >> stats are much more representative of the actual distributions in the log >> scale. >> >> >> >> >> ​​ >> >> For my analysis, I also calculated a z-score on the log transformed power >> to assess how my experimental data compared to the variability of the noise >> in a long baseline recording from before conditioning, rather than a short >> pre-trial baseline period, since I find that more informative than any of >> FieldTrip's built-in baseline types. I'm happy to share the custom >> functions I wrote for this if people think it would be a useful addition to >> FieldTrip. I can also share more about my analysis and/or a copy of the >> poster, if anyone wants more detail - I just didn't want to make this email >> too big. >> >> >> >> Mostly, I'm just hoping to start some discussion here as to how to >> address this. I searched the wiki >> , listserv >> >> archives >> , >> and bugzilla for >> anything related and came up with a few topics surrounding normalization >> and baseline correction, but only skirting this issue. It seems important, >> so I want to find out whether others agree with my approach or already have >> other ways of avoiding the problem, and whether FieldTrip's code needs to >> be changed or just documentation added, or what? >> >> >> >> Thanks for any insights, >> >> Teresa >> >> >> >> >> 271.03 / LLL17 - Neural oscillatory power is not Gaussian distributed >> across time >> >> >> *Authors* >> >> **L. IZHIKEVICH*, E. PETERSON, B. VOYTEK; >> Cognitive Sci., UCSD, San Diego, CA >> >> *Disclosures* >> >> *L. Izhikevich:* None. *E. Peterson:* None. *B. Voytek:* None. >> >> *Abstract* >> >> Neural oscillations are important in organizing activity across the human >> brain in healthy cognition, while oscillatory disruptions are linked to >> numerous disease states. Oscillations are known to vary by frequency and >> amplitude across time and between different brain regions; however, this >> variability has never been well characterized. We examined human and animal >> EEG, LFP, MEG, and ECoG data from over 100 subjects to analyze the >> distribution of power and frequency across time, space and species. We >> report that between data types, subjects, frequencies, electrodes, and >> time, an inverse power law, or negative exponential distribution, is >> present in all recordings. This is contrary to, and not compatible with, >> the Gaussian noise assumption made in many digital signal processing >> techniques. The statistical assumptions underlying common algorithms for >> power spectral estimation, such as Welch's method, are being violated >> resulting in non-trivial misestimates of oscillatory power. Different >> statistical approaches are warranted. >> >> >> >> -- >> >> Teresa E. Madsen, PhD >> Research Technical Specialist: *in vivo *electrophysiology & data >> analysis >> >> Division of Behavioral Neuroscience and Psychiatric Disorders >> Yerkes National Primate Research Center >> >> Emory University >> >> Rainnie Lab, NSB 5233 >> 954 Gatewood Rd. NE >> Atlanta, GA 30329 >> >> (770) 296-9119 >> >> braingirl at gmail.com >> >> https://www.linkedin.com/in/temadsen >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> >> -- >> >> Nicholas Peatfield, PhD >> >> >> >> >> >> >> >> -- >> >> Nicholas Peatfield, PhD >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Teresa E. Madsen, PhD > Division of Behavioral Neuroscience and Psychiatric Disorders > Yerkes National Primate Research Center > Emory University > Rainnie Lab, NSB 5233 > 954 Gatewood Rd. NE > Atlanta, GA 30329 > (770) 296-9119 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Nicholas Peatfield, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 38279 bytes Desc: not available URL: From alik.widge at gmail.com Tue Dec 20 02:01:11 2016 From: alik.widge at gmail.com (Alik Widge) Date: Mon, 19 Dec 2016 20:01:11 -0500 Subject: [FieldTrip] impact of skewed power distributions on data analysis In-Reply-To: References: <6F9804CE79B042468FDC7E8C86CF4CBC4E777ACF@exprd04.hosting.ru.nl> Message-ID: Indeed, in a separate thread with Michael Cohen several months back he suggested precisely that paper. On Dec 19, 2016 5:07 PM, "Nicholas A. Peatfield" wrote: > I think this paper is relevant to this discussion. > > Grandchamp, R., & Delorme, A. (2011). Single-Trial Normalization for > Event-Related Spectral Decomposition Reduces Sensitivity to Noisy Trials. *Frontiers > in Psychology*, *2*, 236. http://doi.org/10.3389/fpsyg.2011.00236 > > https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3183439/ > > > > On 19 December 2016 at 13:08, Teresa Madsen wrote: > >> I appreciate everyone's feedback, but I still wonder if something is >> being missed. I understand that the non-normally distributed power values >> may be less of an issue when performing non-parametric stats or even a >> paired-samples t-test that looks at difference values which may be normal >> even when the raw data isn't. However, my concern comes into play even >> before these statistical comparisons are made, whenever any averaging is >> done to freq-type data across times, frequencies, trials, electrodes, >> subjects, etc. That means any time any of these configuration options are >> used for any of these functions, and probably more: >> >> ft_freqanalysis: cfg.keeptrials or cfg.keeptapers = 'no'; >> ft_freqgrandaverage: cfg.keepindividual = 'no'; >> ft_freqstatistics: cfg.avgoverchan, cfg.avgovertime, or >> cfg.avgoverfreq = 'yes'; >> ft_freqbaseline: cfg.baseline = anything but 'no' >> >> In each case, if raw power values are averaged, the result will be >> positively skewed. Maybe it's not a huge problem if all of the data is >> treated identically, but the specific case that triggered my concern was in >> ft_freqbaseline, where the individual time-frequency bins are compared to >> the mean over time for the baseline period. For example, when using >> cfg.baselinetype = 'db', as Giuseppe Pellizzer suggested, the output freq >> data does indeed have a more normal distribution over time, but the mean >> over the baseline time period is performed *before* the log transform, when >> the distribution is still highly skewed: >> >> meanVals = repmat(nanmean(data(:,:,baselineTimes), 3), [1 1 size(data, >> 3)]); >> data = 10*log10(data ./ meanVals); >> >> That's what I had originally done when analyzing data for my SfN poster, >> when I realized the background noise that shouldn't have changed much from >> baseline was mostly showing a decrease from baseline of about -3dB. >> >> Now, I've realized I'm seeing this as more of a problem than others >> because of another tweak I made, which was to use a long, separate baseline >> recording to normalize my trial data, rather than a short pre-trial period >> as ft_freqbaseline is designed to do. Averaging a few hundred milliseconds >> for a baseline power estimate might be okay because overlapping time points >> in the original data are used to calculate those power values anyway, >> probably making them less skewed, but also (it seems to me) more arbitrary >> and prone to error. I already offered my custom function BLnorm.m to one >> person who was asking about this issue of normalizing to a separate >> baseline recording, and I would be happy to contribute it to FieldTrip if >> others would appreciate it. >> >> Since a few people suggested using the median, and it is also suggested >> in Cohen's textbook >> as an >> alternative measure of the central tendency for skewed raw power values, I >> wonder if the simplest fix might be to add an option to select mean or >> median in each of the functions listed above. Another possibility would be >> adding an option to transform the power values upon output from >> ft_freqanalysis. >> >> Would anyone else find such changes useful? >> >> Thanks, >> Teresa >> >> >> On Wed, Dec 14, 2016 at 4:22 AM, Herring, J.D. (Jim) < >> J.Herring at donders.ru.nl> wrote: >> >>> In terms of statistics it is the distribution of values that you do the >>> statistics on that matters. In case of a paired-samples t-test when >>> comparing two conditions, it is the distribution of difference values that >>> has to be normally distributed. The distribution of difference values is >>> often normal given two similarly non-normal distributions, offering no >>> complications for a regular parametric test. >>> >>> >>> >>> The non-parametric tests offered in fieldtrip indeed do not assume >>> normality, so you should have no problem there either. >>> >>> >>> >>> >>> >>> *From:* fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at scie >>> nce.ru.nl] *On Behalf Of *Alik Widge >>> *Sent:* Tuesday, December 13, 2016 3:10 PM >>> *To:* FieldTrip discussion list >>> *Subject:* Re: [FieldTrip] impact of skewed power distributions on data >>> analysis >>> >>> >>> >>> In this, Teresa is right and we have observed this in our own EEG data >>> -- depending on one's level of noise and number of trials/patients, the >>> mean can be a very poor estimator of central tendency. My students are >>> still arguing about what we really want to do with it, but at least one of >>> them has shifted to using the median as a matter of course for baseline >>> normalization. >>> >>> >>> Alik Widge >>> alik.widge at gmail.com >>> (206) 866-5435 >>> >>> >>> >>> On Mon, Dec 12, 2016 at 6:45 PM, Teresa Madsen >>> wrote: >>> >>> That may very well be true; to be honest, I haven't looked that deeply >>> into the stats offerings yet. However, my plan is to express each >>> electrode's experimental data in terms of change from their respective >>> baseline recordings before attempting any group averaging or statistical >>> testing, and this problem shows up first in the baseline correction step, >>> where FieldTrip averages raw power over time. >>> >>> ~Teresa >>> >>> >>> >>> On Mon, Dec 12, 2016 at 4:56 PM Nicholas A. Peatfield < >>> nick.peatfield at gmail.com> wrote: >>> >>> Correct me if I'm wrong, but, if you are using the non-parametric >>> statistics implemented by fieldtrip, the data does not need to be normally >>> distributed. >>> >>> >>> >>> On 12 December 2016 at 13:39, Teresa Madsen wrote: >>> >>> No, sorry, that's not what I meant, but thanks for giving me the >>> opportunity to clarify. Of course everyone is familiar with the 1/f pattern >>> across frequencies, but the distribution across time (and according to the >>> poster, also across space), also has an extremely skewed, negative >>> exponential distribution. I probably confused everyone by trying to show >>> too much data in my figure, but each color represents the distribution of >>> power values for a single frequency over time, using a histogram and a line >>> above with circles at the mean +/- one standard deviation. >>> >>> My main point was that the mean is not representative of the central >>> tendency of such an asymmetrical distribution of power values over time. >>> It's even more obvious which is more representative of their actual >>> distributions when I plot e^mean(logpower) on the raw plot and >>> log(mean(rawpower)) on the log plot, but that made the figure even more >>> busy and confusing. >>> >>> I hope that helps, >>> Teresa >>> >>> >>> >>> On Mon, Dec 12, 2016 at 3:47 PM Nicholas A. Peatfield < >>> nick.peatfield at gmail.com> wrote: >>> >>> Hi Teresa, >>> >>> >>> >>> I think what you are discussing is the 1/f power scaling of the power >>> spectrum. This is one of the reasons that comparisons are made within >>> a band (i.e. alpha to alpha) and not between bands (i.e. alpha to gamma), >>> as such the assumption is that within bands there should be a relative >>> change against baseline and this is what the statistics are performed on. >>> That is, baseline correction is assumed to be the mean for a specific >>> frequency and not a mean across frequencies. >>> >>> >>> >>> And this leads to another point that when you are selecting a frequency >>> range to do the non-parametric statistics on you should not do 1-64 Hz but >>> break it up based on the bands. >>> >>> >>> >>> Hope my interpretation of your point is correct. I sent in individually, >>> as I wanted to ensure I followed your point. >>> >>> >>> >>> Cheers, >>> >>> >>> >>> Nick >>> >>> >>> >>> >>> >>> On 12 December 2016 at 08:23, Teresa Madsen wrote: >>> >>> FieldTrippers, >>> >>> >>> >>> While analyzing my data for the annual Society for Neuroscience meeting, >>> I developed a concern that was quickly validated by another poster (full >>> abstract copied and linked below) focusing on the root of the problem: >>> neural oscillatory power is not normally distributed across time, >>> frequency, or space. The specific problem I had encountered was in >>> baseline-correcting my experimental data, where, regardless of >>> cfg.baselinetype, ft_freqbaseline depends on the mean power over time. >>> However, I found that the distribution of raw power over time is so skewed >>> that the mean was not a reasonable approximation of the central tendency of >>> the baseline power, so it made most of my experimental data look like it >>> had decreased power compared to baseline. The more I think about it, the >>> more I realize that averaging is everywhere in the way we analyze neural >>> oscillations (across time points, frequency bins, electrodes, trials, >>> subjects, etc.), and many of the standard statistics people use also rely >>> on assumptions of normality. >>> >>> >>> >>> The most obvious solution for me was to log transform the data first, as >>> it appears to be fairly log normal, and I always use log-scale >>> visualizations anyway. Erik Peterson, middle author on the poster, agreed >>> that this would at least "restore (some) symmetry to the error >>> distribution." I used a natural log transform, sort of arbitrarily to >>> differentiate from the standard decibel transform included in FieldTrip as >>> cfg.baselinetype = 'db'. The following figures compare the 2 distributions >>> across several frequency bands (using power values from a wavelet >>> spectrogram obtained from a baseline LFP recorded in rat prelimbic >>> cortex). The lines at the top represent the mean +/- one standard >>> deviation for each frequency band, and you can see how those descriptive >>> stats are much more representative of the actual distributions in the log >>> scale. >>> >>> >>> >>> >>> ​​ >>> >>> For my analysis, I also calculated a z-score on the log transformed >>> power to assess how my experimental data compared to the variability of the >>> noise in a long baseline recording from before conditioning, rather than a >>> short pre-trial baseline period, since I find that more informative than >>> any of FieldTrip's built-in baseline types. I'm happy to share the custom >>> functions I wrote for this if people think it would be a useful addition to >>> FieldTrip. I can also share more about my analysis and/or a copy of the >>> poster, if anyone wants more detail - I just didn't want to make this email >>> too big. >>> >>> >>> >>> Mostly, I'm just hoping to start some discussion here as to how to >>> address this. I searched the wiki >>> , listserv >>> >>> archives >>> , >>> and bugzilla for >>> anything related and came up with a few topics surrounding normalization >>> and baseline correction, but only skirting this issue. It seems important, >>> so I want to find out whether others agree with my approach or already have >>> other ways of avoiding the problem, and whether FieldTrip's code needs to >>> be changed or just documentation added, or what? >>> >>> >>> >>> Thanks for any insights, >>> >>> Teresa >>> >>> >>> >>> >>> 271.03 / LLL17 - Neural oscillatory power is not Gaussian distributed >>> across time >>> >>> >>> *Authors* >>> >>> **L. IZHIKEVICH*, E. PETERSON, B. VOYTEK; >>> Cognitive Sci., UCSD, San Diego, CA >>> >>> *Disclosures* >>> >>> *L. Izhikevich:* None. *E. Peterson:* None. *B. Voytek:* None. >>> >>> *Abstract* >>> >>> Neural oscillations are important in organizing activity across the >>> human brain in healthy cognition, while oscillatory disruptions are linked >>> to numerous disease states. Oscillations are known to vary by frequency and >>> amplitude across time and between different brain regions; however, this >>> variability has never been well characterized. We examined human and animal >>> EEG, LFP, MEG, and ECoG data from over 100 subjects to analyze the >>> distribution of power and frequency across time, space and species. We >>> report that between data types, subjects, frequencies, electrodes, and >>> time, an inverse power law, or negative exponential distribution, is >>> present in all recordings. This is contrary to, and not compatible with, >>> the Gaussian noise assumption made in many digital signal processing >>> techniques. The statistical assumptions underlying common algorithms for >>> power spectral estimation, such as Welch's method, are being violated >>> resulting in non-trivial misestimates of oscillatory power. Different >>> statistical approaches are warranted. >>> >>> >>> >>> -- >>> >>> Teresa E. Madsen, PhD >>> Research Technical Specialist: *in vivo *electrophysiology & data >>> analysis >>> >>> Division of Behavioral Neuroscience and Psychiatric Disorders >>> Yerkes National Primate Research Center >>> >>> Emory University >>> >>> Rainnie Lab, NSB 5233 >>> 954 Gatewood Rd. NE >>> Atlanta, GA 30329 >>> >>> (770) 296-9119 >>> >>> braingirl at gmail.com >>> >>> https://www.linkedin.com/in/temadsen >>> >>> >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> >>> >>> >>> -- >>> >>> Nicholas Peatfield, PhD >>> >>> >>> >>> >>> >>> >>> >>> -- >>> >>> Nicholas Peatfield, PhD >>> >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Teresa E. Madsen, PhD >> Division of Behavioral Neuroscience and Psychiatric Disorders >> Yerkes National Primate Research Center >> Emory University >> Rainnie Lab, NSB 5233 >> 954 Gatewood Rd. NE >> Atlanta, GA 30329 >> (770) 296-9119 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Nicholas Peatfield, PhD > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 38279 bytes Desc: not available URL: From werkle at mpib-berlin.mpg.de Wed Dec 21 11:44:50 2016 From: werkle at mpib-berlin.mpg.de (Werkle, Markus) Date: Wed, 21 Dec 2016 10:44:50 +0000 Subject: [FieldTrip] Problem with ft_sourcestatistics Message-ID: <4C4CCFA964C0894591C5AB8330717647BBA5EB6F@MaxMail04.mpib-berlin.mpg.de> Dear Fieldtrippers, when I run the code below: %---------------------------------------------------------------------------------------------------------- src_descrcfg = []; src_descrcfg.keeptrials = 'yes'; src00 = ft_sourcedescriptives(src_descrcfg,src00); src01 = ft_sourcedescriptives(src_descrcfg,src01); src11 = ft_sourcedescriptives(src_descrcfg,src11); src_statscfg = []; src_statscfg.parameter = 'trial.pow'; src_statscfg.method = 'analytic'; src_statscfg.statistic = 'indepsamplesregrT'; src_statscfg.alpha = 0.05; src_statscfg.correctm = 'no'; src_statscfg.design(1,:) = [ones(1,src00.df) 2*ones(1,src01.df) 3*ones(1,src11.df)]; src_statscfg.ivar = 1; % the 1st row in cfg.design contains the independent variable src_stat = ft_sourcestatistics(src_statscfg, src00, src01, src11); %---------------------------------------------------------------------------------------------------------- I get the following output and error message: original data contained 201 trials the call to "ft_sourcedescriptives" took 0 seconds and required the additional allocation of an estimated 48 MB original data contained 113 trials the call to "ft_sourcedescriptives" took 0 seconds and required the additional allocation of an estimated 0 MB original data contained 46 trials the call to "ft_sourcedescriptives" took 0 seconds and required the additional allocation of an estimated 0 MB Index exceeds matrix dimensions. Error in ft_datatype_source (line 187) val{indx(k)}(1,:,:,:) = dat{indx(k)}; Error in ft_checkdata (line 251) data = ft_datatype_source(data); Error in ft_sourcestatistics (line 100) varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'source', 'feedback', 'no'); src00, src01, and src11 are source-solutions from a dics-beamformer with the following content: src00 = freq: 9.7656 cumtapcnt: [201x1 double] dim: [27 36 30] inside: [29160x1 logical] pos: [29160x3 double] method: 'rawtrial' trial: [1x201 struct] df: 201 cfg: [1x1 struct] sampleinfo: [201x2 double] rating: [201x2 double] stim: {201x3 cell} The source-solutions were based on a common dics-filter after running the following code: %---------------------------------------------------------------------------------------------------------- % compute single trial spectra mtmfftcfg.keeptrials = 'yes'; mtmfft_singletrl = ft_freqanalysis(mtmfftcfg,data); % project all trials through common spatial filter % dics_alltrl_cfg = []; dics_alltrl_cfg = dics_commoncfg; dics_alltrl_cfg.grid.filter = dics_common.avg.filter; % use the common filter computed in the previous step! dics_alltrl_cfg.rawtrial = 'yes'; % project each single trial through the filter. Only necessary if you are interested in reconstructing single trial data tmp_dics_all = ft_sourceanalysis(dics_alltrl_cfg, mtmfft_singletrl); % contains the source estimates for all trials/both %---------------------------------------------------------------------------------------------------------- Any ideas, why the data is not recognized as source-data when calling ft_sourcestatistics (obviously it is recognized correctly with ft_sourcedescriptives ...). Thank you very much for your help. Best regards, Markus ********************************************************************* Dr. Markus Werkle-Bergner, Dipl. Psych. Senior Research Scientist (W2) Jacobs Foundation Research Fellow 2017-2019 Max Planck Institute for Human Development Center for Lifespan Psychology Lentzeallee 94, 14195 Berlin Tel.: 0049 (0)30 82406 447 Fax.: 0049 (0)30 824 99 39 Mail: werkle at mpib-berlin.mpg.de http://www.mpib-berlin.mpg.de/en/staff/markus-werkle-bergner ********************************************************************* From alex.sel at psy.ox.ac.uk Wed Dec 21 13:09:21 2016 From: alex.sel at psy.ox.ac.uk (Alex Sel) Date: Wed, 21 Dec 2016 12:09:21 +0000 Subject: [FieldTrip] 2x3 ANOVA depsamplesHotTsqr Message-ID: <3123912FD054FE44A023073D2EFD213C04DA1C5D@MBX02.ad.oak.ox.ac.uk> Dear list, I have an 2x3 ANOVA design and I would like to test the interactions using the cluster-based permutation test. I would like to use the statfun depsamplesHotTsqr. However, it seems that it has not been implemented yet. Has anyone used the depsamplesHotTsqr and knows how to implement it? Any insights on this would be much appreciated. Thank you. Best wishes, Alex Sel, PhD Postdoctoral Researcher Department of Experimental Psychology, University of Oxford, 9 South Parks Road, OX1 3UD Tel: 01865 277 229 Email: Alex.sel at psy.ox.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From ekenaykut at gmail.com Wed Dec 21 13:41:11 2016 From: ekenaykut at gmail.com (Aykut Eken) Date: Wed, 21 Dec 2016 15:41:11 +0300 Subject: [FieldTrip] 2x3 ANOVA depsamplesHotTsqr In-Reply-To: <3123912FD054FE44A023073D2EFD213C04DA1C5D@MBX02.ad.oak.ox.ac.uk> References: <3123912FD054FE44A023073D2EFD213C04DA1C5D@MBX02.ad.oak.ox.ac.uk> Message-ID: I also have the same problem. Does fieldtrip have a statistical analysis function for N- way ANOVA? Aykut > El 21 dic 2016, a las 15:09, Alex Sel escribió: > > Dear list, > > I have an 2x3 ANOVA design and I would like to test the interactions using the cluster-based permutation test. I would like to use the statfun depsamplesHotTsqr. However, it seems that it has not been implemented yet. > > Has anyone used the depsamplesHotTsqr and knows how to implement it? > > Any insights on this would be much appreciated. > > Thank you. > > Best wishes, > Alex Sel, PhD > Postdoctoral Researcher > Department of Experimental Psychology, > University of Oxford, > 9 South Parks Road, > OX1 3UD > Tel: 01865 277 229 > Email: Alex.sel at psy.ox.ac.uk > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From bertram0611 at pku.edu.cn Wed Dec 21 14:34:26 2016 From: bertram0611 at pku.edu.cn (=?UTF-8?B?6JSh5p6X?=) Date: Wed, 21 Dec 2016 21:34:26 +0800 (GMT+08:00) Subject: [FieldTrip] 2x3 ANOVA depsamplesHotTsqr In-Reply-To: References: <3123912FD054FE44A023073D2EFD213C04DA1C5D@MBX02.ad.oak.ox.ac.uk> Message-ID: <68c27527.1a2d5.15921971601.Coremail.bertram0611@pku.edu.cn> Me too, fieldtrip probably cannot investigate the interactions using cluster-based permutation test. Who can provide alternative methods to solve this kind of problem? lin -----原始邮件----- 发件人:"Aykut Eken" 发送时间:2016-12-21 20:41:11 (星期三) 收件人: "FieldTrip discussion list" 抄送: 主题: Re: [FieldTrip] 2x3 ANOVA depsamplesHotTsqr I also have the same problem. Does fieldtrip have a statistical analysis function for N- way ANOVA? Aykut El 21 dic 2016, a las 15:09, Alex Sel escribió: Dear list, I have an 2x3 ANOVA design and I would like to test the interactions using the cluster-based permutation test. I would like to use the statfun depsamplesHotTsqr. However, it seems that it has not been implemented yet. Has anyone used the depsamplesHotTsqr and knows how to implement it? Any insights on this would be much appreciated. Thank you. Best wishes, Alex Sel, PhD Postdoctoral Researcher Department of Experimental Psychology, University of Oxford, 9 South Parks Road, OX1 3UD Tel: 01865 277 229 Email: Alex.sel at psy.ox.ac.uk _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Wed Dec 21 17:17:00 2016 From: julian.keil at gmail.com (Julian Keil) Date: Wed, 21 Dec 2016 17:17:00 +0100 Subject: [FieldTrip] 2x3 ANOVA depsamplesHotTsqr In-Reply-To: <68c27527.1a2d5.15921971601.Coremail.bertram0611@pku.edu.cn> References: <3123912FD054FE44A023073D2EFD213C04DA1C5D@MBX02.ad.oak.ox.ac.uk> <68c27527.1a2d5.15921971601.Coremail.bertram0611@pku.edu.cn> Message-ID: Dear Lin, Aykut and Alex, I wrote a fieldtrip-compatibe wrapper function to the ANOVA-Functions by Trujillo-Ortiz (the originals can be found on the Matlab File Exchange) which can handle n-way repeated ANOVAs. These functions can handle timlock, TFR or source-level FT structures. The code can be found on by Github: https://github.com/juliankeil/VirtualTools Please be aware, that these ANOVA-functions in DO NOT use a permutation approach or provide any correction based on clusters. All correction for multiple comparisons has to be done after running the ANOVA. Some recent examples in which these functions were used are: Keil, J., Pomper, U., Senkowski, D., 2016. Distinct patterns of local oscillatory activity and functional connectivity underlie intersensory attention and temporal prediction. … Cortex 74, 277–288. doi:10.1016/j.cortex.2015.10.023 Roa Romero, Y., Keil, J., Balz, J., Gallinat, J., Senkowski, D., 2016a. Reduced frontal theta oscillations indicate altered crossmodal prediction error processing in schizophrenia. J Neurophysiol 116, 1396–1407. doi:10.1152/jn.00096.2016 Roa Romero, Y., Keil, J., Balz, J., Niedeggen, M., Gallinat, J., Senkowski, D., 2016b. Alpha-Band Oscillations Reflect Altered Multisensory Processing of the McGurk Illusion in Schizophrenia. Frontiers in Human Neuroscience 10, 41. doi:10.3389/fnhum.2016.00041 Maybe these reference suggested by an anonymous reviewer could be helpful in the implementation of a permutation approach: Anderson, M., Braak, C., 2002. Permutation tests for multi-factorial analysis of variance. Journal of Statistical Computation and Simulation 73, 85–113. Anderson, M.J., 2001. Permutation tests for univariate or multivariate analysis of variance and regression. Can. J. Fish. Aquat. Sci. 58, 626–639. doi:10.1139/cjfas-58-3-626 Good luck, Julian Am 21.12.2016 um 14:34 schrieb 蔡林: > Me too, fieldtrip probably cannot investigate the interactions using cluster-based permutation test. > Who can provide alternative methods to solve this kind of problem? > > > lin > -----原始邮件----- > 发件人:"Aykut Eken" > 发送时间:2016-12-21 20:41:11 (星期三) > 收件人: "FieldTrip discussion list" > 抄送: > 主题: Re: [FieldTrip] 2x3 ANOVA depsamplesHotTsqr > > I also have the same problem. Does fieldtrip have a statistical analysis function for N- way ANOVA? > > Aykut > > El 21 dic 2016, a las 15:09, Alex Sel escribió: > >> Dear list, >> >> I have an 2x3 ANOVA design and I would like to test the interactions using the cluster-based permutation test. I would like to use the statfun depsamplesHotTsqr. However, it seems that it has not been implemented yet. >> >> Has anyone used the depsamplesHotTsqr and knows how to implement it? >> >> Any insights on this would be much appreciated. >> >> Thank you. >> >> Best wishes, >> Alex Sel, PhD >> Postdoctoral Researcher >> Department of Experimental Psychology, >> University of Oxford, >> 9 South Parks Road, >> OX1 3UD >> Tel: 01865 277 229 >> Email: Alex.sel at psy.ox.ac.uk >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From ekenaykut at gmail.com Thu Dec 22 10:35:04 2016 From: ekenaykut at gmail.com (Aykut Eken) Date: Thu, 22 Dec 2016 11:35:04 +0200 Subject: [FieldTrip] 2x3 ANOVA depsamplesHotTsqr In-Reply-To: References: <3123912FD054FE44A023073D2EFD213C04DA1C5D@MBX02.ad.oak.ox.ac.uk> <68c27527.1a2d5.15921971601.Coremail.bertram0611@pku.edu.cn> Message-ID: Dear Julian, Thank you for your effort. However, that is what MATLAB can do by using the function “rm” and “ranova”. So, I think the cluster permutation approach should be used while applying a N - way repeated measures ANOVA. Regards Aykut Eken, PhD Düzce University Faculty of Engineering, Biomedical Engineering Department Konuralp Campus, 81620 Düzce / Turkey. Tel : 0380 542 11 00 / 4546 Fax : 0380 542 10 37 e-mail : aykuteken at duzce.edu.tr e-mail : ekenaykut at gmail.com > On 21 Dec 2016, at 18:17, Julian Keil wrote: > > Dear Lin, Aykut and Alex, > > I wrote a fieldtrip-compatibe wrapper function to the ANOVA-Functions by Trujillo-Ortiz (the originals can be found on the Matlab File Exchange) which can handle n-way repeated ANOVAs. > These functions can handle timlock, TFR or source-level FT structures. > The code can be found on by Github: https://github.com/juliankeil/VirtualTools > Please be aware, that these ANOVA-functions in DO NOT use a permutation approach or provide any correction based on clusters. All correction for multiple comparisons has to be done after running the ANOVA. > > Some recent examples in which these functions were used are: > Keil, J., Pomper, U., Senkowski, D., 2016. Distinct patterns of local oscillatory activity and functional connectivity underlie intersensory attention and temporal prediction. … Cortex 74, 277–288. doi:10.1016/j.cortex.2015.10.023 > Roa Romero, Y., Keil, J., Balz, J., Gallinat, J., Senkowski, D., 2016a. Reduced frontal theta oscillations indicate altered crossmodal prediction error processing in schizophrenia. J Neurophysiol 116, 1396–1407. doi:10.1152/jn.00096.2016 > Roa Romero, Y., Keil, J., Balz, J., Niedeggen, M., Gallinat, J., Senkowski, D., 2016b. Alpha-Band Oscillations Reflect Altered Multisensory Processing of the McGurk Illusion in Schizophrenia. Frontiers in Human Neuroscience 10, 41. doi:10.3389/fnhum.2016.00041 > > Maybe these reference suggested by an anonymous reviewer could be helpful in the implementation of a permutation approach: > Anderson, M., Braak, C., 2002. Permutation tests for multi-factorial analysis of variance. Journal of Statistical Computation and Simulation 73, 85–113. > Anderson, M.J., 2001. Permutation tests for univariate or multivariate analysis of variance and regression. Can. J. Fish. Aquat. Sci. 58, 626–639. doi:10.1139/cjfas-58-3-626 > > Good luck, > > Julian > > Am 21.12.2016 um 14:34 schrieb 蔡林: > >> Me too, fieldtrip probably cannot investigate the interactions using cluster-based permutation test. >> Who can provide alternative methods to solve this kind of problem? >> >> >> lin >> -----原始邮件----- >> 发件人:"Aykut Eken" > >> 发送时间:2016-12-21 20:41:11 (星期三) >> 收件人: "FieldTrip discussion list" > >> 抄送: >> 主题: Re: [FieldTrip] 2x3 ANOVA depsamplesHotTsqr >> >> I also have the same problem. Does fieldtrip have a statistical analysis function for N- way ANOVA? >> >> Aykut >> >> El 21 dic 2016, a las 15:09, Alex Sel > escribió: >> >>> Dear list, >>> >>> I have an 2x3 ANOVA design and I would like to test the interactions using the cluster-based permutation test. I would like to use the statfun depsamplesHotTsqr. However, it seems that it has not been implemented yet. >>> >>> Has anyone used the depsamplesHotTsqr and knows how to implement it? >>> >>> Any insights on this would be much appreciated. >>> >>> Thank you. >>> >>> Best wishes, >>> Alex Sel, PhD >>> Postdoctoral Researcher >>> Department of Experimental Psychology, >>> University of Oxford, >>> 9 South Parks Road, >>> OX1 3UD >>> Tel: 01865 277 229 >>> Email: Alex.sel at psy.ox.ac.uk >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Dec 22 09:42:22 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 22 Dec 2016 08:42:22 +0000 Subject: [FieldTrip] 2x3 ANOVA depsamplesHotTsqr In-Reply-To: References: <3123912FD054FE44A023073D2EFD213C04DA1C5D@MBX02.ad.oak.ox.ac.uk> <68c27527.1a2d5.15921971601.Coremail.bertram0611@pku.edu.cn> Message-ID: <9704ED8F-91AE-41B8-AC52-62F3904CA086@donders.ru.nl> Dear all, To add to the discussion: note that it is in general not straightforward to do a valid statistical inference about interaction effects in a permutation framework. This discussion pops up once in a while on this list, so for those interested in carrying this further I would first recommend to dig into the archive. Best wishes, Jan-Mathijs J.M.Schoffelen Senior Researcher, VIDI-fellow Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 22 Dec 2016, at 10:35, Aykut Eken > wrote: Dear Julian, Thank you for your effort. However, that is what MATLAB can do by using the function “rm” and “ranova”. So, I think the cluster permutation approach should be used while applying a N - way repeated measures ANOVA. Regards Aykut Eken, PhD Düzce University Faculty of Engineering, Biomedical Engineering Department Konuralp Campus, 81620 Düzce / Turkey. Tel : 0380 542 11 00 / 4546 Fax : 0380 542 10 37 e-mail : aykuteken at duzce.edu.tr e-mail : ekenaykut at gmail.com On 21 Dec 2016, at 18:17, Julian Keil > wrote: Dear Lin, Aykut and Alex, I wrote a fieldtrip-compatibe wrapper function to the ANOVA-Functions by Trujillo-Ortiz (the originals can be found on the Matlab File Exchange) which can handle n-way repeated ANOVAs. These functions can handle timlock, TFR or source-level FT structures. The code can be found on by Github: https://github.com/juliankeil/VirtualTools Please be aware, that these ANOVA-functions in DO NOT use a permutation approach or provide any correction based on clusters. All correction for multiple comparisons has to be done after running the ANOVA. Some recent examples in which these functions were used are: Keil, J., Pomper, U., Senkowski, D., 2016. Distinct patterns of local oscillatory activity and functional connectivity underlie intersensory attention and temporal prediction. … Cortex 74, 277–288. doi:10.1016/j.cortex.2015.10.023 Roa Romero, Y., Keil, J., Balz, J., Gallinat, J., Senkowski, D., 2016a. Reduced frontal theta oscillations indicate altered crossmodal prediction error processing in schizophrenia. J Neurophysiol 116, 1396–1407. doi:10.1152/jn.00096.2016 Roa Romero, Y., Keil, J., Balz, J., Niedeggen, M., Gallinat, J., Senkowski, D., 2016b. Alpha-Band Oscillations Reflect Altered Multisensory Processing of the McGurk Illusion in Schizophrenia. Frontiers in Human Neuroscience 10, 41. doi:10.3389/fnhum.2016.00041 Maybe these reference suggested by an anonymous reviewer could be helpful in the implementation of a permutation approach: Anderson, M., Braak, C., 2002. Permutation tests for multi-factorial analysis of variance. Journal of Statistical Computation and Simulation 73, 85–113. Anderson, M.J., 2001. Permutation tests for univariate or multivariate analysis of variance and regression. Can. J. Fish. Aquat. Sci. 58, 626–639. doi:10.1139/cjfas-58-3-626 Good luck, Julian Am 21.12.2016 um 14:34 schrieb 蔡林: Me too, fieldtrip probably cannot investigate the interactions using cluster-based permutation test. Who can provide alternative methods to solve this kind of problem? lin -----原始邮件----- 发件人:"Aykut Eken" > 发送时间:2016-12-21 20:41:11 (星期三) 收件人: "FieldTrip discussion list" > 抄送: 主题: Re: [FieldTrip] 2x3 ANOVA depsamplesHotTsqr I also have the same problem. Does fieldtrip have a statistical analysis function for N- way ANOVA? Aykut El 21 dic 2016, a las 15:09, Alex Sel > escribió: Dear list, I have an 2x3 ANOVA design and I would like to test the interactions using the cluster-based permutation test. I would like to use the statfun depsamplesHotTsqr. However, it seems that it has not been implemented yet. Has anyone used the depsamplesHotTsqr and knows how to implement it? Any insights on this would be much appreciated. Thank you. Best wishes, Alex Sel, PhD Postdoctoral Researcher Department of Experimental Psychology, University of Oxford, 9 South Parks Road, OX1 3UD Tel: 01865 277 229 Email: Alex.sel at psy.ox.ac.uk _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Thu Dec 22 20:30:52 2016 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 23 Dec 2016 03:30:52 +0800 Subject: [FieldTrip] 2x3 ANOVA depsamplesHotTsqr Message-ID: See http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests --- Stephen Politzer-Ahles The Hong Kong Polytechnic University Department of Chinese and Bilingual Studies http://www.mypolyuweb.hk/~sjpolit/ > Message: 2 > Date: Wed, 21 Dec 2016 15:41:11 +0300 > From: Aykut Eken > To: FieldTrip discussion list > Subject: Re: [FieldTrip] 2x3 ANOVA depsamplesHotTsqr > Message-ID: > Content-Type: text/plain; charset="utf-8" > > I also have the same problem. Does fieldtrip have a statistical analysis > function for N- way ANOVA? > > Aykut > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariam at nbrc.ac.in Fri Dec 23 12:52:07 2016 From: mariam at nbrc.ac.in (mariam at nbrc.ac.in) Date: Fri, 23 Dec 2016 17:22:07 +0530 (IST) Subject: [FieldTrip] Trouble using ft_databrowser Message-ID: Dear FieldTrip Users, I have just started working on fieldtrip for analyzing MEG data. I was using ft_databrowser and ft_rejectvisual functions for visual rejection of artifacts. The configuration I have used is as follows: cfg = []; cfg.viewmode = 'component'; cfg.continuous = 'no'; cfg.blocksize = 1; cfg.channels = [1:19]; cfg = ft_databrowser(cfg,data); But I am getting following error and the displayed channels are merely a line and no signal waveform is visible. Reference to non-existent field 'topolabel'. Error in ft_databrowser>redraw_cb (line 2042) [sel1, sel2] = match_str(opt.orgdata.topolabel, laychan.label); Error in ft_databrowser>winresize_cb (line 2222) redraw_cb(h,eventdata); Error using figure Error while evaluating figure ResizeFcn Please help me with the above. Moreover, if you could suggest me a better method for visual artifact rejection and visualization, please do. Thanks & Regards, Mariam Siddiqui Senior R & D Engineer (Dr Mandal's Lab), Neuroimaging and Neurospectroscopy Laboratory, National Brain Research Centre, Gurgaon, India From jan.schoffelen at donders.ru.nl Fri Dec 23 13:10:10 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 23 Dec 2016 12:10:10 +0000 Subject: [FieldTrip] Trouble using ft_databrowser In-Reply-To: References: Message-ID: <53046C7C-9EE8-4B53-BD0D-9873DA648F64@donders.ru.nl> Hi Mariam, If you remove the line ‘cfg.viewmode=‘component’ ‘ it should work. Best wishes and good luck, Jan-Mathijs J.M.Schoffelen Senior Researcher, VIDI-fellow Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands > On 23 Dec 2016, at 12:52, mariam at nbrc.ac.in wrote: > > Dear FieldTrip Users, > > I have just started working on fieldtrip for analyzing MEG data. I was > using ft_databrowser and ft_rejectvisual functions for visual rejection of > artifacts. > > The configuration I have used is as follows: > cfg = []; > cfg.viewmode = 'component'; > cfg.continuous = 'no'; > cfg.blocksize = 1; > cfg.channels = [1:19]; > cfg = ft_databrowser(cfg,data); > > But I am getting following error and the displayed channels are merely a > line and no signal waveform is visible. > > Reference to non-existent field 'topolabel'. > > Error in ft_databrowser>redraw_cb (line 2042) > [sel1, sel2] = match_str(opt.orgdata.topolabel, > laychan.label); > > Error in ft_databrowser>winresize_cb (line 2222) > redraw_cb(h,eventdata); > > Error using figure > Error while evaluating figure ResizeFcn > > Please help me with the above. Moreover, if you could suggest me a better > method for visual artifact rejection and visualization, please do. > > Thanks & Regards, > Mariam Siddiqui > > Senior R & D Engineer (Dr Mandal's Lab), > Neuroimaging and Neurospectroscopy Laboratory, > National Brain Research Centre, > Gurgaon, India > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip From singht at musc.edu Sun Dec 25 17:36:56 2016 From: singht at musc.edu (Singh, Tarkeshwar) Date: Sun, 25 Dec 2016 16:36:56 +0000 Subject: [FieldTrip] BEM volume conduction model using 'dipoli' Message-ID: Dear Fieldtrip users, I have been trying the ‘dipoli’ method to create a volume conduction model but I keep get the following error. Fatal error in dipoli: interface /private/tmp/tp939c3f6a_cbd3_4c15_aac3_e88d1c7bb9b0_1.tri and /private/tmp/tp939c3f6a_cbd3_4c15_aac3_e88d1c7bb9b0_2.tri intersect at vertex 14 of /private/tmp/tp939c3f6a_cbd3_4c15_aac3_e88d1c7bb9b0_1.tri Error using ft_headmodel_dipoli (line 211) an error ocurred while running the dipoli executable - please look at the screen output Error in ft_prepare_headmodel (line 284) headmodel = ft_headmodel_dipoli(geometry, 'conductivity', cfg.conductivity, 'isolatedsource', cfg.isolatedsource); I would appreciate any help in resolving this problem. My code is attached below. Thank you and Merry Christmas, Tarkesh %Begin Code imageDir = [hdd 'EEG/Subject' num2str(folderNumber) '/']; files = dir(fullfile(imageDir,'*.nii')); mri = ft_read_mri(files.name); disp(mri) mri= ft_determine_coordsys(mri); cfg=[]; ft_sourceplot(cfg,mri); cfg = []; cfg.dim = mri.dim; mri_align_sliced = ft_volumereslice(cfg,mri); cfg = []; cfg.method = 'interactive'; cfg.coordsys = 'ctf'; cfg.viewmode='ortho'; mri_align_sliced = ft_volumerealign(cfg, mri_align_sliced); % cfg=[]; ft_sourceplot(cfg,mri_align_sliced); save([savDir sbj], 'mri_align_sliced','-append') %% Segmentation cfg = []; cfg.output = {'brain','skull','scalp'}; segmentedmri = ft_volumesegment(cfg, mri_align_sliced); save([savDir sbj], 'segmentedmri','-append') disp(segmentedmri); cfg=[]; cfg.tissue={'brain','skull','scalp'}; cfg.numvertices = [3000 2000 1000]; bnd=ft_prepare_mesh(cfg,segmentedmri); figure;ft_plot_mesh(bnd); save([savDir sbj], 'bnd','-append') %% Create a volume conduction model using 'dipoli', 'openmeeg', or 'bemcp'. %BEMCP cfg = []; cfg.method ='dipoli'; % vol_dipoli = ft_prepare_headmodel(cfg, bnd); save([savDir sbj], 'vol','-append') %End Code -- Tarkeshwar Singh Postdoctoral Scholar Department of Health Sciences and Research Medical University of South Carolina 77 President Street, Room C305 Charleston, SC 29425 singht at musc.edu ------------------------------------------------------------------------- This message was secured via TLS by MUSC. -------------- next part -------------- An HTML attachment was scrubbed... URL: From russgport at gmail.com Sat Dec 31 05:49:04 2016 From: russgport at gmail.com (russ port) Date: Fri, 30 Dec 2016 23:49:04 -0500 Subject: [FieldTrip] Localizing phase-locked or non phase-locked gamma Message-ID: <66C41176-E674-4E68-8126-6D6E5A17DCE2@gmail.com> Hi Fieldtrippers, I have a quick question - which has been hinted at many times on the mailing list - but I think a solid answer could be quite beneficial to the community (or may be just me, and I’m being overly thick). Currently I have two procedures I am analyzing. One is a auditory steady state response (40Hz amplitude modulated 500Hz tone). The other is a visual gamma paradigm (produced via a standard black/white grating). For the auditory task, we are interested in localizing phase-locked activity. For the visual gamma we are infestered in localizing non phase locked activity. I initially (for reasons uninteresting to this discussion) tried to do this via LCMV’ing (getting at the different forms of activity based on previous posts about whether to build a covariance matrix based on the data [all trials] or the average ERP). Hopefully, I am starting to see the light, and realize that I should be using something more akin to DICS. How (or is it even possible) can I have the DICS source localization choose which form of activity (phase- or not phase-locked) I am interested in? Is it just as simple as passing the time frequency output of ft_freqanalysis for either the ERP (for phase locked activity) or all trial data (for phase and non-phase locked activity), similar to used when typically generating TF plots? To Long, Didn’t Read: Previous posts on the listserv suggested that for LMCV beamforming, you could selectively go after phase locked or time locked but all phase signals (i.e. akin to total power) based on how you built the covariance matrix (on the ERP or non averaged data respectively). A) Is this true? B) when using DICS to go after phase locked activity or total power, can you simply just use the time frequency output of ft_freqanalysis that you would for plotting TFs of either phase-locked (evoked) or total power? Best, Russ Port -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.molinaro at bcbl.eu Sat Dec 31 09:22:54 2016 From: n.molinaro at bcbl.eu (Nicola Molinaro) Date: Sat, 31 Dec 2016 09:22:54 +0100 (CET) Subject: [FieldTrip] BCBL - 1 Post-doc position / Errata corrige Message-ID: <1154188704.483426.1483172574506.JavaMail.zimbra@bcbl.eu> Dear "Fieldtrip" community, A correction about the call deadline January 31st 2017 Nicola POSTDOCTORAL POSITION at the BCBL- Basque Center on Cognition Brain and Language (San Sebasti?n, Basque Country, Spain) www.bcbl.eu (Center of excellence Severo Ochoa) The Basque Center on Cognition Brain and Language (San Sebasti?n, Basque Country, Spain) offers a Postdoctoral position in Cognitive Neuroscience. The main project will focus on the oscillatory correlates of predictive processing with a special focus on neural entrainment phenomena. The successful candidate will be working within the research lines of the Proactive group whose main aim is to develop high-risk/high gain projects at the frontiers of neurocognitive science. The project is based upon a set of MEG experiments that will be designed to unveil the neural mechanism supporting predictive coding and predictive timing across sensory modalities and cognitive domains. The long-term goal is to evaluate the role that such predictive skills play for developmental disorders (such as dyslexia or SLI). The BCBL Center (recently awarded the label of excellence Severo Ochoa) promotes a vibrant research environment without substantial teaching obligations. It provides access to the most advanced behavioral and neuroimaging techniques, including 3 Tesla MRI, a whole-head MEG system, four ERP labs, a NIRS lab, a baby lab including an eyetracker, two eyetracking labs, and several well-equipped behavioral labs. There are excellent technical support staff and research personnel (PhD and postdoctoral students). The positions have a term of appointment of 2 years with a possible renewal.We are looking for cognitive neuroscientists, computational modelers, physicists or engineers with EEG/MEG expertise. Candidates should have a convincing publication track record and familiarity with computing tools (Python/Matlab). Deadline: January 31st, 2017. We encourage immediate applications as the selection process will be ongoing and the appointment may be made before the deadline. To submit your application please follow this link: http://www.bcbl.eu/calls, applying for "Postdoc MEG 2016 Proactive" and upload: 1. Your curriculum vitae. 2. A cover letter/statement describing your research interests (4000 characters maximun) 3. The names of two referees who would be willing to write letters of recommendation For information about the position, please contact Nicola Molinaro (n.molinaro at bcbl.eu). From xiew1202 at gmail.com Sat Dec 31 15:09:28 2016 From: xiew1202 at gmail.com (Xie Wanze) Date: Sat, 31 Dec 2016 22:09:28 +0800 Subject: [FieldTrip] Keeptrials using "pcc" for source analysis Message-ID: Dear Fieldtrip community, I have a question about using the "keeptrials" option when do the source analysis with the beamformer ('PCC') method. The issue I met was that the cfg.keeptrials = 'yes' did not work, i.e., the calculation was not done for all the trials but generated averaged output. Has anyone met this issue before? And does anyone know how to fix it? It did not work for my data nor for the data I downloaded from the FT database. I attached the codes that I copied from the FT website using the FT's example data. I would like to keep the trials information in the source analysis because I plan to do the source space connectivity analysis later, which needs the individual trials information. Or maybe the "crsspctrm" matrix. Codes: cfg = []; cfg.frequency = freq.freq; cfg.method = 'pcc'; cfg.grid = lf; cfg.headmodel = hdm; cfg.keeptrials = 'yes'; cfg.pcc.lambda = '10%'; cfg.pcc.projectnoise = 'yes'; cfg.pcc.keepfilter = 'yes'; cfg.pcc.fixedori = 'yes'; source = ft_sourceanalysis(cfg, freq); Output ("source"): freq: 10 cumtapcnt: [268x1 double] tri: [16000x3 double] inside: [8004x1 logical] pos: [8004x3 double] method: 'average' avg: [1x1 struct] cfg: [1x1 struct] -------------- next part -------------- An HTML attachment was scrubbed... URL: