Download presentation
Presentation is loading. Please wait.
Published byHanne Bendtsen Modified over 6 years ago
1
Basics of fMRI Analysis: Preprocessing, First-Level Analysis, and Group Analysis
thanks to doug greve for designing this talk and making these slides!
2
Overview Neuroanatomy 101 and fMRI Contrast Mechanism Preprocessing
Hemodynamic Response “Univariate” GLM Analysis Hypothesis Testing Group Analysis (Random, Mixed, Fixed)
3
Visual Activation Paradigm
Flickering Checkerboard Visual, Auditory, Motor, Tactile, Pain, Perceptual, Recognition, Memory, Emotion, Reward/Punishment, Olfactory, Taste, Gastral, Gambling, Economic, Acupuncture, Meditation, The Pepsi Challenge, … Scientific Clinical Pharmaceutical
4
Magnetic Resonance Imaging
MPRAGE is typically 1 mm voxels, EPI typically 3 mm voxels, different distortions, contrast doesn’t match T1-weighted Contrast BOLD-weighted Contrast
5
Blood Oxygen Level Dependent (BOLD)
Neurons Deoxygenated Hemoglobin (ParaMagnetic) Oxygenated Hemoglobin (DiaMagnetic) Lungs Contrast Agent Oxygen CO2
6
4D Volume 3 sec TR, 15 s on, 15 s off, 8 blocks 85×1 64×64×35
7
fMRI Analysis Overview
Subject 1 Preprocessing MC, STC, B0 Smoothing Normalization First Level GLM Analysis Raw Data C X Subject 2 Preprocessing MC, STC, B0 Smoothing Normalization First Level GLM Analysis Raw Data C X Higher Level GLM Subject 3 C X Preprocessing MC, STC, B0 Smoothing Normalization First Level GLM Analysis Raw Data C X Subject 4 Preprocessing MC, STC, B0 Smoothing Normalization First Level GLM Analysis Raw Data C X
8
Preprocessing Assures that assumptions of the analysis are met
Time course comes from a single location Uniformly spaced in time Spatial “smoothness” vs Analysis – separating signal from noise
9
Preprocessing Start with a 4D data set Motion Correction
Slice-Timing Correction B0 Distortion Correction Spatial Normalization Spatial Smoothing End with a 4D data set Can be done in other orders Not everything is always done
10
Motion Analysis assumes that time course represents a
value from a single location Subjects move Shifts can cause noise, uncertainty Edge of the brain and tissue boundaries
11
Motion and Motion Correction
Raw Corrected Motion correction reduces motion Not perfect
12
Motion Correction Motion correction parameters Six for each time point
Sometimes used as nuisance regressors How much motion is too much?
13
Slice Timing Volume not acquired all at one time
Ascending Interleaved Volume not acquired all at one time Acquired slice-by-slice Each slice has a different delay
14
Effect of Slice Delay on Time Course
Volume = 30 slices TR = 2 sec Time for each slice = 2/30 = 66.7 ms 2s 0s Can be corrected, but you must know the slice timing!
15
B0 Distortion Metric (stretching or compressing) Intensity Dropout
A result of a long readout needed to get an entire slice in a single shot. Caused by B0 Inhomogeneity
16
B0 Map: Voxel Shift Map Units are voxels (3.5 mm) Shift is in-plane
Blue = PA, Red AP Regions affected near air/tissue boundaries (eg, sinuses)
17
B0 Distortion Correction
Can only fix metric distortion Dropout is lost forever
18
B0 Distortion Correction
Can only fix metric distortion Dropout is lost forever Need: Special acquisition “Echo spacing” – readout time Phase encode direction More important for surface than for volume
19
Spatial Normalization
Transform volume into another volume (or surface) New volume is an “atlas” space Align brains of different subjects so that a given voxel represents the “same” location. Preparation for comparing across subjects Not always done in preprocessing (FSL) MNI305 Subject 1 MNI305 Subject 1 Native
20
Spatial Smoothing Replace voxel value with a weighted average of nearby voxels (spatial convolution) Weighting is usually Gaussian 3D (volume) 2D (surface) Do after all interpolation, before computing a standard deviation Similar to interpolation Improves SNR Improves intersubject registration Can have a dramatic effect on your results
21
Spatial Smoothing Spatially convolve image with Gaussian kernel.
Kernel sums to 1 Full-Width/Half-max: FWHM = s/sqrt(log(256)) s = standard deviation of the Gaussian 0 FWHM 5 FWHM 10 FWHM Full-Width/Half-max Full Max 2mm FWHM Half Max 5mm FWHM 10mm FWHM
22
Spatial Smoothing
23
Effect of Smoothing on Activation
Working memory paradigm FWHM: 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 mm
24
Volume- vs Surface-based Smoothing
14mm FWHM 5 mm apart in 3D 25 mm apart on surface Averaging with other tissue types (WM, CSF) Averaging with other functional areas
25
Preprocessing Start with a 4D data set
Motion Correction - Interpolation Slice-Timing Correction B0 Distortion Correction - Interpolation Spatial Normalization - Interpolation Spatial Smoothing – Interpolation-like End with a 4D data set Can be done in other orders Not all are done
26
fMRI Time-Series Analysis
27
fMRI Analysis Overview
Subject 1 Preprocessing MC, STC, B0 Smoothing Normalization First Level GLM Analysis Raw Data C X Subject 2 Preprocessing MC, STC, B0 Smoothing Normalization First Level GLM Analysis Raw Data C X Higher Level GLM Subject 3 C X Preprocessing MC, STC, B0 Smoothing Normalization First Level GLM Analysis Raw Data C X Subject 4 Preprocessing MC, STC, B0 Smoothing Normalization First Level GLM Analysis Raw Data C X
28
Visual/Auditory/Motor Activation Paradigm
15 sec ‘ON’, 15 sec ‘OFF’ Flickering Checkerboard Auditory Tone Finger Tapping
29
Block Design: 15s Off, 15s On Stimulus Schedule Paradigm File Voxel 1
29
30
Temporal Correlation Between Paradigm and Raw Time Course
Voxel 1 Amplitude of correlation (b) related to amount of neural activation (hopefully)
31
Hypotheses and Contrasts
Hypothesis: the neural activity during the ON Block is greater than, less than, or simply different than that during the OFF Bock. Null Hypothesis (H0): neural activity is the same during ON and OFF Blocks. Statistical Test: bON != bOFF bON - bOFF = 0 “Contrast” Voxel 1 31
32
Contrasts and Inference
Voxel 1 H0: Contrast = 0 P-value is probability that H0 is true (computed from t) If probability is very low, then “Reject” H0 declare a positive Voxel 1: p = 10 −11, sig = −log10(p) =11 (repeat for every voxel) Note: z, t, F monotonic with p 32
33
Statistical Parametric Map (SPM)
+3% 0% -3% H0 Significance t-Map (p,z,F) (Thresholded p<0.01) sig = −log10(p) Contrast Amplitude bON - bOFF CON, COPE, CES Variance of Contrast (Error Bars) VARCOPE, CESVAR “Massive Univariate Analysis” -- Analyze each voxel separately
34
Hemodynamics Delay Dispersion Grouping by simple time point inaccurate
35
Hemodynamic Response Function (HRF)
Time-to-Peak (~6sec) Amplitude b Dispersion TR (~2sec) Equilibrium (~16-32sec) Undershoot Delay (~1-2sec) Amplitude b related to the amount of neural firing
36
Convolution Stimulus with HRF
Shifts, rolls off; more accurate Loose ability to simply group time points More complicated analysis General Linear Model (GLM)
37
GLM = bTask + bbase bbase=boff bTask=bon-boff Implicit Contrast
Data fom one voxel Baseline Offset (Nuisance) Task = bTask + bbase bbase=boff bTask=bon-boff Implicit Contrast HRF Amplitude
38
Matrix Model y = X * b bTask bbase Observations = Vector of Regression
Coefficients (“Betas”) Design Matrix Design Matrix Regressors Data from one voxel
39
Two Task Conditions y = X * b bOdd bEven bbase Observations =
Design Matrix Design Matrix Regressors Data from one voxel
40
First Level Design Every stimulus type gets a column in the design matrix Every stimulus type gets a regression coefficient (b) b related to neural firing Contrasts created by adding/subtracting bs “Nuisance” factors can be added as more columns Low frequency drifts (DCT, polynomial) Motion correction regressors Physiological (eg, pulse and respiration) CSF or WM waveforms Functional Connectivity waveforms added as a column All factors get a column and a regression coefficient
41
Time Series Analysis Summary
Correlational Design Matrix (HRF shape) Estimate HRF amplitude (Parameters) Contrasts to test hypotheses Results at each voxel: Contrast Value Contrast Value Variance p-value Pass Contrast Value and Variance up to higher level analyses
42
fMRI Group Analysis
43
fMRI Analysis Overview
Higher Level GLM First Level GLM Analysis Subject 3 Subject 4 Subject 1 Subject 2 C X Preprocessing MC, STC, B0 Smoothing Normalization Raw Data
44
Overview Spatial Normalization Goal of Group Analysis
Types of Group Analysis Random Effects, Mixed Effects, Fixed Effects Multi-Level General Linear Model (GLM)
45
Spatial Normalization
Transform fMRI data to an Atlas Space where it can be compared voxel-by-voxel across subjects Multi-step procedure: Register fMRI to anatomical Register anatomical to atlas space Transform fMRI to atlas space Merge data Volume and/or Surface atlas spaces 45
46
Step 1 (vol and surf): Register fMRI with Anatomical
Native Anatomical Space (vol and surf) Native Functional Space Rigid Registration R bbregister fMRI in Anatomical Space 46
47
Step 2 (vol): Register Anatomical with MNI305 (Talairach)
Native Anatomical Space MNI305 Space X recon-all talairach.xfm Anatomical in MNI305 Space 47
48
Step 3 (vol): Combine Steps 1 and 2
Native Anatomical Space Native Functional Space MNI305 Space X R recon-all (or CVS) bbregister fMRI in MNI305 Space 48
49
Step 4 (vol): Merge Subjects
Native Functional } MNI305 X1 R1 Subject 1 X2 R2 Can be compared Voxel-for-voxel Subject 2 X3 R3 Subject 3 … 49
50
Step 2 (surf): Register Anatomical with Surface Atlas (fsaverage)
Native Anatomical Surface Space Surface-based Registration fsaverage Space S recon-all Anatomical Surface in fsaverage Space 50
51
Step 3 (surf): Combine Steps 1 and 2
Native Anatomical Space Native Functional Space fsaverage Space S R recon-all bbregister fMRI in fsaverage Space 51
52
Step 4 (surf): Merge Subjects
} Native Functional fsaverage S1 R1 Subject 1 S2 R2 Can be compared Voxel-for-voxel Subject 2 S3 R3 Subject 3 … 52
53
Purpose of Group Analysis
Subject 1 Subject 2 Subject 3 Subject 4 Subject 5 Is Pattern Repeatable Across Subject?
54
Group Analysis Does not have to be all positive!
Contrast Amplitudes Variances (Error Bars) Contrast Amplitudes
55
“Random Effects (RFx)” Analysis
56
“Random Effects (RFx)” Analysis
Model Subjects as a Random Effect Variance comes from a single source: variance across subjects Mean at the population mean Variance of the population variance Does not take first-level noise into account (assumes 0) “Ordinary” Least Squares (OLS) Usually less activation than individuals RFx
57
fMRI Analysis Overview
Higher Level GLM First Level GLM Analysis Subject 3 Subject 4 Subject 1 Subject 2 C1 X1 Preprocessing MC, STC, B0 Smoothing Normalization Raw Data CG XG
58
Higher Level GLM Analysis
y = X * b 1 bG Vector of Regression Coefficients (“Betas”) (Low-Level Contrasts) Observations = Contrast Matrix: C = [1] Contrast = C*b = bG Design Matrix (Regressors) Data from one voxel One-Sample Group Mean (OSGM)
59
Summary Preprocessing – MC, STC, B0, Normalize, Smooth
First Level GLM Analysis – Design matrix, HRF, Nuisance Contrasts, Hypothesis Testing – contrast matrix Group Analysis Random (Mixed, Fixed) Effects Multi-level GLM (Design and Contrast Matrices)
60
End of Presentation 60
61
For those interested in the math …
62
Slice Timing Correction
TR1 TR2 TR3 X Temporal interpolation of adjacent time points Usually sinc interpolation Each slice gets a different interpolation Some slices might not have any interpolation Can also be done in the GLM You must know the slice order!
63
B0 Map Phase Magnitude Echo 1 TE1 Echo 2 TE2
64
Neuroanatomy Gray matter White matter Cerebrospinal Fluid
65
Functional Anatomy/Brain Mapping
66
Functional MRI (fMRI) Sample BOLD response in 4D
Localized Neural Firing Increased Blood Flow Stimulus BOLD Changes Sample BOLD response in 4D Space (3D) – voxels (64×64×35, 3×3×5 mm3, ~50,000) Time (1D) – time points (100, 2 sec) – Movie Time 3 … Time 1 Time 2
67
Working Memory Task (fBIRN)
Images Stick Figs “Scrambled” Encode Distractor Probe 16s 0. “Scrambled” – low-level baseline, no response 1. Encode – series of passively viewed stick figures, Distractor – respond if there is a face 2. Emotional 3. Neutral Probe – series of two stick figures (forced choice) 4. following Emotional Distractor 5. following Neutral Distractor three CATEGORIES that are divvied up into five DISTINCT TASK CONDITIONS fBIRN: Functional Biomedical Research Network ( 67
68
Five Task Conditions y = X * b bEncode bEmotDist bNeutDist bEmotProbe
bNeutProbe =
69
GLM Solution y = X * b = Set of simultaneous equations
Each row of X is an equation Each column of X is an unknown bs are unknown 142 time points (Equations) 5 Unknowns bEncode bEmotDist bNeutDist bEmotProbe bNeutProbe = can also include nuisance regressors (e.g., motion parameters)
70
Estimates of the HRF Amplitude
bEncode bEmotDist bNeutDist bEmotProbe bNeutProbe =
71
Hypotheses and Contrasts
Which voxels respond more/less/differently to the Emotional Distractor than to the Neutral Distractor? Contrast: Assign Weights to each Beta
72
Hypotheses Which voxels respond more to the Emotional Distractor than to the Neutral Distractor? Which voxels respond to Encode (relative to baseline)? Which voxels respond to the Emotional Distractor? Which voxels respond to either Distractor? Which voxels respond more to the Probe following the Emotional Distractor than to the Probe following the Neutral Distractor?
73
Condition: 1 2 3 4 5 Weight 0 +1 -1 0 0 Contrast Matrix
Which voxels respond more to the Emotional Distractor than to the Neutral Distractor? 1. Encode 2. EDist 3. NDist 4. EProbe 5. NProbe Only interested in Emotional and Neutral Distractors No statement about other conditions Condition: Weight Contrast Matrix C = [ ]
74
First Level GLM Outputs
+3% 0% -3% Significance t-Map (p,z,F) (Thresholded p<0.01) sig= −log10(p) Contrast Amplitude CON, COPE, CES Contrast Amplitude Variance (Error Bars) VARCOPE, CESVAR
75
Spatial Normalization: Volume
Native Space MNI305 Space Subject 1 Subject 1 MNI305 MNI152 Subject 2 Subject 2 Affine (12 DOF) Registration
76
Spatial Normalization: Surface
Subject 1 Subject 2 (Before) Shift, Rotate, Stretch High dimensional (~500k) Preserve metric properties Take variance into account Common space for group analysis (like Talairach) Subject 2 (After)
77
“Mixed Effects (MFx)” Analysis
RFx Down-weight each subject based on variance. Weighted Least Squares (vs. “Ordinary” LS)
78
“Mixed Effects (MFx)” Analysis
Down-weight each subject based on variance. Weighted Least Squares (vs. “Ordinary” LS) Protects against unequal variances across group or groups (“heteroskedasticity”) May increase or decrease significance with respect to simple Random Effects More complicated to compute “Pseudo-MFx” – simply weight by first-level variance (easier to compute) MFx hetero-skedas-ticity
79
“Fixed Effects (FFx)” Analysis
RFx
80
“Fixed Effects (FFx)” Analysis
As if all subjects treated as a single subject (fixed effect) Small error bars (with respect to RFx) Large DOF Same mean as RFx Huge areas of activation Not generalizable beyond sample. FFx
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.