Bayesian inference Jean Daunizeau Wellcome Trust Centre for Neuroimaging 16 / 05 / 2008.
SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for...
Transcript of SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for...
![Page 1: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/1.jpg)
SPM Course
Zurich, February 2012
Statistical InferenceGuillaume Flandin
Wellcome Trust Centre for Neuroimaging
University College London
![Page 2: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/2.jpg)
Normalisation
Statistical Parametric MapImage time-series
Parameter estimates
General Linear ModelRealignment Smoothing
Design matrix
Anatomicalreference
Spatial filter
StatisticalInference
RFT
p <0.05
![Page 3: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/3.jpg)
A mass-univariate approach
Time
![Page 4: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/4.jpg)
Estimation of the parameters
= +𝜀𝛽
𝜀 𝑁 (0 ,𝜎 2 𝐼 )
��=(𝑋𝑇 𝑋 )−1 𝑋𝑇 𝑦
i.i.d. assumptions:
OLS estimates:
��1=3.9831
��2 −7={0.6871 ,1.9598 , 1.3902 , 166.1007 , 76.4770 ,− 64.8189 }
��8=131.0040
=
�� 2= ��𝑇 ��𝑁−𝑝�� 𝑁 (𝛽 ,𝜎2(𝑋𝑇 𝑋 )−1 )
![Page 5: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/5.jpg)
Contrasts A contrast selects a specific effect of interest.
A contrast is a vector of length .
is a linear combination of regression coefficients .
[1 0 0 0 0 0 0 0 0 0 0 0 0 0][0 1 -1 0 0 0 0 0 0 0 0 0 0 0]
𝑐𝑇 �� 𝑁 (𝑐𝑇 𝛽 ,𝜎2𝑐𝑇 (𝑋𝑇 𝑋 )−1𝑐 )
![Page 6: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/6.jpg)
Hypothesis Testing
Null Hypothesis H0
Typically what we want to disprove (no effect).
The Alternative Hypothesis HA expresses outcome of interest.
To test an hypothesis, we construct “test statistics”.
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
![Page 7: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/7.jpg)
Hypothesis Testing
p-value:
A p-value summarises evidence against H0.
This is the chance of observing value more extreme than t under the null hypothesis.
Null Distribution of T
Significance level α:
Acceptable false positive rate α.
threshold uα
Threshold uα controls the false positive rate
t
p-value
Null Distribution of T
u
Conclusion about the hypothesis:
We reject the null hypothesis in favour of the alternative hypothesis if t > uα
)|( 0HuTp
𝑝 (𝑇>𝑡∨𝐻0 )
![Page 8: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/8.jpg)
cT = 1 0 0 0 0 0 0 0
T =
contrast ofestimated
parameters
varianceestimate
box-car amplitude > 0 ?=
b1 = cTb> 0 ?
b1 b2 b3 b4 b5 ...
T-test - one dimensional contrasts – SPM{t}
Question:
Null hypothesis: H0: cTb=0 H0: cTb=0
Test statistic:
pNTT
T
T
T
tcXXc
c
c
cT
~ˆ
ˆ
)ˆvar(
ˆ
12
![Page 9: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/9.jpg)
T-contrast in SPM
con_???? image
Tc
ResMS image
pN
T
ˆˆ
ˆ 2
spmT_???? image
SPM{t}
For a given contrast c:
yXXX TT 1)(ˆ beta_???? images
![Page 10: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/10.jpg)
T-test: a simple example
Q: activation during listening ?
Q: activation during listening ?
cT = [ 1 0 0 0 0 0 0 0]
Null hypothesis:Null hypothesis: 01
Passive word listening versus rest
SPMresults:Height threshold T = 3.2057 {p<0.001}voxel-level
p uncorrectedT ( Zº)mm mm mm
13.94 Inf 0.000 -63 -27 15 12.04 Inf 0.000 -48 -33 12 11.82 Inf 0.000 -66 -21 6 13.72 Inf 0.000 57 -21 12 12.29 Inf 0.000 63 -12 -3 9.89 7.83 0.000 57 -39 6 7.39 6.36 0.000 36 -30 -15 6.84 5.99 0.000 51 0 48 6.36 5.65 0.000 -63 -54 -3 6.19 5.53 0.000 -30 -33 -18 5.96 5.36 0.000 36 -27 9 5.84 5.27 0.000 -45 42 9 5.44 4.97 0.000 48 27 24 5.32 4.87 0.000 36 -27 42
1
𝑡= 𝑐𝑇 ��
√var (𝑐𝑇 ��)
![Page 11: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/11.jpg)
T-test: summary
T-test is a signal-to-noise measure (ratio of estimate to standard deviation of estimate).
T-contrasts are simple combinations of the betas; the T-statistic does not depend on the scaling of the regressors or the scaling of the contrast.
H0: 0Tc vs HA: 0Tc
Alternative hypothesis:
![Page 12: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/12.jpg)
Scaling issue
The T-statistic does not depend on the scaling of the regressors.
cXXc
c
c
cT
TT
T
T
T
12ˆ
ˆ
)ˆvar(
ˆ
[1 1 1 1 ]
[1 1 1 ]
Be careful of the interpretation of the contrasts themselves (eg, for a second level analysis):
sum ≠ average
The T-statistic does not depend on the scaling of the contrast.
/ 4
/ 3
Tc
Sub
ject
1S
ubje
ct 5
Contrast depends on scaling.Tc
![Page 13: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/13.jpg)
F-test - the extra-sum-of-squares principle Model comparison:
Null Hypothesis H0: True model is X0 (reduced model)
Full model ?
X1 X0
or Reduced model?
X0 Test statistic: ratio of explained variability and unexplained variability (error)
1 = rank(X) – rank(X0)2 = N – rank(X)
RSS
2ˆ fullRSS0
2ˆreduced
![Page 14: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/14.jpg)
F-test - multidimensional contrasts – SPM{F} Tests multiple linear hypotheses:
0 0 0 1 0 0 0 0 00 0 0 0 1 0 0 0 00 0 0 0 0 1 0 0 00 0 0 0 0 0 1 0 00 0 0 0 0 0 0 1 00 0 0 0 0 0 0 0 1
cT =
H0: b4 = b5 = ... = b9 = 0
X1 (b4-9)X0
Full model? Reduced model?
H0: True model is X0
X0
test H0 : cTb = 0 ?
SPM{F6,322}
![Page 15: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/15.jpg)
F-contrast in SPM
ResMS image
pN
T
ˆˆ
ˆ 2
spmF_???? images
SPM{F}
ess_???? images
( RSS0 - RSS )
yXXX TT 1)(ˆ beta_???? images
![Page 16: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/16.jpg)
F-test example: movement related effects
Design matrix
2 4 6 8
10
20
30
40
50
60
70
80
contrast(s)
Design matrix2 4 6 8
1020304050607080
contrast(s)
![Page 17: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/17.jpg)
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.
0000
0100
0010
0001
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.
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:
0 : Hypothesis Null 3210 H
0 oneleast at : Hypothesis eAlternativ kAH
![Page 18: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/18.jpg)
Variability described by Variability described by
Orthogonal regressors
Variability in YTesting for Testing for
![Page 19: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/19.jpg)
Correlated regressorsV
aria
bilit
y de
scrib
ed b
y V
ariability described by
Shared variance
Variability in Y
![Page 20: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/20.jpg)
Correlated regressors
Var
iabi
lity
desc
ribed
by
Variability described by
Variability in Y
Testing for
![Page 21: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/21.jpg)
Correlated regressors
Var
iabi
lity
desc
ribed
by
Variability described by
Variability in Y
Testing for
![Page 22: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/22.jpg)
Correlated regressors
Var
iabi
lity
desc
ribed
by
Variability described by
Variability in Y
![Page 23: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/23.jpg)
Correlated regressors
Var
iabi
lity
desc
ribed
by
Variability described by
Variability in Y
Testing for
![Page 24: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/24.jpg)
Correlated regressors
Var
iabi
lity
desc
ribed
by
Variability described by
Variability in Y
Testing for
![Page 25: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/25.jpg)
Correlated regressors
Var
iabi
lity
desc
ribed
by
Variability described by
Variability in Y
Testing for and/or
![Page 26: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/26.jpg)
Design orthogonality
For each pair of columns of the design matrix, the orthogonality matrix depicts the magnitude of the cosine of the angle between them, with the range 0 to 1 mapped from white to black.
If both vectors have zero mean then the cosine of the angle between the vectors is the same as the correlation between the two variates.
![Page 27: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/27.jpg)
Correlated regressors: summary We implicitly test for an additional effect only. When testing for the
first regressor, we are effectively removing the part of the signal that can be accounted for by the second regressor: implicit orthogonalisation.
Orthogonalisation = decorrelation. Parameters and test on the non modified regressor change.Rarely solves the problem as it requires assumptions about which regressor to uniquely attribute the common variance. change regressors (i.e. design) instead, e.g. factorial designs. use F-tests to assess overall significance.
Original regressors may not matter: it’s the contrast you are testing which should be as decorrelated as possible from the rest of the design matrix
x1
x2
x1
x2
x1
x2x^
x^
2
1
2x^ = x2 – x1.x2 x1
![Page 28: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/28.jpg)
Design efficiency
1122 ))(ˆ(),,ˆ( cXXcXce TT
)ˆvar(
ˆ
T
T
c
cT The aim is to minimize the standard error of a t-contrast
(i.e. the denominator of a t-statistic).
cXXcc TTT 12 )(ˆ)ˆvar( This is equivalent to maximizing the efficiency e:
Noise variance Design variance
If we assume that the noise variance is independent of the specific design:
11 ))((),( cXXcXce TT
This is a relative measure: all we can really say is that one design is more efficient than another (for a given contrast).
![Page 29: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/29.jpg)
Design efficiencyA B
A+B
A-B
𝑋𝑇 𝑋=( 1 − 0.9− 0.9 1 )
High correlation between regressors leads to low sensitivity to each regressor alone.
We can still estimate efficiently the difference between them.
![Page 30: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/30.jpg)
Bibliography:
Statistical Parametric Mapping: The Analysis of Functional Brain Images. Elsevier, 2007.
Plane Answers to Complex Questions: The Theory of Linear Models. R. Christensen, Springer, 1996.
Statistical parametric maps in functional imaging: a general linear approach. K.J. Friston et al, Human Brain Mapping, 1995.
Ambiguous results in functional neuroimaging data analysis due to covariate correlation. A. Andrade et al., NeuroImage, 1999.
Estimating efficiency a priori: a comparison of blocked and randomized designs. A. Mechelli et al., NeuroImage, 2003.
![Page 31: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/31.jpg)
Estimability of a contrast
If X is not of full rank then we can have Xb1 = Xb2 with b1≠ b2 (different parameters).
The parameters are not therefore ‘unique’, ‘identifiable’ or ‘estimable’.
For such models, XTX is not invertible so we must resort to generalised inverses (SPM uses the pseudo-inverse).
1 0 11 0 11 0 11 0 10 1 10 1 10 1 10 1 1
One-way ANOVA(unpaired two-sample t-test)
Rank(X)=2
[1 0 0], [0 1 0], [0 0 1] are not estimable.[1 0 1], [0 1 1], [1 -1 0], [0.5 0.5 1] are estimable.
Example:
parameters
imag
es
Fact
or1
Fact
or2
Mea
n
parameter estimability(gray
® b not uniquely specified)
![Page 32: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/32.jpg)
Three models for the two-samples t-test
1 11 11 11 10 10 10 10 1
1 01 01 01 0 0 1 0 1 0 1 0 1
1 0 11 0 11 0 11 0 10 1 10 1 10 1 10 1 1
β1=y1
β2=y2
β1+β2=y1
β2=y2
[1 0].β = y1
[0 1].β = y2
[0 -1].β = y1-y2
[.5 .5].β = mean(y1,y2)
[1 1].β = y1
[0 1].β = y2
[1 0].β = y1-y2
[.5 1].β = mean(y1,y2)
β1+β3=y1
β2+β3=y2
[1 0 1].β = y1
[0 1 1].β = y2
[1 -1 0].β = y1-y2
[.5 0.5 1].β = mean(y1,y2)
![Page 33: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/33.jpg)
Multidimensional contrasts
Think of it as constructing 3 regressors from the 3 differences and complement this new design matrix such that data can be fitted in the same exact way (same error, same fitted data).
![Page 34: SPM Course Zurich, February 2012 Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London.](https://reader035.fdocuments.us/reader035/viewer/2022062219/5519e1945503467a178b47cd/html5/thumbnails/34.jpg)
Example: working memory
B: Jittering time between stimuli and response.
Stimulus Response Stimulus Response Stimulus ResponseA B C
Tim
e (s)
Tim
e (s)
Tim
e (s)
Correlation = -.65Efficiency ([1 0]) = 29
Correlation = +.33Efficiency ([1 0]) = 40
Correlation = -.24Efficiency ([1 0]) = 47
C: Requiring a response on a randomly half of trials.