# 03_Contrasts - Wellcome Trust Centre for Neuroimaging

```Statistical Inference
Guillaume Flandin
Wellcome Trust Centre for Neuroimaging
University College London
SPM Course
London, May 2010
Image time-series
Realignment
Spatial filter
Design matrix
Smoothing
General Linear Model
Statistical Parametric Map
Statistical
Inference
Normalisation
Anatomical
reference Parameter estimates
RFT
p <0.05
Voxel-wise time series analysis
Model
specification
Time
Parameter
estimation
Hypothesis
Statistic
BOLD signal
single voxel
time series
SPM
Overview
 Model specification and parameters estimation
 Hypothesis testing
 Contrasts
 T-tests
 F-tests
 Contrast estimability
 Correlation between regressors
 Example(s)
 Design efficiency
Model Specification: The General Linear Model
1
p
1
1

y
N
= X
N
p
+

N
N: number of scans, p: number of regressors
Sphericity assumption:
Independent and identically
distributed (i.i.d.) error terms
Parameter Estimation: Ordinary Least Squares

Find ˆ
that minimises
y  X
2
 
T
 The Ordinary Least Estimates are:
ˆ  ( X T X ) 1 X T y
 Under i.i.d. assumptions, the Ordinary Least Squares estimates are
Maximum Likelihood.
 ~ N (0,  I )
2
ˆ 
2
T
ˆ
 ˆ
N  p
Y ~ N ( X , I )
2
2
T
1
ˆ
 ~ N ( , ( X X ) )
Hypothesis Testing
To test an hypothesis, we construct “test statistics”.
 The Null Hypothesis H0
Typically what we want to disprove (no effect).
 The Alternative Hypothesis HA expresses outcome of interest.
 The Test Statistic T
The test statistic summarises evidence
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  | H 0 )
Observation of test statistic t, a realisation of T
 The 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.
p (T  t | H 0 )
Null Distribution of T
t
P-val
Null Distribution of T
Contrasts
 We are usually not interested in the whole β vector.
 A contrast selects a specific effect of interest:
 a contrast c is a vector of length p.
 cTβ is a linear combination of regression coefficients β.
cT = [1 0 0 0 0 …]
cTβ = 1x1 + 0x2 + 0x3 + 0x4 + 0x5 + . . .
cT = [0 -1 1 0 0 …]
cTβ = 0x1 + -1x2 + 1x3 + 0x4 + 0x5 + . . .
 Under i.i.d assumptions:
T
2 T
T
1
ˆ
c  ~ N (c  ,  c ( X X ) c )
T
T-test - one dimensional contrasts – SPM{t}
cT
=10000000
1 2 3 4 5 ...
Question:
box-car amplitude > 0 ?
=
1 = c T > 0 ?
H0: cT=0
Null hypothesis:
contrast of
estimated
parameters
T=
variance
estimate
Test statistic:
T 
T
c ˆ
T
var( c ˆ )
T
c ˆ

ˆ c
2
T
X
T
X

1
~ tN  p
c
T-contrast in SPM
 For a given contrast c:
ResMS image
beta_???? images
ˆ  ( X T X ) 1 X T y
con_???? image
c T ˆ
2
ˆ 
T
ˆ ˆ
N  p
spmT_???? image
SPM{t}
T-test: a simple example
 Passive word listening versus rest
cT = [ 1
Q: activation during
listening ?
1
0 ]
10
Null hypothesis: 1
X
20
30
0
Statistics:
40
c ˆ
t
T ˆ
Std (c  )
T
50
60
70
80
0.5
1
1.5
Design matrix
2
2.5
set-level
p
c
0.000 10
SPMresults:
Height threshold T = 3.2057 {p<0.001}
voxel-level
mm mm mm
( Z)
T
p uncorrected
p-values adjusted for search volume
13.94
Inf 0.000
voxel-level
12.04
Infp 0.000
FWE-corr p FDR-corr T
11.82
Inf 0.000
0.000
520
0.000
0.000 13.94
13.72
Inf0.000
0.000
0.000
0.000 12.04
0.0000.000
0.000 11.82
12.29
Inf
0.000
426
0.000
0.000 13.72
9.89
7.830.000
0.000
0.000
0.000 12.29
7.39 6.360.0000.000
0.000
9.89
0.000
35
0.000
0.000
0.000
7.39
6.84
5.99
0.000
0.000
9
0.000
0.000
0.000
6.84
0.002 6.36
3
0.024
0.001
0.000
5.65 0.000 6.36
0.000
8
0.001
0.001
0.000
6.19
5.530.0030.000
0.000 6.19
9
0.000
0.000
5.96
0.005 5.96
2
0.058
0.000
5.84
5.360.0040.000
0.015
1
0.166
0.000
5.44
5.270.022
0.015 5.84
1
0.166
0.0360.000
0.000
5.32
5.44 4.97 0.000
5.32 4.87 0.000
cluster-level
p corrected k E
p uncorrected
-63 -27 15
mm mm
-48p -33 mm12
(Z )
uncorrected

-66
-21
6
Inf
57 0.000
-21 -63
12-27 15
Inf
0.000
-48 -33 12
Inf
63 0.000
-12 -66
-3-21 6
Inf
0.000
57 -21 12
57
-39
Inf
0.000
63 6
-12 -3
36 0.000
-30 -15
7.83
57 -39
6
6.36
0.000
36 -30 -15
51
0
48
5.99
0.000
51
0 48
5.65
0.000
-63
-54 -63-3-54 -3
5.53
0.000
-30 -33 -18
-30
-33 -18
5.36
0.000
36 -27
9
5.27
36 0.000
-27 -45 942 9
4.97
0.000
27 24
-45
42 48
4.87
0.000
36 9
-27 42
48 27 24
36 -27 42
T-test: a few remarks
 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 Tstatistic does not depend on the scaling of the regressors
or the scaling of the contrast.
T 
T
c ˆ
var( c ˆ )
T
 Unilateral test:
H0: c T   0
T
c ˆ

ˆ c
2
vs
T
X
T
X

1
c
HA: c T   0
F-test - the extra-sum-of-squares principle
 Model comparison:
Null Hypothesis H0: True model is X0 (reduced model)
X0
X0
X1

Full model ?
ˆ full
2
Test statistic: ratio of
explained variability and
unexplained variability (error)

ˆ reduced
2
or Reduced model?
1 = rank(X) – rank(X0)
2 = N – rank(X)
F-test - multidimensional contrasts – SPM{F}
 Tests multiple linear hypotheses:
H0: True model is X0
X0
X1 (4-9)
H0: 4 = 5 = ... = 9 = 0
X0
cT =
test H0 : cT = 0 ?
000100000
000010000
000001000
000000100
000000010
000000001
SPM{F6,322}
Full model?
Reduced model?
F-contrast in SPM
 For a given contrast c:
ResMS image
beta_???? images
ˆ  ( X T X ) 1 X T y
2
ˆ 
T
ˆ ˆ
N  p
ess_???? images
spmF_???? images
SPM{F}
F-test example: movement-related effects
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).
F-test: a few remarks
 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 .
 In practice, we don’t have to explicitly separate X into [X1X2]
thanks to multidimensional contrasts.
 Hypotheses:
1

0

0

0
0
0
1
0
0
1
0
0
0

0

0

0
Null Hypothesis
Alternativ
H 0 : 1   2   3  0
e Hypothesis
H A : at least one  k  0
 In testing uni-dimensional contrast with an F-test, for example
1 – 2, the result will be the same as testing 2 – 1. It will be
exactly the square of the t-test, testing for both positive and
negative effects.
Mean
Factor 2
One-way ANOVA
(unpaired two-sample t-test)
images
 If X is not of full rank then we can
have X1 = X2 with 1≠ 2 (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).
Factor 1
Estimability of a contrast
1
1
1
1
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1parameters
Rank(X)=2
parameter estimability

(gray  not uniquely specified)
[1 0 0], [0 1 0], [0 0 1] are not estimable.
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.
 The cosine of the angle between two
vectors a and b is obtained by:
cos  
a b
a b
 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.
Shared variance
Orthogonal regressors.
Shared variance
Testing for the green:
Correlated regressors, for example:
green: subject age
yellow: subject score
Shared variance
Testing for the red:
Correlated regressors.
Shared variance
Testing for the green:
Highly correlated.
Entirely correlated non estimable
Shared variance
Testing for the green and yellow
If significant, can be G and/or Y
Examples
A few remarks
 We implicitly test for an additional effect only, be careful if there is
correlation
- Orthogonalisation = decorrelation : not generally needed
- Parameters and test on the non modified regressor change
 It is always simpler to have orthogonal regressors and therefore
designs.
 In case of correlation, use F-tests to see the overall significance.
There is generally no way to decide to which regressor the « common »
part should be attributed to.
 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
Design efficiency
 The aim is to minimize the standard error of a t-contrast
T 
(i.e. the denominator of a t-statistic).
T
c ˆ
T
var( c ˆ )
T
2 T
T
1
var( c ˆ )  ˆ c ( X X ) c
 This is equivalent to maximizing the efficiency e:
1
e (ˆ , c , X )  (ˆ c ( X X ) c )
2
2
T
T
Noise variance
1
Design variance
 If we assume that the noise variance is independent of the specific
design:
1
e(c, X )  (c ( X X ) c )
T
T
1
 This is a relative measure: all we can really say is that one design is
more efficient than another (for a given contrast).
Design efficiency
 The efficiency of an estimator is a measure of how reliable it is and
depends on error variance (the variance not modeled by explanatory
variables in the design matrix) and the design variance (a function of
the explanatory variables and the contrast tested).
 XTX represents covariance of regressors in design matrix; high
covariance increases elements of (XTX)-1.
 High correlation between regressors leads to low sensitivity to
each regressor alone.
T
T
1
c (X X ) c
 1

  0 .9
 0 .9 

1 
cT=[1 0]:
5.26
cT=[1 1]:
20
cT=[1 -1]:
1.05
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.
With many thanks to J.-B. Poline, Tom Nichols, S. Kiebel, R. Henson for slides.
```
###### Author
52   documents Email
###### Document
Category
Uncategorized
Views
94
File Size
1 984 KB
Tags
1/--pages
Report inappropriate content