450 likes | 473 Views
Methods for Dummies Second level Analysis (for fMRI). Chris Hardy, Alex Fellows Expert: Guillaume Flandin. Overview of today’s talk. Recap of first level analysis What is second level analysis? Fixed vs. random effects How do we analyse random effects? Practical demonstration Questions.
E N D
Methods for DummiesSecond level Analysis (for fMRI) Chris Hardy, Alex Fellows Expert: Guillaume Flandin
Overview of today’s talk • Recap of first level analysis • What is second level analysis? • Fixed vs. random effects • How do we analyse random effects? • Practical demonstration • Questions
Overview of today’s talk • Recap of first level analysis • What is second level analysis? • Fixed vs. random effects • How do we analyse random effects? • Practical demonstration • Questions
1st Level Analysis is within subject ϵ fMRI scans Voxel time course β Y X + x = Time Time (e.g. TR = 3s)
SPM{t} fMRI data Design Matrix Contrast Images Subject 1 Subject 2 … Subject N
1st Level Analysis • Spatial preprocessing • Movement in scanner • Fitting to standard space (MNI) • Smoothing etc for statistical power
Overview of today’s talk • Recap of first level analysis • Second level analysis • Fixed vs. random effects • How do we analyse random effects? • Multiple conditions • Practical demonstration • Questions
Statistical parametric map (SPM) Design matrix Kernel Realignment Smoothing General linear model Gaussian field theory Statistical inference Normalisation p <0.05 Template Parameter estimates
2nd level analysis – across subjects • It isn’t enough to look just at individuals. • So, we need to look at which voxels are showing a significant activation difference between levels of X consistently within a group. • Average contrast effect across sample • Variation of this contrast effect • T-tests
Overview of today’s talk • Recap of first level analysis • What is second level analysis? • Fixed vs. random effects • How do we analyse random effects? • Practical demonstration • Questions
Fixed effects analysis • Each subject in an experiment repeats trials of each type many times. • The variation among the responses for each level of the design matrix (X) for a given subject gives us the within-subject variance, σw2. • So, if we take the group effect size as the mean of responses across our subjects and analyse it with respect to σw2.
Fixed effects analysis (FFX) Modelling all subjects at once Subject 1 Subject 2 Subject 3 … Subject N
Fixed effects analysis (FFX) Modelling all subjects at once • Simple model • Lots of degrees of freedom = +
Subject 1 For voxel v in the brain Effect size, c ~ 4 σw2 :0.9
Subject 2 For voxel v in the brain Effect size, c ~ 2 σw2 :1.3
Subject 12 For voxel v in the brain Effect size, c ~ 4 σw2 :0.7
Whole Group – FFX calculation • N subjects = 12 c = [4,3,2,5…] Within subject variability, σw2 = [0.9,1.2,1.5,0.5, …] • Mean group effect = 2.67 • Mean σw2= 1.04 • Standard Error Mean (SEM) =σw2 /(sqrt(N))=0.087 t=M/SEM = 30.69, p=10-16
Fixed effects analysis (FFX) Modelling all subjects at once • Large amount of data • Assumes common variance over subjects at each voxel = +
Random effects analysis (RFX) • Synonymous with ‘mixed effects models’. • Assumes our sample is a set of individuals taken at random from the population of interest. • To do this we need to consider the between subject variance, σb2, as well as σw2 – and estimate the likely variance of the population from which our sample is derived.
Interim summary: Fixed vs Random (from Poldrack, Mumford and Nichol’s ‘Handbook of fMRI analyses’)
“Mixed effects models should be used whenever data are grouped within certain levels of a population and inferences are to be applied to the entire population.” - Mumford and Poldrack (2007)
Overview of today’s talk • Recap of first level analysis • What is second level analysis? • Fixed vs. random effects • How do we analyse random effects? • Practical demonstration • Questions
Random effects analysis (RFX) - Methods • Hierarchical • Summary statistics approach
Methods for Random Effects Hierarchical • Most accurate method – gold standard • Set up a GLM containing parameters for the effects and variances at both the subject AND group levels, to all be estimated at the same time. • Estimates subject and group statistics via “iterative looping” • Computationally demanding
Methods for random effects Summary statistics • 1st level design for all subjects must be the SAME • Uses the same sample means as in the first level analysis • Gives exact same results as hierarchical model (when the within-subject variance is the same for all subjects) • Validity is undermined by presence of extreme outliers.
Whole Group – RFX Calculation • N subjects = 12 c = [4,3,2,5…] • Mean group effect = 2.67 • Mean σb2(SD) = 1.07 • Standard Error Mean (SEM) =σb2 /(sqrt(N))=0.31 t=M/SEM = 8.61, p=10-6
First level Second level Contrast Images fMRI data Design Matrix One-sample t-test @ second level Subject 1 … Subject N Generalisability, Random Effects & Population Inference. Holmes & Friston, NeuroImage,1998.
Robustness Summary statistics Hierarchical Model Mixed-effects and fMRI studies. Friston et al., NeuroImage, 2005.
Overview of today’s talk • Recap of first level analysis • What is second level analysis? • Fixed vs. random effects • How do we analyse random effects? • Practical demonstration • Questions
Set-up options • Directory • To write to • Design • Scans: select con.*img from 1st level • Several design options: • 1 sample t-test • 2 sample t-test • Paired t-test • Multiple regression • 1 way ANOVA • Full or flexible factorial
Set-up options • Covariates • Input covariates & nuisance variables here • 1 value per con*.img • Masking • Specifies voxels within image which are to be assessed • Implicit is default
(scroll down…) (For PET only) Specify 2nd level Set-Up ↓ Save 2nd level Set-Up ↓ Run analysis ↓ Look at the RESULTS
e.g. 2nd level 1-sample t-test • Select t-contrast • Define new contrast • c = +1 (e.g. A>B) • c = -1 (e.g. B>A)
Select options for displaying results: • Correct for multiple comparisons – FWE/FDR.
Summary • For fMRI data, usually preferable to use RFX analysis, not FFX • Hierarchical models provide gold standard for RFX , BUT computationally intensive • Summary statistics = robust method for RFX group analysis
Overview of today’s talk • Recap of first level analysis • What is second level analysis? • Fixed vs. random effects • How do we analyse random effects? • Practical demonstration • Questions
Resources Previous MfD slides (Bex Bond and Samira Kazan) (Camilla Clark and Cat Slattery) Slides from Guillaume Flandin’s talk in Zurich, Feb 2014 Mumford, J. A., & Poldrack, R. A. (2007). Modeling group fMRI data. Social cognitive and affective neuroscience, 2(3), 251-257. Friston, K. J., Stephan, K. E., Lund, T. E., Morcom, A., & Kiebel, S. (2005). Mixed-effects and fMRI studies. Neuroimage, 24(1), 244-252.