03_MEEG_GLMx - Wellcome Trust Centre for Neuroimaging

advertisement
General Linear Model
&
Classical Inference
Guillaume Flandin
Wellcome Trust Centre for Neuroimaging
University College London
SPM M/EEGCourse
London, May 2013
š‘¦=š‘‹
Preprocessings
š›½+šœ€
General
Linear
Model
š›½ = š‘‹š‘‡ š‘‹
−1
Random
Contrast c Field Theory
Statistical
Inference
š‘‹š‘‡ š‘¦
š‘‡šœ€
šœ€
šœŽ2 =
š‘Ÿš‘Žš‘›š‘˜(š‘‹)
š‘†š‘ƒš‘€{š‘‡, š¹}
time
frequency
mm
1D time
time
mm
Statistical Parametric Maps
mm
mm
time
2D+t
scalp-time
2D time-frequency
mm
3D M/EEG source
reconstruction,
fMRI, VBM
ERP example
ļ± Random presentation of
‘faces’ and ‘scrambled faces’
ļ± 70 trials of each type
ļ± 128 EEG channels
Question:
is there a difference between the ERP of
‘faces’ and ‘scrambled faces’?
ERP example: channel B9
Focus on N170
tļ€½
ļ­f ļ€­ ļ­s
ļ€©
ļ³ 2 ļƒ¦ļƒ§ 1n ļ€« 1n ļƒ¶ļƒ·
sļƒø
ļƒØ f
compares size of effect to its error
standard deviation
Data modelling
Data
Faces
= b1
Y
=
b1 • X1
Scrambled
+ b2
+ b2
+
• X2
+
ļ„
Design matrix
b1
=
Y
=
b2
X
• b
+
+
ļ„
General Linear Model
p
1
1
1
b
p
y
N
=
N
X
y ļ€½ Xb ļ€« e
e ~ N (0,ļ³ I )
2
+
N
e
Model is specified by
1. Design matrix X
2. Assumptions about e
N: number of scans
p: number of
regressors
The design matrix embodies all available knowledge about
experimentally controlled factors and potential confounds.
GLM: a flexible framework for parametric analyses
•
•
•
•
•
•
•
•
one sample t-test
two sample t-test
paired t-test
Analysis of Variance
(ANOVA)
Analysis of Covariance
(ANCoVA)
correlation
linear regression
multiple regression
Parameter estimation
b1
=
Y
b2
X
y ļ€½ Xb ļ€« e
Objective:
estimate
parameters to
minimize
N
ļƒ„e
t ļ€½1
+
eˆ
Ordinary least
squares estimation
(OLS) (assuming i.i.d.
error):
bˆ ļ€½ ( X T X )ļ€­1 X T y
2
t
Mass-univariate analysis: voxel-wise GLM
Evoked response image
Time
Sensor to voxel
transform
1. Transform data for all subjects and conditions
2. SPM: Analyse data at each voxel
Hypothesis Testing
To test an hypothesis, we construct “test statistics”.
ļ± Null Hypothesis H0
Typically what we want to disprove (no effect).
ļƒ° The Alternative Hypothesis HA expresses outcome of interest.
ļ± Test Statistic T
The test statistic summarises evidence
about H0.
Typically, test statistic is small in
magnitude when the hypothesis H0 is true
and large when false.
ļƒ° We need to know the distribution of T
under the null hypothesis.
Null Distribution of T
Hypothesis Testing
uļ”
ļ± Significance level α:
Acceptable false positive rate α.
ļƒ° threshold uα
Threshold uα controls the false positive rate
ļ”
ļ” ļ€½ p(T ļ€¾ uļ” | H0 )
Null Distribution of T
ļ± Conclusion about the hypothesis:
We reject the null hypothesis in favour of the
alternative hypothesis if t > uα
ļ± p-value:
A p-value summarises evidence against H0.
This is the chance of observing value more
extreme than t under the null hypothesis.
š‘ š‘‡ > š‘”|š»0
t
p-value
Null Distribution of T
Contrast & t-test
Contrast : specifies linear combination of
parameter vector: c T b
SPM-t over time
& space
cT = -1 +1
ERP: faces < scrambled ?
=
bˆ1 ļ€¼ bˆ2?
ļ€­ 1bˆ1 ļ€« 1bˆ2 ļ€¾ 0?
T
Test H0: c bˆ ļ€¾ 0?
contrast of
estimated
parameters
t=
variance
estimate
Tļ€½
cT bˆ
ļ³ˆ 2 cT ļ€ØX T X ļ€© c
ļ€­1
~ tN ļ€­ p
T-test: summary
ļ± T-test is a signal-to-noise measure (ratio of estimate to
standard deviation of estimate).
ļ± Alternative hypothesis:
H0: cT b ļ€½ 0
vs
HA: cT b ļ€¾ 0
ļ± T-contrasts are simple combinations of the betas; the Tstatistic does not depend on the scaling of the regressors
or the scaling of the contrast.
Extra-sum-of-squares & F-test
Model comparison: Full vs. Reduced model?
Null Hypothesis H0: True model is X0 (reduced model)
X0
X1
X0
RSS
2
ˆ
ļ„
ļƒ„ full
Test statistic: ratio of
explained and unexplained
variability (error)
RSS0
2
ˆ
ļ„
ļƒ„ reduced
RSS 0 ļ€­ RSS
Fļ‚µ
RSS
ESS
Fļ‚µ
~ Fļ® 1 ,ļ® 2
RSS
Full model ?
Or reduced model?
ļ®1 = rank(X) – rank(X0)
ļ®2 = N – rank(X)
F-test & multidimensional contrasts
Tests multiple linear hypotheses:
H0: True model is X0
X0
X1 (b3-4)
X0
Full or reduced model?
H 0 : b3 = b4 = 0
cT = 0 0 1 0
0001
test H0 : cTb = 0 ?
F-test: summary
ļ± F-tests can be viewed as testing for the additional variance
explained by a larger model wrt a simpler (nested) model ļƒ°
model comparison.
ļ± F tests a weighted sum of squares of one or several
combinations of the regression coefficients b.
ļ± In practice, we don’t have to explicitly separate X into [X1X2]
thanks to multidimensional contrasts.
ļ± Hypotheses:
ļƒ©1
ļƒŖ0
ļƒŖ
ļƒŖ0
ļƒŖ
ļƒ«0
0
1
0
0
0
0
1
0
0ļƒ¹
0ļƒŗļƒŗ
0ļƒŗ
ļƒŗ
0ļƒ»
Null HypothesisH0 : b1 ļ€½ b2 ļ€½ b3 ļ€½ 0
Alternative HypothesisH A : at least one bk ļ‚¹ 0
ļ± In testing uni-dimensional contrast with an F-test, for example
b1 – b2, the result will be the same as testing b2 – b1. It will be
exactly the square of the t-test, testing for both positive and
negative effects.
Orthogonal regressors
Variability described by š‘‹1
Testing for š‘‹1
Variability described by š‘‹2
Testing for š‘‹2
Variability in Y
Correlated regressors
Variability described by
Variability described by
Shared variance
Variability in Y
Correlated regressors
Variability described by
Variability described by
Testing for š‘‹1
Variability in Y
Correlated regressors
Variability described by
Variability described by
Testing for š‘‹2
Variability in Y
Variability described by
Variability described by
Correlated regressors
Variability in Y
Correlated regressors
Variability described by
Variability described by
Testing for š‘‹1
Variability in Y
Correlated regressors
Variability described by
Variability described by
Testing for š‘‹2
Variability in Y
Correlated regressors
Variability described by
Variability described by
Testing for š‘‹1 and/or š‘‹2
Variability in Y
Summary
ļ± Mass-univariate GLM:
– Fit GLMs with design matrix, X, to data at different points in
space to estimate local effect sizes, b
– GLM is a very general approach
(one-sample, two-sample, paired t-tests, ANCOVAs, …)
ļ± Hypothesis testing framework
– Contrasts
– t-tests
– F-tests
Multiple covariance components
Ci ļ€½ ļ³ V
2
i
enhanced noise model at voxel i
ei ~ N (0, Ci )
V ļ€½ ļƒ„ ļ¬ jQ j
error covariance components Q
and hyperparameters ļ¬
V
= ļ¬1
Q1
+ ļ¬2
Q2
Estimation of hyperparameters ļ¬ with ReML (Restricted Maximum Likelihood).
Weighted Least Squares (WLS)
T ļ€­1
ļ€­1 T ļ€­1
ˆ
b ļ€½ (X V X ) X V y
W W ļ€½V
T
Let
ļ€­1
Then
T
T
ļ€­1 T
T
ˆ
b ļ€½ ( X W WX ) X W Wy
T
ļ€­1
T
ˆ
b ļ€½ (X X ) X y
s
s
s
where
X s ļ€½ WX , ys ļ€½ Wy
s
WLS equivalent to
OLS on whitened
data and design
Modelling the measured data
Why?
How?
Make inferences about effects of
interest
1. Decompose data into effects and
error
2. Form statistic using estimates of
effects and error
stimulus
function
data
linear
model
effects
estimate
error
estimate
statistic
Download