1st level analysis - design matrix, contrasts & inference nico bunzeck, katya woollett
TRANSCRIPT
![Page 1: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/1.jpg)
1st level analysis - Design matrix, contrasts & inference
Nico Bunzeck,
Katya Woollett
![Page 2: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/2.jpg)
1st level data analysis in SPM5
• (i) Specification of the GLM design matrix, fMRI data files and filtering
• (ii) estimation of GLM parameters using classical or Bayesian approaches
• (iii) interrogation of results using contrast vectors to produce Statistical Parametric Maps (SPMs) or Posterior Probability Maps (PPMs)
![Page 3: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/3.jpg)
(i) fMRI model specification
![Page 4: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/4.jpg)
(i) fMRI model specification
- Timing parameters: to construct the design matrix
- Units for design: onset of the events or blocks (in sec or scans)
- Interscan interval: TR in sec; = time between acquiring a plane for one volume and the same plane in the next volume; constant
- Microtime resolution: (t) the number of time-bins per scan used when building the regressors (default = 16)
- Microtime onset: (t0) the first time-bin at which the regressors are resampled to coincide with data acquisition (default = 1)
![Page 5: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/5.jpg)
(i) fMRI model specification
- Data & Design matrix: defines the experimental design and the nature of the hypothesis testing
- matrix: organized in rows (each scans) and columns (for each effect of explanatory variable = regressor or stimulus function)
- can be replicated and/or manipulated for each subject/session
![Page 6: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/6.jpg)
(i) fMRI model specification
-Subjects/Session:
-Scans: select the images for the model that has to be estimated
![Page 7: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/7.jpg)
(i) fMRI model specification
- Condition: can be event-related, blocked design or a combination of both – they are modelled in the same way -> they are later convolved with a basis set
- Name: be creative
- Onset: specify the onsets for this condition
- Durations: default for events = 0; single number: SPM assumes that all trails have this duration (block)
for mix of blocks and events: number must match the number of onset times
![Page 8: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/8.jpg)
(i) fMRI model specification
- Multiple conditions:
- load all the conditions defined as *.mat
- it contains cell arrays: names, onsets and duration eg. Names{2}=‘finger tapping’, onsets{2}=[10 45 100], duration{2}=[0 0 0]
![Page 9: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/9.jpg)
(i) fMRI model specification
- Regressors: additional columns in the design matrix that may not be convolved with the HR, eg. movement parameters
- Name
- Value
- Multiple regressors: either *.mat or *.txt file that contains details of the multiple regressors; they will be named: R1, R2 … Rn
![Page 10: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/10.jpg)
(i) fMRI model specification
- High-pass filter cutoff: default = 128s
- slow signal drifts with a period longer than 128 will be removed
- removes confounds without estimating their parameters explicitly
![Page 11: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/11.jpg)
(i) fMRI model specification
- Factorial design: if you have a factorial design SPM automatically generate the contrasts that are necessary to test the main effects of interaction:
- F-contrasts: at within-subject level
- contrasts for second level analysis
- create as many factors as you need – name, levels (for each factor)
- for example: ‘Stimulus-Repetition’ – 3 levels
![Page 12: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/12.jpg)
(i) fMRI model specification
- Basis Functions:
- SPM uses basis functions to model the hemodynamic response; either 1 function or a set
- Canonical HRF: most common choice, default, easiest way to interpret the data
- Model derivatives: = ‘informed’ basis set -> covers variations in subject-to-subject and voxel-to-voxel responses: peak and width
![Page 13: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/13.jpg)
(i) fMRI model specification
- Model interactions: inputs (RT) convolved with the basis set
- Directory: where the SPM.mat file will be written
![Page 14: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/14.jpg)
(i) fMRI model specification
- Global normalization:
- estimating the ‘average within-brain fMRI signal’ (gns) over scans (n) and sessions (s)
- ‘Scaling’: SPM multiplies each value in scan and session by 100/(gns) eg. scaling over all sessions
- ‘none’: default, estimation of a ‘session specific grand mean value’ (gs) = fMRI signal over all voxels in a session; each fMRI data point in the session is multiplied by 100/(gs); eg. Session specific scaling
![Page 15: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/15.jpg)
(i) fMRI model specification
- Explicit masking: only those voxels in the brain mask will be analyzed
- speeds up the estimation
- restricts SPMs to within-mask voxels
- Serial correlations: due to aliased biorhythms and unmodelled neural activity
- SPM uses an autoregressive AR(1) model during Classical (ReML) parameter estimation
- but they can be ignored (‘none’) - Bayesion estimation
![Page 16: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/16.jpg)
(i) fMRI model specification
• What should be included in the model?
– Think about contrast/comparisons before the experiment
– The more information you have the better: the model represents the a priori ideas about how the experimental paradigm influences the measured signal
![Page 17: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/17.jpg)
(i) Review a specified model
![Page 18: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/18.jpg)
(i) Review a specified model
- Design matrix:
- 24 conditions/session
- last 2 columns model average activity in each session -> total of 50 regressors
- 191 fMRI scans/session -> 382 rows and 50 columns
![Page 19: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/19.jpg)
(i) Review a specified model
- Explore Sessions and regressors:
- time domain corresponding to the regressor (4 events)
- frequency domain corresponding to the regressor: experimental variance is not removed by high-pass filtering
- bottom: basis function = HRF
![Page 20: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/20.jpg)
- for which voxel does the model (or a explanatory variable) explain the observed variance??
- parameters are estimated for each voxel so that the error is minimized
- there are more than 1 variables -> it is unlikely that the betas exactly fit: SPM calculates different parameter-sets
- each parameter-set determines a fitted response:
(ii) fMRI model estimation
j
jLjLjjjY ~~~~2211
2)~
( jj
j YYS
jLjLjjjY 2211
- differs slightly from the observed Yj
- the algorithm minimizes the residuals
jY~
![Page 21: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/21.jpg)
(ii) fMRI model estimation
Fitting X to Y gives you one (parameter estimate) for each column of X and e. Betas provide information about the fit of the regressor X to the data, Y, in each voxel
![Page 22: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/22.jpg)
(ii) fMRI model estimation
![Page 23: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/23.jpg)
(ii) fMRI model estimation
- Select SPM.mat: -
- Method:
- “Classical”: applies Restricted Maximum Likelihood (ReML); for spatially smoothed images
- after estimation effects of parameters are tested by T and F-statistic -> SPM(T), SPM(F)
- “Bayesian 1st-level”: applies Variational Bayes (VB); images do not need to be spatially smoothed; takes long;
- results: contrasts identify regions with effects larger than a user-specified size, eg 1% of the global mean signal (Posterior Probability Map – PPM)
![Page 24: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/24.jpg)
(iii) Results
• Testing hypothesis• T-test: is there a significant increase or is there a significant
decrease in a specific contrast (between conditions) – directional• F-test: is there a significant difference between conditions in the
contrast - nondirectional
![Page 25: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/25.jpg)
(iii) Results
•Contrast-vector:c‘ = [-1 1 0 0 0 0 ]
H0: no difference between condition 1 and 2 in the 1st block
H1: there is a difference between condition 2 and 1 in the 1st block (condition 2 > condition 1)
654321ˆˆˆˆˆˆ Parameters:
T-statistics in the usual way: Comparison of betas to variance
cXXc
cT
12ˆ
ˆ
TT
T
T-Contrast:
Design matrix:
![Page 26: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/26.jpg)
(iii) Results
•Contrast-vector:c‘ = [-1 1 -1 1 0 0 ]
H0: no difference between condition 1 and 2 in the 1st and 2nd block
H1: there is a difference between condition 2 and 1 in the 1st and 2nd block (condition 2 > condition 1)
654321ˆˆˆˆˆˆ Parameters:
T-statistics in the usual way: Comparison of betas to variance
cXXc
cT
12ˆ
ˆ
TT
T
T-Contrast:
Design matrix:
![Page 27: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/27.jpg)
(iii) Results
•Contrast-vector:c‘ = [1 0 0 0 0 0 0; 0 1 0 0 0 0 0; 0 0 1 0 0 0 0; 0 0 0 1 0 0 0; 0 0 0 0 1 0 0]
H0: the factors 1, 2, 3 and 4 do not explain a significant amount of variance
H1:the factors 1, 2, 3 and 4 do explain a significant amount of variance:
654321ˆˆˆˆˆˆ Parameters:
F-Contrast:
Design matrix:
)(rank),(rank)(rank~
)(rank
)(rank)(rankxJXX
a
a
aF
xJS
XXSS
F
![Page 28: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/28.jpg)
(iii) Results
)(rank),(rank)(rank~
)(rank
)(rank)(rankxJXX
a
a
aF
xJS
XXSS
F
•Contrast-vector:c‘ = [1 0 0 0 0 0 0; 0 0 0 0 0 0 0; 0 0 0 0 0 0 0; 0 0 0 0 0 0 0; 0 0 0 0 0 0 0]
H0: the factor 1 does not explain a significant amount of variance
H1:the factor 1 does explain a significant amount of variance:
654321ˆˆˆˆˆˆ Parameters:
F-Contrast:
Design matrix:
![Page 29: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/29.jpg)
(iii) Results
Results: Glas-brain(maximum intensity projection (MIP))
List of activated
voxel
![Page 30: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/30.jpg)
(iii) Results
The multiple comparison problem• Voxel-level P: chance of finding
a voxel with this or a greater height (T or Z), corrected or uncorrected for search volume
• Uncorrected: Default: 0.001 -> 50.000 voxels = 50 false positives
• FWE: ‘family wise error’ is a false positive anywhere in the SPM
• controls any false positives• FDR: ‘false discovery rate’ –
controls the expected proportion of false positives among suprathresholded voxels -> it adapts to the amount of signal in the data
Results: Glas-brain(maximum intensity projection (MIP))
List of activated
voxel
![Page 31: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/31.jpg)
(iii) Results
Results: Glas-brain(maximum intensity projection (MIP))
List of activated
clusters
corrected
uncorrected
![Page 32: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/32.jpg)
(iii) Results
Results: Glas-brain(maximum intensity projection (MIP))
List of activated
clusters
corrected
uncorrected
• Cluster level (P): chance of finding a cluster with this many (ke) or a greater number of voxel, corrected or uncorrected for search volume
• Set-level (P): the chance of finding this (c) or a greater number of clusters in the search volume
![Page 33: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/33.jpg)
(iii) Results
Estimated effect sizes Fitted responses
Plotting responses
![Page 34: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/34.jpg)
(iii) Results
Overlaying the data
Slices Sections
![Page 35: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/35.jpg)
(iii) Results
Overlaying the data
Render
![Page 36: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/36.jpg)
Thanks for your attention.
![Page 37: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/37.jpg)
(ii) fMRI model estimation
- Bayesian 1st-level: applies Variational Bayes (VB); allows to specify spatial priors for regression coefficients and regularised voxel-wise AR(P) modelsfor fMRI noise prcesses
- images do not need to be spatially smoothed
- takes 5x longer than the classical approach
- results: contrasts identify regions with effects larger than a user-specified size, eg 1% of the global mean signal (Posterior Probability Map – PPM)
![Page 38: 1st level analysis - Design matrix, contrasts & inference Nico Bunzeck, Katya Woollett](https://reader035.vdocuments.mx/reader035/viewer/2022062223/551a9df55503466b3a8b5574/html5/thumbnails/38.jpg)
(ii) fMRI model estimation
J
j
L
l
JLJlJ
jLjlj
Ll
J
j
Y
Y
Y
11
1
1
11111
Matrix design
jLjLjjjY 2211
Graphical design
??