Institute for Biomedical Engineering (ETH Zurich)‏ & Computational Neuroeconomics Group (Univ. of Zurich)

Slides:



Advertisements
Similar presentations
The General Linear Model (GLM)
Advertisements

Experimental Design Christian Ruff With thanks to: Rik Henson Daniel Glaser Christian Ruff With thanks to: Rik Henson Daniel Glaser.
SPM – introduction & orientation introduction to the SPM software and resources introduction to the SPM software and resources.
Overview of SPM p <0.05 Statistical parametric map (SPM)
The General Linear Model Christophe Phillips Cyclotron Research Centre University of Liège, Belgium SPM Short Course London, May 2011.
SPM 2002 Experimental Design Daniel Glaser Institute of Cognitive Neuroscience, UCL Slides from: Rik Henson, Christian Buchel, Karl Friston, Chris Frith,
Buttons in SPM5 Carolyn McGettigan & Alice Grogan Methods for Dummies 5 th April 2006.
Buttons in SPM5 Seán O’Sullivan, ION Alice Jones, Dept of Psychology Alice Jones, Dept of Psychology Methods for Dummies 16 th Jan 2008.
Event-related fMRI (er-fMRI)
Wellcome Centre for Neuroimaging at UCL
Experimental design of fMRI studies SPM Course 2014 Sandra Iglesias Translational Neuromodeling Unit University of Zurich & ETH Zurich With many thanks.
Experimental design of fMRI studies Methods & models for fMRI data analysis in neuroeconomics April 2010 Klaas Enno Stephan Laboratory for Social and Neural.
Bayesian models for fMRI data
Gordon Wright & Marie de Guzman 15 December 2010 Co-registration & Spatial Normalisation.
Experimental design of fMRI studies SPM Course 2012 Sandra Iglesias Translational Neuromodeling Unit University of Zurich & ETH Zurich With many thanks.
Group analyses of fMRI data Methods & models for fMRI data analysis in neuroeconomics November 2010 Klaas Enno Stephan Laboratory for Social and Neural.
OverviewOverview Motion correction Smoothing kernel Spatial normalisation Standard template fMRI time-series Statistical Parametric Map General Linear.
SPM5 Tutorial, Part 1 fMRI preprocessing Tiffany Elliott May
Multiple testing Justin Chumbley Laboratory for Social and Neural Systems Research University of Zurich With many thanks for slides & images to: FIL Methods.
Overview Contrast in fMRI v contrast in MEG 2D interpolation 1 st level 2 nd level Which buttons? Other clever things with SPM for MEG Things to bear in.
Institute for Biomedical Engineering (ETH Zurich)‏ and Empirical Research in Economics (Univ. of Zurich)‏ Z URICH.
Multiple testing Justin Chumbley Laboratory for Social and Neural Systems Research Institute for Empirical Research in Economics University of Zurich With.
The General Linear Model (GLM) Methods & models for fMRI data analysis in neuroeconomics November 2010 Klaas Enno Stephan Laboratory for Social & Neural.
07/01/15 MfD 2014 Xin You Tai & Misun Kim
Multiple testing Justin Chumbley Laboratory for Social and Neural Systems Research Institute for Empirical Research in Economics University of Zurich With.
Multiple comparison correction Methods & models for fMRI data analysis 18 March 2009 Klaas Enno Stephan Laboratory for Social and Neural Systems Research.
The General Linear Model (GLM)
Group analyses of fMRI data Methods & models for fMRI data analysis 28 April 2009 Klaas Enno Stephan Laboratory for Social and Neural Systems Research.
Multiple comparison correction Methods & models for fMRI data analysis 29 October 2008 Klaas Enno Stephan Branco Weiss Laboratory (BWL) Institute for Empirical.
Group analyses of fMRI data Methods & models for fMRI data analysis 26 November 2008 Klaas Enno Stephan Laboratory for Social and Neural Systems Research.
2nd Level Analysis Jennifer Marchant & Tessa Dekker
Introduction to SPM Batching
Methods for Dummies Second level analysis
With many thanks for slides & images to: FIL Methods group, Virginia Flanagin and Klaas Enno Stephan Dr. Frederike Petzschner Translational Neuromodeling.
7/16/2014Wednesday Yingying Wang
Multiple testing Justin Chumbley Laboratory for Social and Neural Systems Research Institute for Empirical Research in Economics University of Zurich With.
SPM5 Tutorial Part 2 Tiffany Elliott May 10, 2007.
1 Hands-On Data Analysis Kate Pirog Revill and Chris Rorden Data from safety training –9 subjects –Finger-tapping task (12s tapping, 12s rest) –188 scans.
SPM Course Zurich, February 2015 Group Analyses Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London With many thanks to.
Introduction to SPM Batching Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London MATLAB for Cognitive Neuroscience ICN,
Group analyses of fMRI data Methods & models for fMRI data analysis November 2012 With many thanks for slides & images to: FIL Methods group, particularly.
fMRI Preprocessing & Noise Modeling
Bayesian Inference and Posterior Probability Maps Guillaume Flandin Wellcome Department of Imaging Neuroscience, University College London, UK SPM Course,
Experimental design of fMRI studies Methods & models for fMRI data analysis 01 November 2013 Klaas Enno Stephan Translational Neuromodeling Unit (TNU)
Methods & models for fMRI data analysis – HS 2013 David Cole Andrea Diaconescu Jakob Heinzle Sandra Iglesias Sudhir Shankar Raman Klaas Enno Stephan.
Methods for Dummies Overview and Introduction
Experimental design of fMRI studies Methods & models for fMRI data analysis November 2012 Sandra Iglesias Translational Neuromodeling Unit (TNU) Institute.
SPM Software & Resources Wellcome Trust Centre for Neuroimaging University College London SPM Course London, October 2008.
Methods for Dummies Second level Analysis (for fMRI) Chris Hardy, Alex Fellows Expert: Guillaume Flandin.
The general linear model and Statistical Parametric Mapping I: Introduction to the GLM Alexa Morcom and Stefan Kiebel, Rik Henson, Andrew Holmes & J-B.
BCI2000: 2D Control. Getting Started Follow the Passive Stimulus Presentation Data Collection Tutorial on the wiki – However, when the tutorial tells.
Bayesian inference Lee Harrison York Neuroimaging Centre 23 / 10 / 2009.
The general linear model and Statistical Parametric Mapping II: GLM for fMRI Alexa Morcom and Stefan Kiebel, Rik Henson, Andrew Holmes & J-B Poline.
Bayesian Inference in SPM2 Will Penny K. Friston, J. Ashburner, J.-B. Poline, R. Henson, S. Kiebel, D. Glaser Wellcome Department of Imaging Neuroscience,
SPM short course – Mai 2008 Linear Models and Contrasts Jean-Baptiste Poline Neurospin, I2BM, CEA Saclay, France.
Group Analyses Guillaume Flandin SPM Course London, October 2016
2nd Level Analysis Methods for Dummies 2010/11 - 2nd Feb 2011
Event-related fMRI demo
Wellcome Trust Centre for Neuroimaging University College London
and Stefan Kiebel, Rik Henson, Andrew Holmes & J-B Poline
Computational models for imaging analyses
Keith Worsley Keith Worsley
From buttons to code Eamonn Walsh & Domenica Bueti
Experimental Design Christian Ruff With thanks to: Rik Henson
SPM2: Modelling and Inference
Bayesian Methods in Brain Imaging
Wellcome Centre for Neuroimaging at UCL
Bayesian Inference in SPM2
Mixture Models with Adaptive Spatial Priors
Probabilistic Modelling of Brain Imaging Data
Presentation transcript:

Institute for Biomedical Engineering (ETH Zurich)‏ & Computational Neuroeconomics Group (Univ. of Zurich) Z URICH SPM C OURSE 2011 Batch Programming of fMRI Data Analysis Lars Kasper & Christoph Mathys

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS Overview 2Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)  Introduction & Example Dataset  General fMRI Data Analysis Workflow with SPM  Quality Assessment of Raw Data  Spatial Preprocessing  Statistical Design: The General Linear Model  Results: Analyzing Contrast & Reporting  Within-Subject Batching (Single Subject)  Subject-independent Analysis Steps  Subject-independent Data Flow (Dependencies)  Subject-related data  Between-Subject-Batching (Multiple Subject)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS Overview 3Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)  Introduction & Example Dataset  General fMRI Data Analysis Workflow with SPM  Quality Assessment of Raw Data  Spatial Preprocessing  Statistical Design: The General Linear Model  Results: Analyzing Contrast & Reporting  Within-Subject Batching (Single Subject)  Subject-independent Analysis Steps  Subject-independent Data Flow (Dependencies)  Subject-related data  Between-Subject-Batching (Multiple Subject)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS RealignmentSmoothing Normalisation General linear model Statistical parametric map (SPM) Image time-series Parameter estimates Design matrix Template Kernel Gaussian field theory p <0.05 Statisticalinference Overview of SPM Kasper/Mathys (18-Feb-11)4Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS What is batch processing?  Repeats same data analysis for many subjects (>=2)  Not prone to human errors, reproducible what was done  e. g. jobs mat-files  Runs automatically, no supervision needed  Researcher can concentrate on assessing the results  CAVEAT: Tempting to forget about all analysis steps in between which could lead to errors in your conclusions  Therefore: Always make sure, that meaningful results were created at each step  Using Display/CheckReg to view raw data, preprocessed data  Using spm_print to save reported supplementary data output  If anything went wrong, use debugging 5Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS 3 flavors of batching – Goals of this tutorial After finishing this session, you will be able to analyze fMRI datasets using  the Graphical User Interface (GUI) of SPM: 2.The Batch Editor of SPM 3.A template Matlab.m-script file to batch very flexibly 6Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS Introducing the Dataset  Rik Henson‘s famous vs non-famous faces dataset  Includes a manual with step-by-step instruction for analysis (homework ;-))  Download from SPM homepage (available for SPM5, but works fine with SPM8) 7Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS Introducing the Dataset  Factorial 2 x 2 design to investigate repetition suppression  Question: Influence of repeated stimulus presentation on brain activity (accomodation of response)?  Each stimulus (pictures of faces) presented twice during a session  Condition Rep, Level: 1 or 2  lag between presentations randomized  26 Famous and 26 non-famous faces to differentiate between familiarity (long-term memory) and repetition  Condition Fam, Level F(amous) and N(onfamous)  Task: Decision whether famous or nonfamous (button-press) 8Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS Introducing the Dataset: Published Results a.Right Fusiform face area  Repetition suppression for familiar/famous faces b.Left Occipital face area (posterior, occip. extrastriate)  Repetition suppression for familiar AND unfamiliar faces c.Posterior cingulate and bilateral parietal cortex  Repetition enhancement 9Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS Overview 10Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)  Introduction & Example Dataset  General fMRI Data Analysis Workflow with SPM  Quality Assessment of Raw Data  Spatial Preprocessing  Statistical Design: The General Linear Model  Results: Analyzing Contrast & Reporting  Within-Subject Batching (Single Subject)  Subject-independent Analysis Steps  Subject-independent Data Flow (Dependencies)  Subject-related data  Between-Subject-Batching (Multiple Subject)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS Spatial Preprocessing – Realign  sd 11Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11) FORMAT P = spm_realign (P,flags) GUI Batch Editor Batch File

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS Spatial Preprocessing – Unwarp 12Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11) uw_params= spm_uw_estimate (P,uw_est_flags); spm_uw_apply (uw_params,uw_write_ flags); GUI Batch Editor Batch File

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS Uh…this takes ages…  Now you can probably value the benefits of batch processing. If you are still keen on doing all that by hand (good exercise!), refer to the following  The SPM manual  Most current version in your spm8-folder, sub-folder man/manual.pdf  Rik Henson‘s famous vs non-famous faces dataset  Included in SPM manual, chapter 29, with step-by-step instruction for analysis  Available for SPM5, but works fine with SPM8 13Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS Overview 14Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)  Introduction & Example Dataset  General fMRI Data Analysis Workflow with SPM  Quality Assessment of Raw Data  Spatial Preprocessing  Statistical Design: The General Linear Model  Results: Analyzing Contrast & Reporting  Within-Subject Batching (Single Subject)  Subject-independent Analysis Steps  Subject-independent Data Flow (Dependencies)  Subject-related data  Between-Subject-Batching (Multiple Subject)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS General Workflow for the batch interface 15Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11) Top-down approach Specify subject-independent data/analysis steps Specify subject-independent file-dependencies (data flow) Specify subject-related data (e.g. event-timing)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS 1. The subject-independent analysis parts  Load all modules first (in right order!)  Then specify details (where Xs are found) which are subject independent  TR  Nslices  model factors  contrasts of interest 16Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS 2. Data-flow specification (subject-independent dependencies)  Specify, which results of which steps are input to another step (DEP-sign)  e.g. smoothed images needed for model spec  Afterwards save this job as template.mat file 17Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS 3. Add subject-dependent data/information  Essentially go to all X‘s and fill in appropriate values  e.g. the.mat-file of the conditions onsets/durations  Save this job as subject-batch file & Run 18Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS Overview 19Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)  Introduction & Example Dataset  General fMRI Data Analysis Workflow with SPM  Quality Assessment of Raw Data  Spatial Preprocessing  Statistical Design: The General Linear Model  Results: Analyzing Contrast & Reporting  Within-Subject Batching (Single Subject)  Subject-independent Analysis Steps  Subject-independent Data Flow (Dependencies)  Subject-related data  Between-Subject-Batching (Multiple Subject)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS Between-Subject-Batching (Multiple Subject) Make sure, parameters to be adjusted have an X (clear value) for the single subject template Specify a meta-job with Run batch Create one run for every subject and add missing parameter values (in right order) 20Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS Resources and Useful Literature  All step-by-step instructions can be found in the SPM manual, chapter 40  Also multiple-session and multiple subjects processing included  The SPM helpline/mailing list  E.g. bug precluding the batch-file selector form working was fixed here, but not in the updates yet bin/webadmin?A2=ind1001&L=SPM&P=R39357  Batch templates are in your spm path:  Configured subject-independent analysis steps /man/batch/face_single_subject_template_nodeps.m  With dependencies included /man/batch/face_single_subject_template.m  With multiple subjects /man/batch/face_multi_subject_template.m 21Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS Many, many thanks to  Klaas Enno Stephan  The SPM developers (FIL methods group) 22Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS Extending the batchfile with SPM GUI functions  Debugging  Generally a good idea to find out how things work in SPM  Crucial for batch-programming using a.m-file  Here: debug spm.m by setting a breakpoint  If called function found, use edit.m to look at the %comments in the file 23Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)

Z URICH SPM C OURSE 2011 B ATCH P ROGRAMMING OF F MRI D ATA A NALYSIS Tuning the engine – Matlab workspace variables  e.g. to manipulate SPM.mat or jobs by hand  also important during debugging, how variables are defined and changed 24Computational Neuroeconomics (Prof. Stephan, USZ) / MR-Technology (Prof. Prüssmann, IBT)‏Kasper/Mathys (18-Feb-11)