04_Inference

Report
Statistical Inference
Christophe Phillips
SPM Course
London, May 2012
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
Correlation between regressors
 Contrast estimability
Model Specification: The General Linear Model
1
p
1
1
y  X  

y
N
= X
N
p
+

N
Sphericity assumption:
Independent and identically
distributed (i.i.d.) error terms
 ~ N (0, I )
2
N: number of scans, p: number of regressors
 The General Linear Model is an equation that expresses the observed response
variable in terms of a linear combination of explanatory variables X plus a well
behaved error term. Each column of the design matrix corresponds to an effect one
has built into the experiment or that may confound the results.
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, 2 I )
Y ~ N ( X , 2 I )
T
ˆ
 ˆ
2
ˆ 
Np
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
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 )
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 | H0 )
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=
Test statistic:
T
cT ˆ
var(cT ˆ )

variance
estimate
cT ˆ
ˆ 2cT X T X  c
1
~ tN  p
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-contrast in SPM
 For a given contrast c:
ResMS image
beta_???? images
ˆ  ( X T X ) 1 X T y
con_???? image
cT ˆ
T
ˆ

ˆ
2
ˆ 
Np
spmT_???? image
SPM{t}
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 T-statistic does not depend on the scaling of the
regressors or the scaling of the contrast.
 Unilateral test:
H0: cT   0
vs
HA: cT   0
Scaling issue
[1
1
1
1
]/ 4
T
cT ˆ
var(c ˆ )
Subject 1
T

cT ˆ
ˆ c X X  c
2 T
T
1
 The T-statistic does not depend on
the scaling of the regressors.
 The T-statistic does not depend on
the scaling of the contrast.
Subject 5
[1
1
1
]/ 3
 Contrast
cT ˆ depends on scaling.
 Be careful of the interpretation of the
contrasts cT ˆ themselves (eg, for a
second level analysis):
sum ≠ average
F-test - the extra-sum-of-squares principle
 Model comparison:
Null Hypothesis H0: True model is X0 (reduced model)
X0
X0
X1
RSS
2
ˆ

 full
Full model ?
Test statistic: ratio of
explained variability and
unexplained variability (error)
RSS0
2
ˆ

 reduced
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
ResMS image
beta_???? images
ˆ  ( X T X ) 1 X T y
T
ˆ

ˆ
2
ˆ 
Np
ess_???? images
spmF_???? images
( RSS0 - RSS )
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
1
0
0
0
0
1
0
0
0
0

0
Null HypothesisH0 : 1  2  3  0
Alternative HypothesisH 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.
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 green & yellow
regressors.
NOTE: Entirely correlated non estimable
Shared variance
Testing for the green and yellow
If significant, can be G and/or Y
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.
Correlated regressors
 Orthogonal regressors (=uncorrelated):
By varying each separately, one can predict the combined effect of
varying them jointly.
x
2
x1
 Non-orthogonal regressors (=correlated):
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.
x^2
x2
x2
x1
x1
x1^
x2
x^2 = x2 – x1.x2 x1
x1
It does not reduce the predictive power or reliability of the model as a whole.
 Example:
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.
[1 0 1], [0 1 1], [1 -1 0], [0.5 0.5 1] are estimable.
Three models for the two-samples t-test
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
β1=y1
β2=y2
[1 0].β = y1
[0 1].β = y2
[1 -1].β = y1-y2
[.5 .5].β = mean(y1,y2)
[1 1].β = y1
β1+β2=y1 [0 1].β = y2
β2=y2
[1 0].β = y1-y2
[.5 1].β = mean(y1,y2)
1
1
1
1
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
β1+β3=y1
β2+β3=y2
[1 0 1].β = y1
[0 1 1].β = y2
[1 -1 0].β = y1-y2
[.5 .5 1].β = mean(y1,y2)
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
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.
With many thanks to J.-B. Poline, G. Flandin, T. Nichols, S. Kiebel, R. Henson
for slides.
Design efficiency
 The aim is to minimize the standard error of a t-contrast
T
(i.e. the denominator of a t-statistic).
var(cT ˆ )  ˆ 2cT ( X T X )1 c
cT ˆ
var(cT ˆ )
 This is equivalent to maximizing the efficiency e:
e(ˆ 2 , c, X )  (ˆ 2cT ( X T X )1 c)1
Noise variance
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

similar documents